Gazebo provides different world pose between two simulation instances
I am running Gazebo Simulation with applying constant force for 6 sec multiple times ( two different instances ). I found that, the robot poses are different in two instances. such that, x = 8.515776 in first instance and x = 8.514708 in second instance, and similar for y,z, roll, pitch and yaw. Here, force and simulation time is constant ( green color), while poses are different. Though, the difference looks very small, I want to ask, 1] Is Gazebo non-deterministic ? 2] Can we control this non-deterministic behavior ?
Asked by GB on 2020-12-16 10:51:05 UTC
Answers
In general Gazebo is non-deterministic, as there are multiple threads running concurrently and some components (e.g.: physics engines) with a non-deterministic nature. In your particular example, it's probably the physics engine (ODE by default) the one that potentially has some non-determinism. My two suggestions are:
- Launch Gazebo with the --seed
argument using the same VALUE in both instances.
http://gazebosim.org/tutorials?tut=random_numbers&cat=math
- If that doesn't work try using a different physics engine (Gazebo supports multiple ones). Maybe for your example that physics engine is deterministic.
Asked by Carlos Agüero on 2020-12-18 14:21:23 UTC
Comments