How to know if a model is selected in gazebo scene?

asked 2022-09-14 01:25:17 -0500

gzp-gz gravatar image


I wrote a WorldPlugin to try to get a selected robot model in gazebo scene. In the gazebo scene, I have selected a robot (I spawn 3 robots in the gazebo scene), in plugin code, I call modelPtr->IsSelected() to check if it is the selected robot. But the problem is that IsSelected() function returned false. I wonder how I can determine the selection status in gazebo WorldPlugin? Could you give me some suggestions about this? Thank you very much.

edit retag flag offensive close merge delete