Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

Updating the visual of a model using the ModelPlugin

I am working on a plugin that updates needs to update the mesh of a model or a scene object. The data of visual and collision links both needs to be updated at the same time.

I tried to implement these updates solely using the ModelPlugin, I can see the changes taking place for the collision but updates to the visual link are never reflected in Gazebo GUI. I can only observe these updates reflected in Gazebo if I move the code that updates the visual link into a VisualPlugin. This means that I have to split my code into two plugins to manipulate a single model.

Is this the expected behavior or there is a better way?

Thanks!

Updating the visual of a model using the ModelPlugin

I am working on a plugin that updates needs to update the mesh of a model or a scene object. The data of visual and collision links both needs to be updated at the same time.

I tried to implement these updates solely using the ModelPlugin, I can see the changes taking place for the collision but updates to the visual link are never reflected in Gazebo GUI. I can only observe these updates reflected in Gazebo if I move the code that updates the visual link into a VisualPlugin. This means that I have to split my code into two plugins to manipulate a single model.

To give better insight you may refer to the current implementation: https://github.com/Samahu/robotics-dynamic-terrain. You should notice that I have two separate plugins to update a single terrain object.

Is this the expected behavior or there is a better way?

Thanks!