How to add Triad/Axes to the MeshcatVisualizer #2010
-
Hello! I have loaded the URDF of robot and would like to add a triad/visual axis system in all joints of my robot (for visualization purposes), that should move as the robot moves. Similar to this: https://images.app.goo.gl/3seYx75xiP1mSB747 I now that meshcat has a method to create a triad geometry, and it can be added. But if I do it with meshcat, I will need to update the triad pose everytime "manullay". Is there any way for this to be automatics, somethinf like the Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I think @stephane-caron or @ManifoldFR will be the most skilled persons to answer this interesting question. |
Beta Was this translation helpful? Give feedback.
-
That's how it's done indeed, for instance in these IK examples: viewer = viz.viewer
meshcat_shapes.frame(viewer["base"], opacity=1.0)
meshcat_shapes.frame(viewer["base_target"], opacity=0.5)
while True:
[...]
# Update visualization frames
viewer["base_target"].set_transform(base_target.np)
viewer["base"].set_transform(
configuration.get_transform_frame_to_world(base_task.body).np
)
[...]
viz.display(q)
t += dt The For frames that are part of the model, we can accept proposals/PRs to extend the How would we go about target frames then? Thinking aloud: Those are usually updated manually on the user side anyway. Maybe we should encourage adding target frames to the model via fixed joints whose placements can be updated manually. I guess those would not affect FK/ID/FD computation times in any significant way, and it would be better practice to handle all frames in the model. |
Beta Was this translation helpful? Give feedback.
-
That's how it's done indeed, for instance in these IK examples: viewer = viz.viewer
meshcat_shapes.frame(viewer["base"], opacity=1.0)
meshcat_shapes.frame(viewer["base_target"], opacity=0.5)
while True:
[...]
# Update visualization frames
viewer["base_target"].set_transform(base_target.np)
viewer["base"].set_transform(
configuration.get_transform_frame_to_world(base_task.body).np
)
[...]
viz.display(q)
t += dt The For frames that are part of the model, we can accept proposals/PRs to extend the How would we go about target frames then? Thinking aloud: Those are usually updated manually on the user side anyway. Maybe we should encourage adding target frames to the model via fixed joints whose placements can be updated manually. I guess those would not affect FK/ID/FD computation times in any significant way, and it would be better practice to handle all frames in the model. |
Beta Was this translation helpful? Give feedback.
That's how it's done indeed, for instance in these IK examples:
The
frame()
function reduces a tad the boilerplate for adding the triad, but I also feel this can be…