Allow passing extra arguments to test runs#33
Open
pepisg wants to merge 1 commit intopolymathrobotics:mainfrom
Open
Allow passing extra arguments to test runs#33pepisg wants to merge 1 commit intopolymathrobotics:mainfrom
pepisg wants to merge 1 commit intopolymathrobotics:mainfrom
Conversation
Collaborator
|
Hey @pepisg thanks for the contribution!! Can you provide an example of how you would set this up within a replay test? Off the bat, I'd like to nest these args somewhere specific to the test. But an example would help clarify the correct usage pattern |
Author
|
It would look something like this: class Run:
def generate_launch_description(
self, replay_run_params: ReplayRunParams
) -> LaunchDescription:
launch_rviz = "True" if _args.launch_rviz else "False"
launch_args = {
"launch_rviz": launch_rviz,
}
return LaunchDescription(
[
IncludeLaunchDescription(
PythonLaunchDescriptionSource(str(nav2_launch_file)),
launch_arguments=launch_args.items(),
),
]
)which then I'd launch as: ros2 run replay_testing replay_test my_test.py --launch-rviz |
Collaborator
|
@pepisg sorry for the late reply here! Yea I like this. I can't decide if it should be nested under something like |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! Thanks a lot for open sourcing this package!
I was setting up some tests involving nav2 costmaps and wanted to expose an argument to chose wether to launch rviz on nav2's launch. This is useful in my case because I want to debug the tests while i create them, but don't want to use rviz when running on my CI system.
I modified the cli to support this.
Sorry in advance if there's already a way of doing this that I missed.