Ask Your Question

# What does Gazebo use Random number generator for?

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 close merge delete

## 1 Answer

Sort by ยป oldest newest most voted

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

more

## Comments

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

( 2017-08-21 23:01:51 -0500 )edit

here's an answer on the seed does: https://stackoverflow.com/questions/14914595/what-is-a-seed-in-terms-of-generating-a-random-number 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

( 2017-08-22 13:53:41 -0500 )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?

( 2017-08-23 10:05:08 -0500 )edit

yes that's correct

( 2017-08-23 11:59:47 -0500 )edit

## Stats

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

Seen: 369 times

Last updated: Aug 21 '17