Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose random seed through CLI #1467

Closed
chapulina opened this issue May 2, 2022 · 1 comment · Fixed by #1618
Closed

Expose random seed through CLI #1467

chapulina opened this issue May 2, 2022 · 1 comment · Fixed by #1618
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@chapulina
Copy link
Contributor

Desired behavior

It should be possible to pass a custom seed to the random number generator from the CLI. For example:

gz sim --seed 123 my_pseudo_random_world.sdf

Alternatives considered

Don't use the CLI and instead instantiate the simulator through a custom C++ program. This way, the seed can be passed to ServerConfig::SetSeed:

https://github.com/ignitionrobotics/ign-gazebo/blob/49fb65fc2a079303bfe47f0a92983179363e0f04/include/ignition/gazebo/ServerConfig.hh#L307-L309

Implementation suggestion

Additional context

It looks like we supported the --seed option on Blueprint, see fe9cbdf. But we missed it when migrating from server_main.cc to ign.cc in 7dbc19e.

@chapulina chapulina added enhancement New feature or request good first issue Good for newcomers labels May 2, 2022
@adityapande-1995 adityapande-1995 self-assigned this Jul 29, 2022
@adityapande-1995
Copy link
Contributor

Addressed here : #1618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants