Ask Your Question

ros2 bag launch

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

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?


edit retag flag offensive close merge delete


Are you talking about something like this:

        node_executable=' ',
        node_name='rosbag2_node ',
        arguments=[' ', ' '],
        parameters=[{ ' ': }],

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 imageMCornelis ( 2019-12-09 08:43:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

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

jacobperron gravatar image

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

I missed this question earlier, but I've answered a duplicate question here:

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

Your Answer

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

Add Answer

Question Tools



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

Seen: 61 times

Last updated: Jan 17