Ask Your Question
0

ros2 bag launch

asked 2019-12-06 12:34:17 -0500

Poseidonius gravatar image

Hi ROS2 enthusiasts,

I would like to use ros2bag from a launch file. How do I realize it? Non of the ros2bag or rosbag2 packages seems to have a launch configuration yet.

Any idea?

Sebastian

edit retag flag offensive close merge delete

Comments

Are you talking about something like this:

Node(
        package='rosbag2',
        node_executable=' ',
        node_name='rosbag2_node ',
        arguments=[' ', ' '],
        parameters=[{ ' ': }],
        output='screen'),

If you know how to start a node from terminal then you can also launch it in a launchfile. You can simply add the Node(), to the other launch_descriptions inside:

return LaunchDescription([
...
])

You will just have to import

from launch_ros.actions import Node

I left the fields blank, because I haven't used rosbag2 and don't know the name of the executables or parameters etc., but hopefully this helps. If I misunderstood your question please let me know.

MCornelis gravatar image MCornelis  ( 2019-12-09 08:43:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-01-17 17:46:37 -0500

jacobperron gravatar image

updated 2020-01-17 17:46:56 -0500

I missed this question earlier, but I've answered a duplicate question here: https://answers.ros.org/question/3417...

I'm not sure it's the ideal approach for rosbag2, but you can launch an ExecuteProcess for any ros2 CLI.

edit flag offensive delete link more

Comments

So far this is the suggested way to do it (via executing as executable notas node action): https://github.com/ros2/rosbag2#using...

khaiyichin gravatar image khaiyichin  ( 2021-02-22 16:27:55 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-12-06 12:34:17 -0500

Seen: 248 times

Last updated: Jan 17 '20