tesseract-robotics / tesseract_python

This contains python wrappers for both Tesseract and Tesseract Planning packages
https://tesseract-robotics.github.io/tesseract_python/
28 stars 13 forks source link

The viewer can not display the marker. #66

Closed leiyu2023 closed 10 months ago

leiyu2023 commented 10 months ago

env: win11 viewer: 0.2.5

I successfully displayed the robotic arm in the viewer and attempted to add line segments using the code below. However, after running the code, the line segments are not being displayed in the viewer.

viewer = TesseractViewer()
viewer.update_environment(t_env, [0, 0, -10])
viewer.start_serve_background() 
viewer.add_lines_marker([[0, 0, 0], [10, 10, 10]], color=[[220, 20, 60, 1]],update_now=True)

image

@johnwason
This problem has been bothering me for some time.Can you give me some suggestions?

johnwason commented 10 months ago

By default the marker will be added to the "world" link. It looks like your URDF file does not have a "world" link, so it is not able to add to the scene.

Try something like:

viewer.add_lines_marker([[0, 0, 0], [10, 10, 10]], color=[[220, 20, 60, 1]],update_now=True,parent_link="my_link")

where my_link is replaced with a valid link name in your URDF.

leiyu2023 commented 10 months ago

Thanks to your suggestion, this issue has been effectively resolved.