Skip to Content
Robot Operating System Cookbook
book

Robot Operating System Cookbook

by Kumar Bipin
June 2018
Intermediate to advanced
484 pages
11h 36m
English
Packt Publishing
Content preview from Robot Operating System Cookbook

Building and running nodelets

We will make the entry for the source code files in CMakeLists.txt, so that we can build a nodelet package:

## Declare a cpp library 
 add_library(nodelet_hello_ros 
   src/hello_ros.cpp 
 ) 
 
## Specify libraries to link a library or executable target against 
 target_link_libraries(nodelet_hello_ros 
   ${catkin_LIBRARIES} 
 ) 

Consequently, we could build the package using catkin_make and, if the build is successful, it would generate a shared object libnodelet_hello_world.so file, which is indeed a plugin.

The following commands can be used to start the nodelet manager:

$ roscore
$ rosrun nodelet nodelet manager __name:=nodelet_manager

If nodelet manager runs successfully, we will see a message as shown in the following screenshot: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mobile Intelligent Autonomous Systems

Mobile Intelligent Autonomous Systems

Jitendra R. Raol, Ajith K. Gopal
Wheeled Mobile Robotics

Wheeled Mobile Robotics

Gregor Klancar, Andrej Zdesar, Saso Blazic, Igor Skrjanc

Publisher Resources

ISBN: 9781783987443Supplemental Content