Installing gym-gazebo and its dependencies

Let's learn how to install gym-gazebo and its dependencies. We shall try to install these packages as source installations. Follow these steps:

  1. Let's install the necessary dependencies using the following command:
$ sudo apt-get install python-pip python3-vcstool python3-pyqt4 pyqt5-dev-tools libbluetooth-dev libspnav-dev pyqt4-dev-tools libcwiid-dev cmake gcc g++ qt4-qmake libqt4-dev libusb-dev libftdi-dev python3-defusedxml python3-vcstool ros-melodic-octomap-msgs ros-melodic-joy ros-melodic-geodesy ros-melodic-octomap-ros ros-melodic-control-toolbox ros-melodic-pluginlib ros-melodic-trajectory-msgs ros-melodic-control-msgs ros-melodic-std-srvs ros-melodic-nodelet ros-melodic-urdf ros-melodic-rviz ros-melodic-kdl-conversions ros-melodic-eigen-conversions ros-melodic-tf2-sensor-msgs ros-melodic-pcl-ros ros-melodic-navigation ros-melodic-sophu
  1. Now, let's install some Python dependencies:
$ sudo apt-get install python-skimage
$ sudo pip install h5py
$ sudo pip install kera
  1. In case you have a GPU, then install $ pip install tensorflow-gpu; otherwise, install $ pip install tensorflow.
  2. Now, let's clone the gym-gazebo packages for our workspace and compile them:
$ mkdir ~/chapter_8_ws/
$ cd ~/chapter_8_ws/
$ git clone https://github.com/erlerobot/gym-gazebo
$ cd gym-gazebo
$ sudo pip install -e
  1. Once the dependencies are installed, compile the workspace using the bash command:
$ cd gym-gazebo/gym_gazebo/envs/installation
$ bash setup_melodic.bash

Once the compilation is successful, you should see the following command window:

Successful gym-gazebo compilation

The preceding screenshot shows a successful gym-gazebo compilation. We will now test the TurtleBot-2 environment.

..................Content has been hidden....................

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