Door opening with a wheeled robot using Reinforcement Learning techniques
- Ubuntu 18.04
- ROS Melodic
- Gazebo 9.0, default installed along with ros-melodic-desktop-full or can be installed by following instruction
- for issue of "Error in REST request" when starting gazebo replace url: https://api.ignitionfuel.org by url: https://api.ignitionrobotics.org inside ~/.ignition/fuel/config.yaml
- Setup ROS Environment (export below variable in ~/.bashrc)
- ROS_HOSTNAME=localhost
- ROS_MASTER_URI=http://localhost:11311
- Gazebo 9.0, default installed along with ros-melodic-desktop-full or can be installed by following instruction
- Install opencv and opencv-python
sudo apt install libopencv-dev
python2 pip install opencv-python==4.2.0.32
- Install Realsense SDK and Realsense-ros
# add repository first, then install realsense sdk
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
# install realsense-ros
sudo apt-get install ros-melodic-realsense2-camera
- tensorflow 2.1.0 (last version support python 2.7) (tensorflow_probability is used in do_training)
pip install tensorflow==2.1.0 tensorflow_probability==0.9.0
- if pip unable to recognize the version, upgrade pip with
pip install pip --upgrade
- gym
pip install gym
- scikit-image
pip install scikit-image
roslaunch do_gazebo door_opening.launch
- office_room_0.world is for Geforce RTX 1070
- offce_room.world is for Geforce RTX 3070, remove one lighting source
- door pulling task
cd ../do_learning/scripts/task_pull
python door_pull_training_ppo.py
- door pushing task
cd ../do_learning/scripts/task_push
python door_push_training_ppo.py
- door traversing task
cd ../do_learning/scripts/task_traverse
python door_traverse_training_ppo.py
tensorboard --logdir=saved_models/task_pull
- the trained policy can be tested in different environments with different appearances and other physical settings
roslanch do_gazebo door_opening.launch world:=office_room_{x}
- modify the argument of 'mu' in mobile_robot.urdf file to change the friction coefficient between robot wheels and ground
roslanch do_gazebo door_opening.launch world:=door_room
The latest environment (office_room.world) is enriched with, customize door model, lighting and specific ode parameters, while old environment (door_room.world) does not have this features, it used the existing door from gazebo model base, which contains imperfect mesh and may result bad dynamic simulation performance, but many previous work are done with old environment.
- change the friction coefficients (mu1, mu2) to 0.1 in "/do_description/urdf/mobile_robot.urdf.xacro"