From d5c7a97a41aa947870fc534f1f9c83a57832bbe6 Mon Sep 17 00:00:00 2001 From: Kevin Bruce Date: Wed, 11 Dec 2024 14:57:23 -0500 Subject: [PATCH 1/4] [nasa/nos3#380] Started reorganizing the FSS Device files and adapting the Sample Checkout files to work for FSS --- components/generic_fss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/generic_fss b/components/generic_fss index bcc68f4e..219789ec 160000 --- a/components/generic_fss +++ b/components/generic_fss @@ -1 +1 @@ -Subproject commit bcc68f4ea092813fcea311d5c8b0bfc0919ab1ef +Subproject commit 219789ec15a99e2901b85e513a4ed698a203800a From d02bbbce79f90ebd5f8bc7f3adbbf4508756677e Mon Sep 17 00:00:00 2001 From: Kevin Bruce Date: Wed, 11 Dec 2024 15:35:48 -0500 Subject: [PATCH 2/4] [nasa/nos3#380] Removed non-existant functions from the fss checkout, and updated generic_adcs includes paths in cmake to include the new shared directory for the fss device --- components/generic_adcs | 2 +- components/generic_fss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/generic_adcs b/components/generic_adcs index 40c77957..e686aea2 160000 --- a/components/generic_adcs +++ b/components/generic_adcs @@ -1 +1 @@ -Subproject commit 40c77957c3f527fbcba64113f868d924946a23cf +Subproject commit e686aea236ed503b6cddb5b0c18dca11ccf17660 diff --git a/components/generic_fss b/components/generic_fss index 219789ec..8392db02 160000 --- a/components/generic_fss +++ b/components/generic_fss @@ -1 +1 @@ -Subproject commit 219789ec15a99e2901b85e513a4ed698a203800a +Subproject commit 8392db02e2ae3698a09ff9f04dcc65504a447efa From 8437c81b11bd70b7f94ae21797691259eb66cf67 Mon Sep 17 00:00:00 2001 From: "Lucas, John P." Date: Wed, 18 Dec 2024 12:22:42 -0500 Subject: [PATCH 3/4] [nasa/nos3#380] Updated generic fss standalone, generic adcs to look for shared folders, added a sim_truth_interface to the configuration, and setup environment for quick testing of the FSS checkout for others to review; --- cfg/nos3-mission.xml | 2 +- cfg/sc-full-config.xml | 3 +++ cfg/sc-minimal-config.xml | 11 +++++++---- components/generic_adcs | 2 +- components/generic_fss | 2 +- scripts/cfg/configure.py | 7 +++++++ scripts/checkout.sh | 40 ++++++++++++++++++++++++++------------- 7 files changed, 47 insertions(+), 20 deletions(-) diff --git a/cfg/nos3-mission.xml b/cfg/nos3-mission.xml index 547b6317..4397ef1b 100644 --- a/cfg/nos3-mission.xml +++ b/cfg/nos3-mission.xml @@ -15,7 +15,7 @@ - sc-full-config.xml + sc-minimal-config.xml diff --git a/cfg/sc-full-config.xml b/cfg/sc-full-config.xml index 289cb7ad..5007eb05 100644 --- a/cfg/sc-full-config.xml +++ b/cfg/sc-full-config.xml @@ -77,4 +77,7 @@ 1.0 -1.0 + + true + \ No newline at end of file diff --git a/cfg/sc-minimal-config.xml b/cfg/sc-minimal-config.xml index 8b78c6fa..3a14d38d 100644 --- a/cfg/sc-minimal-config.xml +++ b/cfg/sc-minimal-config.xml @@ -33,7 +33,7 @@ false - false + true false @@ -73,8 +73,11 @@ false - 0.1 - 1.0 - -1.0 + 5.0 + -5.0 + 5.0 + + false + \ No newline at end of file diff --git a/components/generic_adcs b/components/generic_adcs index e686aea2..011aa7f8 160000 --- a/components/generic_adcs +++ b/components/generic_adcs @@ -1 +1 @@ -Subproject commit e686aea236ed503b6cddb5b0c18dca11ccf17660 +Subproject commit 011aa7f842b799ec741ea6f8cddb5f74fc88053b diff --git a/components/generic_fss b/components/generic_fss index 8392db02..485fc635 160000 --- a/components/generic_fss +++ b/components/generic_fss @@ -1 +1 @@ -Subproject commit 8392db02e2ae3698a09ff9f04dcc65504a447efa +Subproject commit 485fc6351ae97bf992e27f781504e098cc79563e diff --git a/scripts/cfg/configure.py b/scripts/cfg/configure.py index 9507c7f0..2cb0e76e 100644 --- a/scripts/cfg/configure.py +++ b/scripts/cfg/configure.py @@ -118,6 +118,7 @@ sc_orbit_tipoff_x = sc_root.find('orbit/tipoff_x').text sc_orbit_tipoff_y = sc_root.find('orbit/tipoff_y').text sc_orbit_tipoff_z = sc_root.find('orbit/tipoff_z').text + sc_sim_truth_en = sc_root.find('sim/sim_truth_interface').text ### ### Flight Software - Startup Script @@ -311,6 +312,7 @@ st_index = 999 torquer_index = 999 thruster_index = 999 + truth_index = 999 with open('./cfg/InOut/Inp_IPC.txt', 'r') as fp: lines = fp.readlines() @@ -360,6 +362,9 @@ if line.find('Thruster IPC') != -1: if (lines.index(line)) < thruster_index: thruster_index = lines.index(line) + 1 + if line.find('Truth data') != -1: + if (lines.index(line)) < truth_index: + truth_index = lines.index(line) + 1 ipc_off = 'OFF ! IPC Mode (OFF,TX,RX,TXRX,ACS,WRITEFILE,READFILE)\n' if (sc_css_en != 'true'): @@ -387,6 +392,8 @@ lines[torquer_index] = ipc_off if (sc_thruster_en != 'true'): lines[thruster_index] = ipc_off + if (sc_sim_truth_en != 'true'): + lines[truth_index] = ipc_off with open('./cfg/build/InOut/Inp_IPC.txt', 'w') as fp: lines = "".join(lines) diff --git a/scripts/checkout.sh b/scripts/checkout.sh index 21c61e8b..821672db 100755 --- a/scripts/checkout.sh +++ b/scripts/checkout.sh @@ -19,22 +19,20 @@ echo "" # Debugging # Replace `--tab` with `--window-with-profile=KeepOpen` once you've created this gnome-terminal profile manually -#echo "42..." -#rm -rf $USER_NOS3_DIR/42/NOS3InOut -#cp -r $BASE_DIR/cfg/build/InOut $USER_NOS3_DIR/42/NOS3InOut -#xhost +local:* -#gnome-terminal --tab --title=$SC_NUM" - 42" -- $DFLAGS -e DISPLAY=$DISPLAY -v $USER_NOS3_DIR:$USER_NOS3_DIR -v /tmp/.X11-unix:/tmp/.X11-unix:ro --name $SC_NUM"_fortytwo" -h fortytwo --network=$SC_NETNAME -w $USER_NOS3_DIR/42 -t $DBOX $USER_NOS3_DIR/42/42 NOS3InOut -#echo "" - echo "NOS Core..." gnome-terminal --tab --title="NOS Engine Server" -- $DFLAGS -v $SIM_DIR:$SIM_DIR --name $SC_NUM"_nos_engine_server" -h nos_engine_server --network=$SC_NETNAME -w $SIM_BIN $DBOX /usr/bin/nos_engine_server_standalone -f $SIM_BIN/nos_engine_server_config.json gnome-terminal --tab --title="NOS Time Driver" -- $DFLAGS -v $SIM_DIR:$SIM_DIR --name nos_time_driver --network=$SC_NETNAME -w $SIM_BIN $DBOX ./nos3-single-simulator $SC_CFG_FILE time gnome-terminal --tab --title="NOS Terminal" -- $DFLAGS -v $SIM_DIR:$SIM_DIR --name "nos_terminal" --network=$SC_NETNAME -w $SIM_BIN $DBOX ./nos3-single-simulator $SC_CFG_FILE stdio-terminal +echo "" -echo " Checkout..." -# Rename for your simulator under test to allow checkout, uncomment if already exists - -# Example manual build for sample checkout: +## +## HOW TO CHECKOUT +## +# Rename for your simulator under test in this file below to allow checkout, uncomment if already exists +# Change configuration for your selected component (if using 42 for data) +# Modify ./cfg/nos3-mission.xml to use `sc-minimal-config.xml` +# Modify ./cfg/sc_minimal-config.xml to enable your specific component to test +# Manually build checkout: (sample shown as reference) # make debug # cd ./components/sample/fsw/standalone # mkdir build @@ -42,6 +40,11 @@ echo " Checkout..." # cmake .. -DTGTNAME=cpu1 # make # exit +# Run `make clean; make; make checkout` +# Double check everything running as expected +# Run tests as needed +# Run `make stop` and repeat until feature complete +echo "Checkout..." ## ## Arducam @@ -49,11 +52,22 @@ echo " Checkout..." #gnome-terminal --tab --title="Arducam Sim" -- $DFLAGS -v $SIM_DIR:$SIM_DIR --name $SC_NUM"_cam_sim" --network=$SC_NETNAME -w $SIM_BIN $DBOX ./nos3-single-simulator $SC_CFG_FILE camsim #gnome-terminal --title="Arducam Checkout" -- $DFLAGS -v $BASE_DIR:$BASE_DIR --name $SC_NUM"_arducam_checkout" --network=$SC_NETNAME -w $BASE_DIR $DBOX ./components/arducam/fsw/standalone/build/arducam_checkout +## +## Fine Sun Sensor (FSS) +## +rm -rf $USER_NOS3_DIR/42/NOS3InOut +cp -r $BASE_DIR/cfg/build/InOut $USER_NOS3_DIR/42/NOS3InOut +xhost +local:* +gnome-terminal --tab --title=$SC_NUM" - 42" -- $DFLAGS -e DISPLAY=$DISPLAY -v $USER_NOS3_DIR:$USER_NOS3_DIR -v /tmp/.X11-unix:/tmp/.X11-unix:ro --name $SC_NUM"_fortytwo" -h fortytwo --network=$SC_NETNAME -w $USER_NOS3_DIR/42 -t $DBOX $USER_NOS3_DIR/42/42 NOS3InOut +echo "" +gnome-terminal --tab --title=$SC_NUM" - FSS Sim" -- $DFLAGS -v $SIM_DIR:$SIM_DIR --name $SC_NUM"_fss_sim" --network=$SC_NETNAME -w $SIM_BIN $DBOX ./nos3-single-simulator $SC_CFG_FILE generic_fss_sim +gnome-terminal --title="FSS Checkout" -- $DFLAGS -v $BASE_DIR:$BASE_DIR --name $SC_NUM"_fss_checkout" --network=$SC_NETNAME -w $BASE_DIR $DBOX ./components/generic_fss/fsw/standalone/build/generic_fss_checkout + ## ## Sample ## -gnome-terminal --tab --title="Sample Sim" -- $DFLAGS -v $SIM_DIR:$SIM_DIR --name $SC_NUM"_sample_sim" --network=$SC_NETNAME -w $SIM_BIN $DBOX ./nos3-single-simulator $SC_CFG_FILE sample_sim -gnome-terminal --title="Sample Checkout" -- $DFLAGS -v $BASE_DIR:$BASE_DIR --name $SC_NUM"_sample_checkout" --network=$SC_NETNAME -w $BASE_DIR $DBOX ./components/sample/fsw/standalone/build/sample_checkout +#gnome-terminal --tab --title="Sample Sim" -- $DFLAGS -v $SIM_DIR:$SIM_DIR --name $SC_NUM"_sample_sim" --network=$SC_NETNAME -w $SIM_BIN $DBOX ./nos3-single-simulator $SC_CFG_FILE sample_sim +#gnome-terminal --title="Sample Checkout" -- $DFLAGS -v $BASE_DIR:$BASE_DIR --name $SC_NUM"_sample_checkout" --network=$SC_NETNAME -w $BASE_DIR $DBOX ./components/sample/fsw/standalone/build/sample_checkout # sleep 1 # urlIP=$(docker container inspect sc_1_sample_checkout | grep -i IPAddress | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b") From 95c6b2948d66af02fc0c5cf1d144fb0f972d7d8b Mon Sep 17 00:00:00 2001 From: Kevin Bruce Date: Wed, 18 Dec 2024 14:49:40 -0500 Subject: [PATCH 4/4] [nasa/nos3#380] updated pointers for merge --- components/generic_adcs | 2 +- components/generic_fss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/generic_adcs b/components/generic_adcs index 011aa7f8..bf098d87 160000 --- a/components/generic_adcs +++ b/components/generic_adcs @@ -1 +1 @@ -Subproject commit 011aa7f842b799ec741ea6f8cddb5f74fc88053b +Subproject commit bf098d87c8d7a4db1ee151971502e8aafdd6c7e4 diff --git a/components/generic_fss b/components/generic_fss index 485fc635..a9b17808 160000 --- a/components/generic_fss +++ b/components/generic_fss @@ -1 +1 @@ -Subproject commit 485fc6351ae97bf992e27f781504e098cc79563e +Subproject commit a9b178089336e5ef1a7eab096a1186812f37132d