- Notifications
You must be signed in to change notification settings - Fork281
Refer tohttps://github.com/AcutronicRobotics/gym-gazebo2 for the new version
License
GPL-3.0, Unknown licenses found
Licenses found
erlerobot/gym-gazebo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
THIS REPOSITORY IS DEPRECATED, REFER TOhttps://github.com/AcutronicRobotics/gym-gazebo2 FOR THE NEW VERSION.
This work presents an extension of the initial OpenAI gym for robotics using ROS and Gazebo. A whitepaper about this work is available athttps://arxiv.org/abs/1608.05742. Please use the following BibTex entry to cite our work:
@article{zamora2016extending, title={Extending the OpenAI Gym for robotics: a toolkit for reinforcement learning using ROS and Gazebo}, author={Zamora, Iker and Lopez, Nestor Gonzalez and Vilches, Victor Mayoral and Cordero, Alejandro Hernandez}, journal={arXiv preprint arXiv:1608.05742}, year={2016}}
gym-gazebo
is a complex piece of software for roboticists that puts together simulation tools, robot middlewares (ROS, ROS 2), machine learning and reinforcement learning techniques. All together to create an environment whereto benchmark and develop behaviors with robots. Setting upgym-gazebo
appropriately requires relevant familiarity with these tools.
Code is available "as it is" and currently it's not supported by any specific organization. Community support is availablehere. Pull requests and contributions are welcomed.
The following are some of the gazebo environments maintained by the community usinggym-gazebo
. If you'd like to contribute and maintain an additional environment, submit a Pull Request with the corresponding addition.
Name | Middleware | Description | Observation Space | Action Space | Reward range |
---|---|---|---|---|---|
![]() GazeboCircuit2TurtlebotLidar-v0 | ROS | A simple circuit with straight tracks and 90 degree turns. Highly discretized LIDAR readings are used to train the Turtlebot. Scripts implementingQ-learning andSarsa can be found in theexamples folder. | |||
![]() GazeboCircuitTurtlebotLidar-v0.png | ROS | A more complex maze with high contrast colors between the floor and the walls. Lidar is used as an input to train the robot for its navigation in the environment. | TBD | ||
GazeboMazeErleRoverLidar-v0 | ROS,APM | Deprecated | |||
GazeboErleCopterHover-v0 | ROS,APM | Deprecated |
The following table compiles a number of other environments thatdo not havecommunity support.
Refer toINSTALL.md
In the root directory of the repository:
sudo pip install -e.
- Load the environment variables corresponding to the robot you want to launch. E.g. to load the Turtlebot:
cd gym_gazebo/envs/installationbash turtlebot_setup.bash
Note: all the setup scripts are available ingym_gazebo/envs/installation
- Run any of the examples available in
examples/
. E.g.:
cd examples/turtlebotpython circuit2_turtlebot_lidar_qlearn.py
To see what's going on in Gazebo during a simulation, run gazebo client. In order to launch thegzclient
and be able to connect it to the runninggzserver
:
- Open a new terminal.
- Source the corresponding setup script, which will update theGAZEBO_MODEL_PATH variable: e.g.
source setup_turtlebot.bash
- Export theGAZEBO_MASTER_URI, provided by thegazebo_env. You will see that variable printed at the beginning of every script execution. e.g.
export GAZEBO_MASTER_URI=http://localhost:13853
Note: This instructions are needed now sincegazebo_env
creates a random port for the GAZEBO_MASTER_URI, which allows to run multiple instances of the simulation at the same time. You can remove the following two lines from the environment if you are not planning to launch multiple instances:
os.environ["ROS_MASTER_URI"] ="http://localhost:"+self.portos.environ["GAZEBO_MASTER_URI"] ="http://localhost:"+self.port_gazebo
Finally, launch gzclient.
gzclient
Display a graph showing the current reward history by running the following script:
cd examples/utilitiespython display_plot.py
HINT: use--help
flag for more options.
Sometimes, after ending or killing the simulationgzserver
androsmaster
stay on the background, make sure you end them before starting new tests.
We recommend creating an alias to kill those processes.
echo"alias killgazebogym='killall -9 rosout roslaunch rosmaster gzserver nodelet robot_state_publisher gzclient'">>~/.bashrc
About
Refer tohttps://github.com/AcutronicRobotics/gym-gazebo2 for the new version
Topics
Resources
License
GPL-3.0, Unknown licenses found
Licenses found
Stars
Watchers
Forks
Releases
Packages0
Languages
- Python96.8%
- Shell1.8%
- Dockerfile1.4%