Gazebo | Ignition | Community
Ask Your Question

What does Gazebo use Random number generator for?

asked 2017-08-18 07:34:57 -0600

alienmon gravatar image

In this tutorial on Random Numbers, It says that

Gazebo makes use of a random number generator. By default its seed is set to PID But we can manually set the seed too

for example

Gazebo can be initialized with a random number seed on the command line using the --seed argument:

gazebo --seed <integer>

I tried the command gazebo --seed 9 Well, it opened gazebo , but I do not know what was changed or what was different.

I can't understand the tutorial. What is the random number for?? What does gazebo use it for? What if I change it?

I'm quite new in Gazebo, please help to explain.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-08-21 13:21:38 -0600

iche033 gravatar image

It's used by gazebo/ignition math library for generating random numbers. For example, the rubble plugin uses the random number generator for creating rubbles, and camera noise model uses it to generate random gaussian noise, etc.

It's also passed down to the physics engines if they need it, e.g. in ODE we call dRandSetSeed

edit flag offensive delete link more


what is the meaning of specifying integer e.g. 9 as seed? Other than things you mentioned, the gazebo simulation will behave the same?

alienmon gravatar imagealienmon ( 2017-08-21 23:01:51 -0600 )edit

here's an answer on the seed does: The fork of ODE in gazebo removes a lot of randomness in order to provide a more deterministic behavior. but to be safe, you can set the same seed every time to get repeatable simulations

iche033 gravatar imageiche033 ( 2017-08-22 13:53:41 -0600 )edit

@iche033 Thank you for your answer. Just to confirm..So a seed is where the random number starts from. Random number is used by gazebo for e.g. generating noise, rubbles ,etec?

alienmon gravatar imagealienmon ( 2017-08-23 10:05:08 -0600 )edit

yes that's correct

iche033 gravatar imageiche033 ( 2017-08-23 11:59:47 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-08-18 07:34:57 -0600

Seen: 499 times

Last updated: Aug 21 '17