ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Is the gazebo simulator deterministic

asked 2011-08-29 11:28:33 -0500

updated 2014-11-22 17:05:19 -0500

ngrennan gravatar image

Can anybody confirm whether the gazebo simulator, and the sensors in simulation as used in ROS are deterministic?

For example, is the PR2 guaranteed to get the same sensor measurements if instantiated the same way.

Edit: As a concrete example - suppose the PR2 is instantiated and in front of it a table and few objects on the table (all created using spawn_model from the same launch file). Example sensor use is the pr2_tabletop_object_detector and example motor control is the pr2_pick_and_place_manager. Assume that the last two are deterministic given the same information from the basic robot sensors. Can we expect the sensor information, and the effect of robot actions to be the same?

edit retag flag offensive close merge delete


Hi, please be a little bit more specific about the scenario you are trying to reproduce? E.g. is dynamics involved? is the information transmitted over ros nodes? etc. thanks.
hsu gravatar image hsu  ( 2011-08-29 11:52:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-08-29 13:03:40 -0500

hsu gravatar image

What is your "deterministic" requirement? E.g. Same mantissa/exponent for all rigid body states? Identical sensor generation for all the Pixel/Ray traces? Or Behavioral, i.e. pick up the coke can again :) ?

With regards to gazebo's LCP solutions for constrained rigid body dynamics, I am sure you are familiar with "jittery" states it creates (try rxplot one of the joint_states topics). The jitters are deterministic if given exactly the same initial conditions, environmental inputs and with the same timing.

In the scenario you described above, if by "deterministic" you imply precisely the same world state down to machine precision, then no. Given all the higher level components (ros nodes outside of gazebo) are asynchronous, timing of executions vary in sim/hardware and is dependent on cpu load, coupled with jitters from the LCP solution yields non-deterministic behavior.

edit flag offensive delete link more


Thank you. I was wandering more about the jitters- and supposed they are deterministic but wanted to double check. Beyond simulation state, I doubt anyone can assume determinism in robotics.
Dimitar Simeonov gravatar image Dimitar Simeonov  ( 2011-08-29 13:11:12 -0500 )edit

Question Tools


Asked: 2011-08-29 11:28:33 -0500

Seen: 915 times

Last updated: Aug 29 '11