Starting all nodes from the terminal
Before we package the application and write a launch file, let’s start all the nodes we need in the terminal. Doing this is a best practice so that you can make sure your application is working properly. Then, creating the package and the launch file will be easier, as you already know all the elements you need to include.
We will use the result from the previous section and start the robot_state_publisher
node, as well as the joint_state_publisher
node. In addition to that, we will start RViz (this is optional and only used to visualize the robot model).
Publishing the TFs from the terminal
Let’s publish the TFs. For that, we will open two terminals.
In the first one, start the robot_state_publisher
node. The package and executable names for this node are identical. To provide the robot_description
parameter, you will have to use this syntax: "$(
xacro <path_to_urdf>)"
.
In Terminal 1, run the following...