Set model and link states of Clearpath Husky-Grizzly in Gazebo
Hi,
I'm working with the Clearpath Husky and Grizzly simulators. And so I have the model loaded in Gazebo. And also the visualization in Rviz.
Now, when I reset the model state of the robot in Gazebo using:
rosservice call /gazebo/set_model_state
the robot is set to that state in the Gazebo simulator but it doesn't reflect the changes in RViz.
EDIT: This is probably becase Rviz is reading off the joint_states which are not reset by the above command. Now, I possibly can use:
rosservice call /gazebo/set_link_state
and achieve what I want. But there are a number of links on the robot model and I don't want to specify all of them because the relationship between all these links is already known (like in the tf tree)
How can I solve this problem? Is there not a relationship between the model state values and the link state values since both are the robot. I guess what I am asking is - how do I reset the joint states?
Thank you.