June 2018
Intermediate to advanced
484 pages
11h 36m
English
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: ...