O'Reilly logo

Robot Operating System Cookbook by Kumar Bipin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

There's more…

As discussed previously, we could also create launch files to load more than one instance of the nodelet class. The following launch file, hello_ros.launch, will load two nodelets with the names Hello1 and Hello2:

<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="Hello1" args="load nodelet_hello_ros/Hello standalone_nodelet" output="screen"> 
  </node>             
 
<!-- Starting second nodelet --> 
 
  <node pkg="nodelet" type="nodelet" name="Hello2" args="load nodelet_hello_ros/Hello standalone_nodelet" output="screen"> 
  </node>             
 
</launch> 

We can launch the nodelets with this launch file as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required