To load your nodelets you must have loaded a nodelet manager first.
Load the nodelet_manager
(you can put the name you want but make sure all your nodelets use the same manager)
rosrun nodelet nodelet manager __name:=nodelet_manager
Then you can load your nodelets (again replace nodelet_manager with the name you chose previously), if you have two nodelets you have to run :
rosrun nodelet nodelet load PACKAGE_OF_YOUR_NODELET/NODELET1 nodelet_manager
rosrun nodelet nodelet load PACKAGE_OF_YOUR_NODELET/NODELET2 nodelet_manager
Using launch file :
< node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager"/>
< node pkg="nodelet" type="nodelet" name="NODELET1"
args="load PACKAGE_OF_YOUR_NODELET/NODELET1 nodelet_manager">
< /node>
< node pkg="nodelet" type="nodelet" name="NODELET2"
args="load PACKAGE_OF_YOUR_NODELET/NODELET2 nodelet_manager">
< /node>
You can also set a parameter or remap some topics as in the tutorial.
I personnaly prefer to use launch files.
But always remember that the nodelet manager is mandatory here and if by mistake you load your nodelets in two different nodelet_manager
you will lose the specificity of the nodelets and they will have the same behavior as a node.
Originally posted by Delb with karma: 3907 on 2018-09-24
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by Delb on 2018-09-25:
I forgot to add this useful command :
rosrun nodelet declared_nodelets
This will list all the available nodelets on your system (from wiki section 2)