Can I access model colors from a sensor plugin?

asked 2023-02-21 11:37:35 -0600

Dorteel gravatar image

I'm fairly new to Gazebo, and inexperienced with C++, so I'm not sure how straightforward my goal is. I have a logical camera plugin that publishes model names, poses and orientations to a ROS topic. I would like to modify it so that it also publishes the colors of the models that are perceived or the mesh files. (Diffuse colors should also be fine)

My naive approach would be to create a separate world plugin that would access all the models' color attributes and publish them on a ROS topic, and create another ROS node that aggregates these two sources.

But I wonder if there is an easier and more elegant solution? The best case scenario would be if I could do everything from the logical camera plugin, but is it possible?

Thanks for the help!

edit retag flag offensive close merge delete