Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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?