Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to attach dynamic visual to moving model through Gazebo ROS plugin?

asked 2017-06-27 01:58:29 -0500

V gravatar image

I am trying to implement brake lights on a URDF model using a Gazebo ROS plugin which utilizes Gazebo transport to publish a ~/visual message. The message works, and I can spawn a visual in the world, but the ".set_parent_name" tag appears to ignore anything placed inside, including fully scoped names of links (not ones with fixed joints) present in the model. As a result, the spawned visual is not connected to the model and remains static in the world. The Haptix and DRCSIM tutorials and source code provide some guidance, but I cannot find a complete solution. Adding a visual plugin inside the <visual> tag of an SDF world file works fine for manipulating visuals of models inside the world, but so far all of the iterations I've tried with this plugin inside a URDF file have been unsuccessful. Does anyone have an idea how to either add a visual (link with no collision) or modify the visual elements of an existing link using a model plugin inside a URDF file?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-05 14:11:30 -0500

iche033 gravatar image

if you're just trying to attach lights to link, there is the AttachLightPlugin.

If you want to attach visuals, try setting the parent id instead of the parent name and see if that works. The parent id will be the link's id; you can get it using Link::GetId()

edit flag offensive delete link more

Comments

Thank you! I will try this!

V gravatar imageV ( 2017-07-22 13:06:31 -0500 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2017-06-27 01:58:29 -0500

Seen: 634 times

Last updated: Jul 05 '17