Skip to content

add command line argument for passing extra args to gz sim #694

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

Merged
merged 3 commits into from
Jun 30, 2023

Conversation

M1chaelM
Copy link
Collaborator

@M1chaelM M1chaelM commented Jun 28, 2023

This PR adds the extra_gz_args option to competition.launch.py and passes it through to gz sim. We had something similar in VRX classic so we could use gazebo options without having to implement command line arguments for all of them. (There might be a cleaner way to do this; if so please advise.)

The immediate reason for doing this is so we can use gz sim's recording functionality, which we need to get playback working.

To test

Try passing some arguments through to gz sim:

ros2 launch vrx_gz competition.launch.py headless:=false world:=stationkeeping_task extra_gz_args:="--record_period 0.01 --record_path $HOME/.gz_sim_arg_test --log_overwrite"

Check that logs are written to $HOME/.gz_sim_arg_test.

Bonus: adding support for "paused" argument. To test:

ros2 launch vrx_gz competition.launch.py paused:=true world:=stationkeeping_task

The simulation should start in a paused state.

Copy link
Contributor

@caguero caguero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected.

@M1chaelM M1chaelM merged commit da7aed4 into main Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants