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

Recording a bag file from a launch file. #1429

Closed
DLu opened this issue Jul 13, 2023 · 5 comments
Closed

Recording a bag file from a launch file. #1429

DLu opened this issue Jul 13, 2023 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@DLu
Copy link
Contributor

DLu commented Jul 13, 2023

Feature request

Feature description

The syntax for recording a bag file from a launch file always seemed awkward to me.

https://github.com/ros2/examples/blob/1d97c4fc7445554f6f85f63305d424fc017212a0/launch_testing/launch_testing_examples/launch_testing_examples/record_rosbag_launch_test.py#L43-L46

Passing a raw ExecuteProcess command seems to invite errors.

Instead, there should be a custom launch_ros action that does the same thing.

Implementation considerations

Seems like it could be a straightforward extension of ExecuteProcess.

@clalancette
Copy link
Contributor

We think this is possible via registering a launch action. But because this package can't depend on rosbag2 (that would lead to circular dependencies), this would have to be done in rosbag2. I'm going to move the issue over there and mark it as an enhancement.

@clalancette clalancette transferred this issue from ros2/launch_ros Jul 20, 2023
@clalancette clalancette added enhancement New feature or request help wanted Extra attention is needed labels Jul 20, 2023
@MichaelOrlov
Copy link
Contributor

@DLu Not sure what is expected behavior for the rosbag2 in this case. Could you please clarify or put some examples what would be expected behavior?

We might already be taking care of this enhancements suggestion in #1419 please take a look at it.

@emersonknapp
Copy link
Collaborator

#1419 would allow for e.g. (syntax probably not 100% correct)

        launch_ros.actions.Node(
            executable='recorder',
            package='rosbag2',
            name='my_recorder',
            parameters=[{
                'all': True
            }]
        ),

Is that kind of what you were hoping for @DLu , or something different?

@DLu
Copy link
Contributor Author

DLu commented Aug 15, 2023

Yeah, that syntax would work. The alternative would be something like

      rosbag2.launch_actions.Record(
            name='my_recorder',
            parameters=[{
                'topics': LaunchConfiguration('my_topic_list')
            }]
        ),

@MichaelOrlov
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants