Skip to content

NOS3 Install, Build, Run Quick Start

Isgaroth-the-Green edited this page Oct 24, 2024 · 19 revisions

Installing, Building, and Running NOS3

Installing NOS3

On the host computer:

  1. Install [Oracle VirtualBox v6.1+](https://www.virtualbox.org)
  2. Install [Vagrant v2.2+](https://www.vagrantup.com)
  3. Install [Git 1.8+](https://git-scm.com/downloads)

Clone

  1. Open a terminal and navigate to the desired location for the repository

  2. Clone the repository in the terminal using git clone https://github.com/nasa/nos3.git

  3. cd nos3

  4. git checkout dev

  5. Clone the submodules with git submodule update --init --recursive

Provision

  1. Run vagrant up and wait to return to a prompt
  • This can take anywhere from a few minutes to hours depending on internet speeds and host PC specs
  • Important: Internet access is required when installing
  • The VM may reboot multiple times in order to finish installing packages for you automatically, so wait for that prompt!
  • Sometimes ansible does not seem to install and there is an error like "Could not get lock /var/lib/apt/lists/lock". If this happens, run vagrant provision to install ansible and provision.
  1. Vagrant will automatically load the virtual machine to Virtual Box, and it will be ready for use, though more RAM and CPU cores should probably be added if possible on Virtual Box before use.

  2. Login to the jstar user using the password jstar123! and get to work! (If needed, the vagrant user has password vagrant)

Building NOS3

Log in to the NOS3 VM, username / password : jstar / jstar123!

  1. Access the nos3 repository on the host machine. (This may already be done if you do vagrant up. Vagrant mounts the nos3 repository in the VM at /home/nos3/Desktop/github-nos3.) From the guest VM:
  2. Add Virtual Box Guest Additions: 1. Go to Virtual Box menu -> Devices -> Insert Guest Additions CD image... 2. Click Run in the resulting dialog box
  3. Add a shared folder with the nos3 repository code: 1. Go to Virtual Box menu -> Devices -> Shared Folders -> Shared Folders Settings... 2. Add a new Shared Folder (folder with + sign) and select the location of the nos3 repository on the host 3. Check Auto-mount and Make Permanent 4. Reboot the VM
  4. Build the NOS3 software
  5. In a terminal, navigate to the nos3 shared folder after the VM reboot above
  6. Run make clean
  7. Run make prep
  8. Once COSMOS is launched and you set the password and the terminal is done outputting, run make

Running NOS3

In the NOS3 VM:

  1. In a terminal, navigate to the nos3 shared folder (created by Vagrant at /home/nos3/Desktop/github-nos3 or created by you using the instructions above)

  2. Run make launch in the nos3 directory from the terminal

  3. To exit the simulation, run make stop in the nos3 directory from the terminal

  4. To rebuild NOS3 from the repository baseline, first run make clean and then run make prep and then run make

Running COSMOS

Once make prep is run, COSMOS 5 NOS3 Web Interface will start. Once make launch is run, cFS and 42 will launch and link in to COSMOS. If using COSMOS 4, the COSMOS 4 GUI should launch during the make launch Script.

COSMOS4Launcher

COSMOS 4 Launcher

COSMOS4MainWindows

COSMOS 4 Main Windows

COSMOS5OnStart

COSMOS 5 Web UI

COSMOS may command cFS to send telemetry back to COSMOS by:

  1. The NOS3 Web Interface should show the COSMOS Command and Telemetry Server by default. If not, switch to it and assure the following are done and true:

  2. Run make if needed, then make launch. At this point Flight Software will boot up.

  3. The terminals with cFS, along with the dynamics sim windows for 42, should show up.

  4. Once they have, for the MISSION_INT interface, the Connected? attribute should read true

  5. From the NOS3 Web Interface, open the COSMOS Command Sender and enter:

  6. In the Command Sender Window, select Target to be CFS

  7. Select Command to be TO_ENABLE_OUTPUT_CC

  8. Click Send

Note: In current versions of NOS3, this debug output should already be set up by default. However, to enable Radio Telemetry, follow the same steps except go to CFS_RADIO, and run the command with the DEST_IP of 'radio_sim' and the DEST_PORT of 5011, of whatever values fit your setup.

COSMOS4EnableRadio

COSMOS 4 Radio Enable

COSMOS_Radio_Activation

COSMOS 5 Radio Enable

  1. Notice under the COSMOS Command and Telemetry Server Window that the following data fields update:
  2. Bytes Tx and Cmd Pkts should change from 0 to a positive number
  3. Bytes Rx and Tlm Pkts should start counting up as telemetry is received

COSMOS4CmdTlmConsoleRadioEnabled

COSMOS 4 Command and Telemetry Server with Radio Enabled

COSMOS5OnConnect

COSMOS 5 Command and Telemetry Server with Radio Enabled

  1. From the NOS3 Web Interface or COSMOS GUI, open the COSMOS Packet Viewer:
  2. In the Packet Viewer Window, select Target to be CFS
  3. Select Packet to be CFE_EVS_PACKET
  4. Scroll to see the MESSAGE field live updates (line 16)
  5. Telemetry packets may be viewed for other apps, once they are commanded to send telemetry
  6. Application telemetry fields which are stale are displayed in fuscia Note: The same should apply for Radio, except go to CFS_RADIO instead of CFS

COSMOS4EVSPacket

COSMOS 4 EVS Packet

COSMOS5EVSMessageRouteEnable

COSMOS 5 EVS Packet

Reset

  1. To exit the simulation, run make stop in the nos3 directory from the terminal
  2. To build NOS3 from the repository baseline, first run make clean and then run make launch
  3. If you plan to switch ground software between COSMOS 4 and COSMOS 5, be sure to run make stop-gsw before running make clean and make prep