forked from ros-navigation/navigation2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Visualizations for Dev Container (ros-navigation#3523)
* Add visualizer stage to install demo dependencies * Install foxglove * Install gzweb * Add hack for resolvable mesh URIs located by the aws SDL model files - aws-robotics/aws-robomaker-small-warehouse-world#24 * Revert hack and use fork that fixes issues with deploy.sh - osrf/gzweb#248 * Update target stage to visualizer * Comment out gzclient and rviz for debugging * Add hack for resolvable mesh URIs as migrating the python3 scripts still hasn't resolved the issue * Reorder stages for readability by keeping sequential builder and tester stages adjacent while keeping tester stage the default exported target * fix typo * Install gdb for launching ros launch files using the ROS VS Code extension - ms-iot/vscode-ros#588 * Add vscode tasks file * Add Start Gzweb task * Add Start Foxglove tasks for bridge and studio * Add Start Foxglove compound task using dependsOn * Set default problemMatcher to empty to avoid nagging the user to select one as currently none really support our use case * Source overlay before running foxglove_bridge to ensure nav2 message types are defined by inlining all args into command and sourcing workspace setup * Formatting * Generalize and simplify hack * Generalize gazebo model discovery * Patch gzserver to run headless using xvfb to avoid host/platform specific x11 quirks exposed by vscode automatic x11 forwarding This is needed to provide gazebo a virtual frame buffer as it still need one after all these years. This also avoids the need modifying launch files to call xvfb-run - microsoft/vscode-remote-release#8031 - gazebosim/gazebo-classic#1602 * Set isBackground for start tasks * Add stop tasks * Add restart foxglove task * Switch to shell for commanding pkill to gracefully return 0 when process is not running allowing sequence of dependsOn tasks to run such as for the restart tasks * Add icons to tasks for readability * Add restart gzweb task * Add global start, stop, and restart tasks for all background visualization tasks * Formatting * Hide tasks users need not run manually to avoid cluttering up the run task quick pick * Shorten label for background tasks so they succinctly show from the running task list * Show global start and stop visualizations tasks as they may be too helpful to hide * Revert "Comment out gzclient and rviz for debugging" This reverts commit 0addae2. * Add --ipc=host to runArgs to enable shared memory transport - https://community.rti.com/kb/communicate-between-two-docker-containers-using-rti-connext-dds-and-shared-memory * Add --pid=host to runArgs to simplify discovery - https://community.rti.com/kb/communicate-between-two-docker-containers-using-rti-connext-dds-and-shared-memory * Add to runArgs to simplify debugging - https://code.visualstudio.com/docs/devcontainers/create-dev-container#_use-docker-compose * Add comments * Comment out runArgs unintended side effects or cross talk between containers by default also avoids interfering with vscode's X11 forwarding
- Loading branch information
1 parent
80cbc88
commit 131f42e
Showing
3 changed files
with
252 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Gzweb", | ||
"icon": { | ||
"id": "debug-start" | ||
}, | ||
"type": "process", | ||
"command": "npm", | ||
"args": [ | ||
"start" | ||
], | ||
"options": { | ||
"cwd": "/opt/gzweb", | ||
"env": { | ||
"npm_config_port": "9090" | ||
} | ||
}, | ||
"hide": true, | ||
"isBackground": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Stop Gzweb", | ||
"icon": { | ||
"id": "debug-stop" | ||
}, | ||
"type": "shell", | ||
"command": "pkill -SIGTERM -f 'npm start' || true", | ||
"hide": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Restart Gzweb", | ||
"icon": { | ||
"id": "debug-restart" | ||
}, | ||
"dependsOn": [ | ||
"Stop Gzweb", | ||
"Gzweb" | ||
], | ||
"dependsOrder": "sequence", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Foxglove Bridge", | ||
"icon": { | ||
"id": "debug-start" | ||
}, | ||
"type": "shell", | ||
"command": "source ./install/setup.bash && ros2 run foxglove_bridge foxglove_bridge", | ||
"options": { | ||
"cwd": "/opt/overlay_ws", | ||
}, | ||
"isBackground": true, | ||
"hide": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Stop Foxglove Bridge", | ||
"icon": { | ||
"id": "debug-stop" | ||
}, | ||
"type": "shell", | ||
"command": "pkill -SIGTERM -f 'ros2 run foxglove_bridge foxglove_bridge' || true", | ||
"hide": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Foxglove Studio", | ||
"icon": { | ||
"id": "debug-start" | ||
}, | ||
"type": "process", | ||
"command": "caddy", | ||
"args": [ | ||
"file-server", | ||
"--listen", | ||
":8080" | ||
], | ||
"options": { | ||
"cwd": "/opt/foxglove", | ||
}, | ||
"isBackground": true, | ||
"hide": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Stop Foxglove Studio", | ||
"icon": { | ||
"id": "debug-stop" | ||
}, | ||
"type": "shell", | ||
"command": "pkill -SIGTERM -f 'caddy file-server --listen :8080' || true", | ||
"hide": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Foxglove", | ||
"icon": { | ||
"id": "debug-start" | ||
}, | ||
"dependsOn": [ | ||
"Foxglove Bridge", | ||
"Foxglove Studio" | ||
], | ||
"hide": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Stop Foxglove", | ||
"icon": { | ||
"id": "debug-stop" | ||
}, | ||
"dependsOn": [ | ||
"Stop Foxglove Bridge", | ||
"Stop Foxglove Studio" | ||
], | ||
"hide": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Restart Foxglove", | ||
"icon": { | ||
"id": "debug-restart" | ||
}, | ||
"dependsOn": [ | ||
"Stop Foxglove", | ||
"Foxglove" | ||
], | ||
"dependsOrder": "sequence", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Start Visualizations", | ||
"icon": { | ||
"id": "debug-start" | ||
}, | ||
"dependsOn": [ | ||
"Gzweb", | ||
"Foxglove" | ||
], | ||
// "hide": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Stop Visualizations", | ||
"icon": { | ||
"id": "debug-stop" | ||
}, | ||
"dependsOn": [ | ||
"Stop Gzweb", | ||
"Stop Foxglove" | ||
], | ||
// "hide": true, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Restart Visualizations", | ||
"icon": { | ||
"id": "debug-restart" | ||
}, | ||
"dependsOn": [ | ||
"Stop Visualizations", | ||
"Start Visualizations" | ||
], | ||
"dependsOrder": "sequence", | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters