How do I visualize different coordinate frames in drake when using the LCM visualizer, such as the body frame attached to the end effector of the Kuka?
Asked
Active
Viewed 200 times
1
-
1To clarify, I believe you mean `DrakeVisualizer`? The visualizer is listening on channels `DRAKE_DRAW_FRAMES.*`, but I don't see any code in Drake that publishes to it. We should probably push an example. We definitely *do* have this feature in [MeshCat](https://drake.mit.edu/pydrake/pydrake.systems.meshcat_visualizer.html#pydrake.systems.meshcat_visualizer.MeshcatVisualizer). – Russ Tedrake May 08 '21 at 01:16
-
1Hi Professor, thank you for your comment! Yes, I was referring to ```DrakeVisualizer```. I am aware that visualizing frame is doable in Meshcat. The reason why I switched to using ```DrakeVisuazlizer``` is because I need to render the cameras. Per the comment here [1], it sounds to me like rendering cameras in meshcat will fail. Is this true? I don't need to run drake inside docker. [1] https://github.com/RobotLocomotion/drake/blob/478f1b04a476065b83b59273c7e028f816595bd3/examples/manipulation_station/end_effector_teleop_sliders.py#L257 – Quan Vuong May 08 '21 at 05:22
-
Hi @RussTedrake, the documentation link you provided now 404s. Do you have updated information about how to accomplish this in Meshcat? I have posted a separate question here https://stackoverflow.com/questions/76683262/how-do-i-visualize-coordinate-frames-in-drake-using-meshcat – Mark Jul 13 '23 at 21:14
-
I believe this new question should have an updated answer: https://stackoverflow.com/questions/76683262/how-do-i-visualize-coordinate-frames-in-drake-using-meshcat – Russ Tedrake Jul 14 '23 at 01:13
1 Answers
2
Here's some simple code for drawing frames in Drake Visualizer, w/ simple video:
https://github.com/EricCousineau-TRI/repro/blob/ea2d7987/drake_stuff/drake_viz_draw_frames/README.md
Does this help at all? If so, yeah, I can help to PR against Drake.
Some notes / caveats:
- This doesn't draw
pydrake.geometry.FrameId
as doesmeshcat
; instead, it simply draws a frame (whatever you name it) usingRigidTransform
, w.r.t. world frame. - This is unlike things like
/tf
in ROS, where you can publish a frame w.r.t. another frame.

Eric Cousineau
- 1,944
- 14
- 23
-
1Yes, this works for me. Thank you for the code example and video. Very nicely put together! – Quan Vuong May 08 '21 at 21:13