Understanding how to publish TFs with our URDF
We will start this chapter by understanding what nodes and parameters we need to start in order to publish the TFs for our application. Then, with this knowledge, we will be able to start the required nodes, package the application, and write a launch file.
As we often did in this book, we will start with a discovery phase, through experimentation. I recommend that you run all the commands as you read the section.
The robot_state_publisher node
Basically, in this chapter, we want to replicate what was done with the urdf_tutorial
package so we can publish the TFs by ourselves. Let’s then start the display.launch.py
launch file again, using the URDF from the previous chapter, and do some introspection:
$ ros2 launch urdf_tutorial display.launch.py model:=/home/<user>/my_robot.urdf.xacro
In a second terminal, start rqt_graph
to visualize the nodes that are currently running. Refresh the view if the screen is empty...