Spawning the robot in Gazebo
The first step of adapting the URDF for Gazebo was crucial, as without this, the robot either wouldn’t appear on Gazebo or behave incorrectly.
Now that the URDF is done (and has been verified in RViz), we can spawn the robot in Gazebo. In this section, you will see what commands you need to run, and then we will create another package with a launch file to start everything.
Here is what we will do:
- Run the
robot_state_publisher
node with the URDF as a parameter. - Start the Gazebo simulator.
- Spawn the robot in Gazebo.
Let’s start this with the terminal commands.
Spawning the robot from the terminal
As usual, before creating a launch file, we will run each command one by one in different terminals, enabling us to clearly understand what we need to run, with all the necessary details.
Open three terminals to start all the commands.
The first thing to start is the robot_state_publisher
node. This is what...