Add meshcat paths for bodies without geometry and frames in the MeshcatVisualizer #22247
Labels
component: geometry illustration
What and how geometry gets communicated to external visualizers
type: feature request
Is your feature request related to a problem? Please describe.
Currently the
MeshcatVisualizer
system does not publish the transform ofmeshcat
paths for bodies that do not contain geometry. This is problematic for plants spawned by URDF models where links are often created without geometry to represent important frames (e.g., camera frames, tool flange frames, etc.). I would like to attach variousmeshcat
visualizations to these types of frames (e.g., coordinate triads, meshes, etc.), but theMeshcatVisualizer
does not add them or update their positions using the query object.Similarly, the
MeshcatVisualizer
does not addmeshcat
paths forFrame
objects. As a result, users manually have to addmeshcat
paths for theseFrame
s by getting themeshcat
path to their associated bodies (assuming that body has geometry and was added by theMeshcatVisualizer
, which is not always the case) and setting the transform viaFrame::GetFixedPoseInBodyFrame
.Describe the solution you'd like
It would be very beneficial if the
MeshcatVisualizer
would:meshcat
path for bodies without geometry and update the transform of that path using the query object as it does for bodies with geometrymeshcat
path for allFrame
s that are not body frames and set the transform relative their body usingFrame::GetFixedPoseInBodyFrame
Describe alternatives you've considered
I've already written a Python function that adds all non-body frames to Meshcat. It works fine, but it's inconvenient that the
MeshcatVisualizer
doesn't take care of this by default.I am also about to add a custom
LeafSystem
very similar toMeshcatVisualizer
that addsmeshcat
paths for bodies without geometry uses the query object to set their transforms. I think this will also work fine, but it's inconvenient that this isn't set by defaultAdditional context
N/A
The text was updated successfully, but these errors were encountered: