Gazebo | Ignition | Community
Ask Your Question

Make Gazebo (ODE) deterministic or reset random number generator?

asked 2013-10-01 15:48:44 -0500

Nick Eckenstein gravatar image


I am running a lot(~1000s) of quick simulations one at a time and doing a World::Reset() between each one. Is there some way to ensure that the random numbers generated by Gazebo are the same after each World::Reset()? Can I reset the RNG? If I just set the seed again, will that restart the RNG?

Right now, I have a small (~1 in 1000) chance of the RNG causing the result of my simulation to change - I'd like to fix the random numbers generated so that I can observe the behavior causing my simulation to fail. Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-06 11:58:46 -0500

nkoenig gravatar image

This may the tutorial you are looking for:

edit flag offensive delete link more


Thanks Nate! I've set the seed already. Unfortunately when I reset the world using World::Reset(), the RNG doesn't seem to reset and as a result I can run the same simulation over again and get different results. I would like to be able to reproduce my results and still automate the process of running multiple trials. How do you recommend that I do this?

Nick Eckenstein gravatar imageNick Eckenstein ( 2013-10-07 09:51:02 -0500 )edit

I've made an [issue]( out of this. Please track updates there.

nkoenig gravatar imagenkoenig ( 2013-10-07 11:29:36 -0500 )edit

Great, thanks!

Nick Eckenstein gravatar imageNick Eckenstein ( 2013-10-07 15:37:36 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2013-10-01 15:48:44 -0500

Seen: 611 times

Last updated: Oct 06 '13