RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.35k stars 1.27k forks source link

Add `GeometryId` to meshcat path API to `MeshcatVisualizer` #21290

Open nepfaff opened 7 months ago

nepfaff commented 7 months ago

Is your feature request related to a problem? Please describe. This would be useful for changing the meshcat properties of a given Drake geometry. See this StackOverflow post for context.

Describe the solution you'd like MeshcatVisualizershould have an API (e.g. get_meshcat_path) that takes a GeometryID and returns the corresponding meshcat path name.

nepfaff commented 7 months ago

@SeanCurtis-TRI

jwnimmer-tri commented 1 week ago

Specifically, we the logic in MeshcatVisualizer<T>::SetObjects that converts a GeometryId and its FrameId into a path to be factored out and callable as a public function, something like std::string MeshcatVisualizer<T>::GetMeshcatPath(GeometryId) const;.