ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

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?


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 image MCornelis  ( 2019-12-09 08:43:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

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:

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


So far this is the suggested way to do it (via executing as executable notas node action):

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

Question Tools



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

Seen: 2,889 times

Last updated: Jan 17 '20