What is the `/gazebo/model_state` topic?
Hello, I'm working on the ROS melodic of Ubuntu 18.04.
I'm in the setting of a simulation environment with gazebo, and I need to get all the objects' pose data every time so I'm going to adopt /gazebo/model_states which includes all the pose information in that gazebo environment.
(Just so you know, /gazebo/model_states comes from /gazebo node and its type is gazebo_msgs/ModelStates. And the object literally means the model which is spawned on the gazebo field, like walking_person or SUV car and anything.)
However, I just noticed that not all objects are in /gazebo/model_state at the beginning, although /gazebo/model_state gets all the objects after a few seconds.
I have this kind of feeling that this issue is related to gazebo-spawn probably.
Anyone who've been ever seen this kind of error or familiar with /gazebo/model_states, would you please give me helpful advice?
Thanks in advance. :)
Asked by kane_choigo on 2020-03-26 21:10:26 UTC
Comments
Just to be clear, what do you mean by objects? Are links missing in your model when you access the model_state message?
Asked by christophecricket on 2020-03-27 03:38:42 UTC
@christophecricket Sorry for my poor description, I just modified my text. The issue is
/gazebo/model_statesdoesn't include all the objects (the model of gazebo field likewalking_personorSUV_carand so on.) , although it gets all the state data wrt gazebo's model.Asked by kane_choigo on 2020-03-27 09:06:15 UTC
And you're sure that all these object are individual models in gazebo, and not just individual links in one model? Because then maybe
/gazebo/link_stateshas the poses you wantAsked by christophecricket on 2020-03-27 10:25:50 UTC
@christophecricket yes, they are all independent of each other. I'll also check
/gazebo/link_statestoo.Asked by kane_choigo on 2020-03-27 21:13:50 UTC