Getting ready

However, Gazebo is independent of ROS and is available as a standalone package for Ubuntu. In this section, we will learn how to interface Gazebo and ROS. We will also discuss how to use 3D models developed in the previous section and include a laser sensor and a camera there. We will also discuss how to control and move the robot in a virtual environment.

We will use the mobile robot model developed in the previous section, although we will not include the arm robot to keep things simple. First of all, we have to confirm the Gazebo installation by executing the following command:

$ gazebo 

We also have to install ROS packages to interface Gazebo, before we start working with Gazebo in the ROS environment, using the following command:

$ sudo apt-get install ros-kinetic-gazebo-ros-pkgsros-kinetic-Gazebo-ros-control

Let's hope everything works well. Afterward, we can see that the Gazebo GUI opens after executing this command. Moreover, we can also confirm the integration of Gazebo with ROS using the following commands which pop up the Gazebo GUI:

$ roscore
$ rosrun gazebo_ros gazebo
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.30.232