Add example to record bagfile, launch variable number of nodes#269
Closed
adityapande-1995 wants to merge 2 commits intomasterfrom
Closed
Add example to record bagfile, launch variable number of nodes#269adityapande-1995 wants to merge 2 commits intomasterfrom
adityapande-1995 wants to merge 2 commits intomasterfrom
Conversation
Signed-off-by: Aditya Pande <aditya050995@gmail.com>
ivanpauno
reviewed
Oct 12, 2021
| launch_test test/examples/check_multiple_node_launch_test.py number_of_nodes:=10 | ||
| ``` | ||
|
|
||
| This test launches multiple nodes, specified by the ``number_of_nodes`` commandline parameter. |
Member
There was a problem hiding this comment.
Suggested change
| This test launches multiple nodes, specified by the ``number_of_nodes`` commandline parameter. | |
| This test launches multiple nodes, specified by the ``number_of_nodes`` command line parameter. |
Suggested change
| This test launches multiple nodes, specified by the ``number_of_nodes`` commandline parameter. | |
| This test launches multiple nodes, specified by the ``number_of_nodes`` commandline parameter. |
| ``` | ||
|
|
||
| This test launches multiple nodes, specified by the ``number_of_nodes`` commandline parameter. | ||
| It then records them to a ``rosbag2`` file, and checks if the nodes were launched correctly, and tha tht e bag file recorded some messages. |
Member
There was a problem hiding this comment.
Suggested change
| It then records them to a ``rosbag2`` file, and checks if the nodes were launched correctly, and tha tht e bag file recorded some messages. | |
| It then records them to a ``rosbag2`` file, and checks if the nodes were launched correctly, and that the bag file recorded some messages. |
Suggested change
| It then records them to a ``rosbag2`` file, and checks if the nodes were launched correctly, and tha tht e bag file recorded some messages. | |
| It then records them to a ``rosbag2`` file, and checks if the nodes were launched correctly, and tha tht e bag file recorded some messages. |
|
|
||
| # Default number of nodes to be launched | ||
| n = 5 | ||
| for item in sys.argv[::-1]: |
Member
There was a problem hiding this comment.
you should use a launch argument instead of this
Member
There was a problem hiding this comment.
instead of parsing argv, you can create a custom Action that uses a LaunchConfiguration substitution named number_of_nodes.
Contributor
Author
|
Moved to ros2/examples#327 |
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.
This PR aims to add an example that shows how to launch a number of nodes defined by a command line parameter, record data to a bag file, and check if it was successful.
Main issue tracking
launch_testingimprovement plan : ros2/launch#531Signed-off-by: Aditya Pande aditya050995@gmail.com