How to setup gym-gazebo for RL using UR10?

asked 2017-05-09 08:31:08 -0500

Hello,

So I have my UR10 up and running in the gazebo ( had to go through several steps- if anyone needs a help on that can ask here). Next, I want to setup my reinforcement learning agent and connect this to my robot model in the gazebo. I came across the gym-gazebo platform that allows doing the same - http://docs.erlerobotics.com/simulati... . However, this package is configured for specific robot systems. How can I set it up for UR10?

USING ROS INDIGO; UBUNTU TRUSTY 14.04; Gazebo multi-robot simulator, version 2.2.3

To be more precise if you check go to: gym-gazebo/gym_gazebo/envs/installation , there are setup.bash files for various robots. I can think of seeing them as a sample and try to build my own bash script for UR10.

#!/bin/bash

if [ -z "$GAZEBO_MODEL_PATH" ]; then
bash -c 'echo "export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:"`pwd`/../assets/models >> ~/.bashrc'
else
bash -c 'sed "s,GAZEBO_MODEL_PATH=[^;]*,'GAZEBO_MODEL_PATH=`pwd`/../assets/models'," -i ~/.bashrc'
fi

#Load turtlebot variables. Temporal solution
chmod +x catkin_ws/src/turtlebot_simulator/turtlebot_gazebo/env-hooks/25.turtlebot-gazebo.sh.em
bash catkin_ws/src/turtlebot_simulator/turtlebot_gazebo/env-hooks/25.turtlebot-gazebo.sh.em

#add turtlebot launch environment variable
if [ -z "$GYM_GAZEBO_WORLD_MAZE" ]; then
bash -c 'echo "export GYM_GAZEBO_WORLD_MAZE="`pwd`/../assets/worlds/maze.world >> ~/.bashrc'
else
bash -c 'sed "s,GYM_GAZEBO_WORLD_MAZE=[^;]*,'GYM_GAZEBO_WORLD_MAZE=`pwd`/../assets/worlds/maze.world'," -i ~/.bashrc'
fi
if [ -z "$GYM_GAZEBO_WORLD_CIRCUIT" ]; then
bash -c 'echo "export GYM_GAZEBO_WORLD_CIRCUIT="`pwd`/../assets/worlds/circuit.world >> ~/.bashrc'
else
bash -c 'sed "s,GYM_GAZEBO_WORLD_CIRCUIT=
[^;]*,'GYM_GAZEBO_WORLD_CIRCUIT=`pwd`/../assets/worlds/circuit.world'," -i ~/.bashrc'
fi
if [ -z "$GYM_GAZEBO_WORLD_CIRCUIT2" ]; then
bash -c 'echo "export GYM_GAZEBO_WORLD_CIRCUIT2="`pwd`/../assets/worlds/circuit2.world >> ~/.bashrc'
else
bash -c 'sed "s,GYM_GAZEBO_WORLD_CIRCUIT2=
[^;]*,'GYM_GAZEBO_WORLD_CIRCUIT2=`pwd`/../assets/worlds/circuit2.world'," -i ~/.bashrc'
fi
if [ -z "$GYM_GAZEBO_WORLD_CIRCUIT2C" ]; then
bash -c 'echo "export GYM_GAZEBO_WORLD_CIRCUIT2C="`pwd`/../assets/worlds/circuit2c.world >> ~/.bashrc'
else
bash -c 'sed "s,GYM_GAZEBO_WORLD_CIRCUIT2C=
[^;]*,'GYM_GAZEBO_WORLD_CIRCUIT2C=`pwd`/../assets/worlds/circuit2c.world'," -i ~/.bashrc'
fi
if [ -z "$GYM_GAZEBO_WORLD_ROUND" ]; then
bash -c 'echo "export GYM_GAZEBO_WORLD_ROUND="`pwd`/../assets/worlds/round.world >> ~/.bashrc'
else
bash -c 'sed "s,GYM_GAZEBO_WORLD_ROUND=
[^;]*,'GYM_GAZEBO_WORLD_ROUND=`pwd`/../assets/worlds/round.world'," -i ~/.bashrc'
fi

#copy altered urdf model
cp -r ../assets/urdf/kobuki_urdf/urdf/ catkin_ws/src/kobuki/kobuki_description

#copy laser mesh file
cp ../assets/meshes/lidar_lite_v2_withRay.dae catkin_ws/src/kobuki/kobuki_description/meshes

exec bash # reload bash

Above as we see turtle bot variables loading section. Where can I get those similar files for UR10? Or do I need them?

Kindly help me set this up. Any help will be appreciated.

edit retag flag offensive close merge delete

Comments

Did you ever find a solution to this? I am in the exact same situation and am a bit confused with the gym-gazebo and openai options.

bigum gravatar image bigum  ( 2019-04-30 17:26:13 -0500 )edit