- ROS Melodic: Desktop-Full Install recommended, includes Gazebo 9.0.0 (http://wiki.ros.org/melodic/Installation/Ubuntu).
- Gazebo 9.0.0
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-sophus
sudo 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
cd ~
git clone https://github.com/erlerobot/gym-gazebo
cd gym-gazebo
sudo pip install -e .
cd gym-gazebo/gym_gazebo/envs/installation
bash setup_melodic.bash
terminal 1
cd gym-gazebo/gym_gazebo/envs/installation/
bash turtlebot_setup.bash
terminal 2
cd gym-gazebo/examples/turtlebot
python circuit_turtlebot_lidar_qlearn.py
terminal 1
cd gym-gazebo/gym_gazebo/envs/installation/
bash turtlebot_nn_setup.bash
terminal 2
cd gym-gazebo/examples/turtlebot
python circuit_turtlebot_lidar_qlearn.py
This part of the installation is required only for the environments using DeepQLearning.
# install dependencies
sudo apt-get install gfortran
# install sript specific dependencies (temporal)
sudo apt-get install python-skimage
# install Theano
git clone git://github.com/Theano/Theano.git
cd Theano/
sudo python setup.py develop
#isntall Keras
sudo pip install keras
dot_parser error fix:
sudo pip install --upgrade pydot
sudo pip install --upgrade pyparsing
Follow the instructions here and change $PATH instead of $CUDA_ROOT.
Working on a clean installation of Ubuntu 18.04 using CUDA 10.0.
The following flags are needed in order to execute in GPU mode, using an alias is recommended.
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32
Basic requirements:
- ROS Kinetic (
/rosversion: 1.12.7
) - Gazebo 8.1.1
- Python 3.5.2
- OpenCV3, installed from sources for Python 3 (
git clone https://github.com/Itseez/opencv.git
) - OpenAI gym
sudo pip3 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 \
libbluetooth-dev libspnav-dev \
pyqt4-dev-tools libcwiid-dev \
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 \
ros-kinetic-ar-track-alvar-msgs
#Install Sophus
cd
git clone https://github.com/stonier/sophus -b release/0.9.1-kinetic
cd sophus
mkdir build
cd build
cmake ..
make
sudo make install
echo "## Sophus installed ##\n"
cd
git clone https://github.com/erlerobot/gym-gazebo
cd gym-gazebo
sudo pip3 install -e .
If successful, expect something like this.
sudo pip3 install h5py
sudo apt-get install python3-skimage
# install Theano
cd ~/
git clone git://github.com/Theano/Theano.git
cd Theano/
sudo python3 setup.py develop
#install Keras
sudo pip3 install keras
Issues:
spacenav_node
not compiling.CATKIN_IGNORE
d.wiimote
not compiling.CATKIN_IGNORE
d.kobuki_qtestsuite
not compiling.CATKIN_IGNORE
d.
Agent dependencies:
cd gym_gazebo/envs/installation
bash setup_kinetic.bash
Run the environment with a sample agent:
cd gym_gazebo/examples/scripts_turtlebot
python circuit2_turtlebot_lidar_qlearn.py
Install the Robot Operating System via:
ros-indigo-desktop-full is the only recommended installation.
- Ubuntu: http://wiki.ros.org/indigo/Installation/Ubuntu
- Others: http://wiki.ros.org/indigo/Installation
- Setup your computer to accept software from packages.osrfoundation.org:
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
- Setup keys:
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
- Install Gazebo:
sudo apt-get update
sudo apt-get remove .*gazebo.* && sudo apt-get update && sudo apt-get install gazebo7 libgazebo7-dev
cd
git clone https://github.com/erlerobot/gym-gazebo
cd gym-gazebo
sudo pip install -e .
There are two options to install dependencies: automatic installation or step-by-step installation
Install dependencies running setup_indigo.bash. If you are going to use DQN with Keras, also install Keras and Theano.
cd gym_gazebo/envs/installation
bash setup_indigo.bash
Before running a environment, load the corresponding setup script. For example, to load the Turtlebot execute:
- Turtlebot
cd gym_gazebo/envs/installation
bash turtlebot_setup.bash
Needs to be updated, use automatic installation.
This part of the installation is required only for the environments using DQN.
# install dependencies
sudo apt-get install gfortran
# install sript specific dependencies (temporal)
sudo apt-get install python-skimage
# install Theano
git clone git://github.com/Theano/Theano.git
cd Theano/
sudo python setup.py develop
#isntall Keras
sudo pip install keras
dot_parser error fix:
sudo pip install --upgrade pydot
sudo pip install --upgrade pyparsing
Follow the instructions here and change $PATH instead of $CUDA_ROOT.
Working on a clean installation of Ubuntu 14.04 using CUDA 7.5.
The following flags are needed in order to execute in GPU mode, using an alias is recommended.
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32
Build/fetch the container:
docker pull erlerobotics/gym-gazebo:latest # to fetch the container
# docker build -t gym-gazebo .
Enter the container
docker run -it erlerobotics/gym-gazebo
If you wish to run examples that require plugins like cameras, create a fake screen with:
xvfb-run -s "-screen 0 1400x900x24" bash
If you have an equivalent release of Gazebo installed locally, you can connect to the gzserver inside the container using gzclient GUI by setting the address of the master URI to the containers public address.
export GAZEBO_ID=`docker ps | grep gym-gazebo | awk '{print $1}'`
export GAZEBO_MASTER_IP=$(sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $GAZEBO_ID)
export GAZEBO_MASTER_URI=$GAZEBO_MASTER_IP:11345