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

Difference between launch and launch_ros

asked 2019-06-10 06:56:32 -0500

jhassold gravatar image

Possibly a silly question, but here goes: What is the difference between ros2/launch and ros2/launch_ros? When should one be used over the other?

They both have similar names, and (superficially) similar jobs, so I'm a little unclear which one I should be more heavily leaning on when writing ROS 2 launch files.

edit retag flag offensive close merge delete


I'm going to wait for a more authoritative answer, but: the former is a generic library that implements the domain concepts and infrastructure to "launch" (ie: start) multiple processes in a uniform way with support for coordination and monitoring of all those tasks, while the latter is a library/tool that builds on-top of the former and adds ROS-specific domain concepts which makes it usable to start, coordinate and monitor multiple ROS nodes (which also happen to be mappable onto processes).

gvdhoorn gravatar image gvdhoorn  ( 2019-06-10 07:08:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-10 13:38:54 -0500

William gravatar image

launch and launch_testing are ROS agnostic and is used in the core libraries to do testing (e.g. before you have things like rclpy or rclcpp), but launch_ros and launch_testing_ros just add ROS specific concepts to launching and testing, leveraging dependencies like rclpy.

For now, I'd recommend using launch_ros as your dependency for just writing launch files. For testing, I'd recommend launch_testing_ros, but we're thinking about having a "ros2test" or similarly named package that collects all the parts for you in a single package.

This is issue describes the layout of the code a bit:

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-06-10 06:56:32 -0500

Seen: 757 times

Last updated: Jun 10 '19