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

Compiling and running the TF

In the preceding subsection, we had to learn to develop the code for the TF demo application. To compile this, we will have to make an entry in CMakeLists.txt about source files and compilation rules:

add_executable(turtle_tf_broadcaster src/turtle_tf_broadcaster.cpp) 
target_link_libraries(turtle_tf_broadcaster ${catkin_LIBRARIES}) 
 
add_executable(turtle_tf_listener src/turtle_tf_listener.cpp) 
target_link_libraries(turtle_tf_listener ${catkin_LIBRARIES}) 

Now, we can build the package from the top folder of the workspace using catkin_make. If everything goes well, we will have binary files called turtle_tf_broadcaster and turtle_tf_listner in our devel/lib/ folder. To start the application, we will create a launch ...

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