Ask Your Question

Revision history [back]

How to know whether the robot turns over

I am new to Gazebo and ROS. I am recently working on a simulation using Gazebo 2 in ROS Indigo. The topic of my research is robot controlling, so it is critical to know whether my commands are appropriate.

Sometimes, a bad command may cause the robot (which is Pioneer3AT in my simulation) to turn over, and that's a situation I need to reset the simulation.

I want to know if there is a way to let me know whether the robot turns over or is about to turn over (big angle with respect to the ground). I note that there is a topic named /gazebo/model_states which shows positions and orientations of the models in the simulation. However, orientations are in Quaternion format, which cannot show the angles robot has rotated in each of the three axises.

Anyone can help?