Skip to content

Commit 38ed80f

Browse files
committed
fixed foxglove bugs, added dynamic fg layout, updated docs
1 parent 5bc2803 commit 38ed80f

11 files changed

Lines changed: 1414 additions & 54 deletions

File tree

‎.env‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ COMPOSE_PROFILES="desktop,isaac-sim"
2525

2626
# ================= Common ===================
2727
AUTOLAUNCH="true" # If false, the docker-compose will just spawn idle docker containers with no launch command.
28-
NUM_ROBOTS="1" # Number of robot containers to launch.
28+
NUM_ROBOTS="2" # Number of robot containers to launch.
2929
RECORD_BAGS="false" # "true" or "false"
3030

3131
# ============== ISAAC SIM =====================
3232
ISAAC_SIM_GUI="/isaac-sim/AirStack/simulation/isaac-sim/assets/scenes/simple_pegasus.scene.usd"
3333
# Set to "true" to launch Isaac Sim using a standalone Python script instead of USD file
3434
ISAAC_SIM_USE_STANDALONE="true" # "true" or "false"
3535
# Script name (must be in /AirStack/simulation/isaac-sim/launch_scripts/)
36-
ISAAC_SIM_SCRIPT_NAME="example_one_px4_pegasus_launch_script.py"
36+
ISAAC_SIM_SCRIPT_NAME="example_multi_drone_scene_import.py" #"example_one_px4_pegasus_launch_script.py"
3737
PLAY_SIM_ON_START="false"
3838

3939
# ===============================================

‎common/ros_packages/desktop_bringup/launch/gcs.launch.xml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@
1313
<node pkg="rviz2" exec="rviz2" args="-d $(find-pkg-share desktop_bringup)/rviz/gcs.rviz --ros-args --log-level INFO" output="screen" respawn="true" respawn_delay="1" />
1414
?>
1515

16+
<?ignore
1617
<node pkg="rqt_gui" exec="rqt_gui"
1718
args="--perspective-file $(find-pkg-share rqt_gcs)/config/gcs.perspective --ros-args --log-level INFO"
1819
output="screen" respawn="true" respawn_delay="1" />
20+
?>
1921

2022
<!-- launch foxglove-studio -no-standbox -->
2123

22-
<executable cmd="bash -c 'DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY foxglove-studio --no-sandbox'" output="screen"/>
24+
<executable
25+
cmd="bash -c 'DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY foxglove-studio --no-sandbox &quot;foxglove://open?ds=foxglove-websocket&amp;ds.url=ws://localhost:8765&amp;layoutId=lay_0eLycKBK1l9dAtoR&quot;'"
26+
output="screen"/>
2327

2428
<node pkg="foxglove_bridge" exec="foxglove_bridge" output="screen" respawn="true" respawn_delay="1">
2529
<param name="port" value="8765" />

‎docs/gcs/foxglove.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ The visualizer auto-discovers any robot whose topics match the AirStack conventi
2020

2121
All of these are published by individual robots in their **local `map` frame** (origin = drone boot position). The visualizer translates them into a single global `map` frame on the GCS using each robot's GPS boot offset, and merges everything into one `MarkerArray`.
2222

23+
## Loading the dynamic layout
24+
25+
The GCS container regenerates `gcs/foxglove_extensions/airstack_default.json` on every startup, replicating the `robot 1` tab once per robot up to `NUM_ROBOTS` (see `gcs/foxglove_extensions/render_layout.py`). Foxglove Studio Desktop has no way to deep-link a local file, so the org's cloud layout is what auto-loads via the `foxglove://open?...&layoutId=...` URL in `common/ros_packages/desktop_bringup/launch/gcs.launch.xml`.
26+
27+
To use the locally-rendered, NUM_ROBOTS-matched layout instead: open Foxglove → **Layouts** menu → **Import from file...** → pick `/root/AirStack/gcs/foxglove_extensions/airstack_default.json`. Foxglove keeps the imported layout in its IndexedDB and re-activates it on subsequent launches — re-import only when you change `NUM_ROBOTS` or edit the template.
28+
2329
## Output topics
2430

2531
| Topic | Type | What it carries |

‎gcs/docker/gcs-base-docker-compose.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ services:
1313
bash -c "
1414
ssh service restart;
1515
python3 /root/AirStack/gcs/foxglove_extensions/install.sh;
16+
python3 /root/AirStack/gcs/foxglove_extensions/render_layout.py || true;
1617
tmux new -d -s bringup;
1718
if [ $$AUTOLAUNCH = 'true' ]; then
1819
tmux send-keys -t bringup:0.0 'bws && sws; ros2 launch desktop_bringup gcs.launch.xml' ENTER;
@@ -58,7 +59,7 @@ services:
5859
# waypoint/polygon editor saves (so they survive container restarts)
5960
- ../saves:/root/.airstack:rw
6061
# foxglove extensions
61-
- ../foxglove_extensions:/root/AirStack/gcs/foxglove_extensions:ro
62+
- ../foxglove_extensions:/root/AirStack/gcs/foxglove_extensions:rw
6263
# autonomy stack stuff
6364
- ../../common/ros_packages:/root/AirStack/gcs/ros_ws/src/common:rw
6465
- ../../common/fastdds.xml:/root/AirStack/gcs/ros_ws/src/fastdds.xml

0 commit comments

Comments
 (0)