Step 8 - Creating launch files for nodelets

We can also write launch files to load more than one instance of the nodelet class. The following launch file will load two nodelets with the names test1 and test2, and we can save it with a name hello_world.launch:

<launch> <!-- Started nodelet manager --> <node pkg="nodelet" type="nodelet" name="standalone_nodelet" args="manager" output="screen"/> <!-- Starting first nodelet --> <node pkg="nodelet" type="nodelet" name="test1" args="load nodelet_hello_world/Hello standalone_nodelet" output="screen"> </node> <!-- Starting second nodelet --> <node pkg="nodelet" type="nodelet" name="test2" args="load nodelet_hello_world/Hello standalone_nodelet" output="screen"> </node> ...

Get ROS Programming: Building Powerful Robots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.