Skip to content
Riccardo Polvara edited this page Dec 11, 2018 · 4 revisions

Installation

  • ROS installation
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get install ros-kinetic-desktop
sudo rosdep init
rosdep update
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt remove '.*gazebo.*' '.*sdformat.*' '.*ignition-.*'
  • GAZEBO8 installation
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install gazebo8
sudo apt-get install ros-kinetic-gazebo8-ros-pkgs ros-kinetic-gazebo8-ros-control
  • rename cv2.so to another name(cv2-renamed.so) at /opt/ros/kinetic/lib/python2.7/dist-packages/
pip install opencv-python
pip install gym
sudo apt-get install python-skimage
sudo pip install h5py
pip install tensorflow-gpu (if you have a gpu if not then just pip install tensorflow) 
sudo pip install keras
  • For solving the boost package error related to c make
cd /usr/lib/x86_64-linux-gnu
sudo ln -s libboost_python-py35.so libboost_python3.so 
  • Install various dependencies
pip install rospkg catkin_pkg

sudo apt-get install python3-pyqt4

sudo apt-get install \
cmake gcc g++ qt4-qmake libqt4-dev \
libusb-dev libftdi-dev \
python3-defusedxml python3-vcstool \
ros-kinetic-octomap-msgs        \
ros-kinetic-joy                 \
ros-kinetic-geodesy             \
ros-kinetic-octomap-ros         \
ros-kinetic-control-toolbox     \
ros-kinetic-pluginlib	       \
ros-kinetic-trajectory-msgs     \
ros-kinetic-control-msgs	       \
ros-kinetic-std-srvs 	       \
ros-kinetic-nodelet	       \
ros-kinetic-urdf		       \
ros-kinetic-rviz		       \
ros-kinetic-kdl-conversions     \
ros-kinetic-eigen-conversions   \
ros-kinetic-tf2-sensor-msgs     \
ros-kinetic-pcl-ros \
ros-kinetic-navigation

sudo apt-get install ros-kinetic-ar-track-alvar-msgs
sudo apt-get install ros-kinetic-sophus
sudo apt-get install git
  • Install gym-gazebo
cd
git clone https://github.com/erlerobot/gym-gazebo
cd gym-gazebo
sudo pip install -e .
  • Setup
cd gym_gazebo/envs/installation
bash setup_kinetic.bash	
bash turtlebot_setup.bash

You will get few errors, address them like the following:

  • CATKIN IGNORE the 3 mentioned packages
  1. spacenav_node not compiling. CATKIN_IGNOREd
  2. wiimote not compiling. CATKIN_IGNOREd
  3. kobuki_qtestsuite not compiling. CATKIN_IGNOREd
cd ~
touch gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/joystick_drivers/spacenav_node/CATKIN_IGNORE
touch gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/joystick_drivers/wiimote/CATKIN_IGNORE
touch gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/kobuki_desktop/kobuki_qtestsuite/CATKIN_IGNORE
  • Add 3 more packages to the file gazebo.repos locates in ~/gym-gazebo/gym_gazebo/envs. These packages were related to open cv for ros
geometry:
   type: git
   url: https://github.com/ros/geometry
   version: indigo-devel
 geometry2:
   type: git
   url: https://github.com/ros/geometry2
   version: indigo-devel
 vision_opencv:
   type: git
   url: https://github.com/ros-perception/vision_opencv.git
   version: kinetic
  • Install and setup
cd gym_gazebo/envs/installation
bash setup_kinetic.bash	
bash turtlebot_setup.bash

Trubleshooting

  • Import error : No module 'em'---Refer this
pip install empy
  • During compilation you will require to solve some python3 errors related print statements of python2.You can do this with the below commands
2to3 -w ~/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/control_toolbox/cfg/Parameters.cfg

2to3 -w ~/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/spawn_model

2to3 -w ~/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/src/gazebo_ros/gazebo_interface.py
  • parameter error while running turtlebot example
gedit ~/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/turtlebot_simulator/turtlebot_gazebo/launch/includes/kobuki.launch.xml

and remover '--inorder' from line6

Clone this wiki locally