Home | Tutorials | Wiki | Issues
Ask Your Question
0

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

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

Nick Eckenstein gravatar image

Hello,

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
2

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

nkoenig gravatar image

This may the tutorial you are looking for: http://gazebosim.org/wiki/Tutorials/1...

edit flag offensive delete link more

Comments

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 -0600 )edit

I've made an [issue](https://bitbucket.org/osrf/gazebo/issue/876/reset-random-number-generator) out of this. Please track updates there.

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

Great, thanks!

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

Question Tools

1 follower

Stats

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

Seen: 394 times

Last updated: Oct 06 '13