Draft
Conversation
Signed-off-by: Jelmer de Wolde <[email protected]>
Signed-off-by: Jelmer de Wolde <[email protected]>
Signed-off-by: Jelmer de Wolde <[email protected]>
Signed-off-by: Jelmer de Wolde <[email protected]>
Signed-off-by: Jelmer de Wolde <[email protected]>
Signed-off-by: Jelmer de Wolde <[email protected]>
10 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Foxglove
Foxglove seems to be the 'industry standard' tool to control and visualize robots in a web interface, allowing to connect remotely over the inter. Also, no real alternatives with similar features (visualization of the robot, camera, lidar, markers, joystick control and more) seems to be available. Therefore we try to integrate Foxglove.
How does it work?
In this PR, the visualization image starts the Foxglove bridge. Based on the robot configuration, the correct topics are added to the
client_topic_whitelistparameter. Based on the robot configurations, also afoxglove.jsonlayout file is written (only works of you create this file before launching, since it works via a Docker volume mount). The data can be visualized in Foxglove Studio or in a Chrome browser at https://app.foxglove.dev/. Here you can import the JSON file for the layout.Tailscale
To use Foxglove for remote monitoring over the internet, we use Tailscale. Simply change the localhost in the Foxglove connection to the Tailscale IP adress of the device running the Foxglove Bridge.
Problems:
Foxglove works well when the bridge and app are running on the same network. Over the internet, we experience issues:
1. Mesh files:
The mesh files of the robot are sometimes not (all) loaded. For this PR, we tried to reduce the mesh size by:
Converting the meshes (DAE and STL) to GLB (small binary format).
This was done using 3d-convert-py. This tool has a dependency `bpy==3.6.0' (blender python), which is not available anymore on PyPi and requires Python 3.10. Therefore, the easiest way to use this tool is:
uv venv --python 3.10uv pip install bpy==3.6.0 --extra-index-url https://download.blender.org/pypi/uv pip install -r requirements.txtCompressing the GLB file
This was done using glTF-Transform. This tool requires NPM to install:
npm install --global @gltf-transform/cligltf-transform optimize input.glb output.glb --compress dracoReplacing the mesh files
This PR tries to replace the original mesh files with the (way smaller) glb files. Currently, this is simply done when loading the URDF using the new
change_meshes()method. This is only a quick test, since the replacement of these meshes leads to incorrect orientated meshes in Gazebo en MoveIt. However, the smaller meshes seem to have a positive effect on Foxglove, since the meshes do load now.2. Data compression.
Another problem when using Foxglove over the internet (via Tailscale) is that a camera stream or pointcloud stream is not working well. The visualization is laggy or doesn't work at all. The reason might be the lack of data compression.
For now, we decided to use Rosboard (#394). However, Foxglove has the potential to be the all-in-one tool (where we now use Rviz, Vizanti, Rosboard and our own GUI). Future investigation in fixing these problems with Foxglove might me interesting.