Skip to main content

Simple simulation environment for robots, based on the urdf files.

Project description

Generic URDF robots

Language grade: Python

Generic URDF robots

In this package, generic urdf robots and a panda gym environment are available. The goal is to make this environment as easy as possible to deploy. Although, we used the OpenAI-Gym framing, these environments are not necessarly restricted to Reinforcement-Learning but rather to local motion planning in general.

Point Robot Point Robot with Keyboard Input Non-Holonomic Robot
Tiago Robot Tiago Robot with Keyboard Input
Panda Robot Albert Robot

Getting Started

This is the guide to quickle get going with urdf gym environments.

Pre-requisites

  • Python >3.6, <3.10
  • pip3
  • git

Installation

You first have to downlad the repository

git clone git@github.com:maxspahn/gym_envs_urdf.git

Then, you can install the package using pip as:

pip3 install .

Optional: Installation with poetry

If you want to use poetry, you have to install it first. See their webpage for instructions docs. Once poetry is installed, you can install the virtual environment with the following commands. Note that during the first installation poetry update takes up to 300 secs.

poetry install

The virtual environment is entered by

poetry shell

Inside the virtual environment you can access all the examples.

Examples

Run example

You find several python scripts in examples/. You can test those examples using the following (if you use poetry, make sure to enter the virtual environment first with poetry shell)

python3 point_robot.py

Replace point_robot.py with the name of the script you want to run.

Use environments

In the examples, you will find individual examples for all implemented robots. Environments can be created using the normal gym syntax. Gym environments rely mostly on three functions

  • gym.make(...) to create the environment,
  • gym.reset(...) to reset the environment,
  • gym.step(action) to step one time step in the environment.

For example, in examples/point_robot.py, you can find the following syntax to make, reset and step the environment.

env = gym.make('pointRobotUrdf-vel-v0', dt=0.05, render=True)
ob = env.reset(pos=pos0, vel=vel0)
ob, reward, done, info = env.step(action)

The id-tag in the make command specifies the robot and the control type. You can get a full list of all available environments using

from gym import envs
print(envs.registry.all())

Go ahead and explore all the examples you can find there.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

urdfenvs-0.4.0.tar.gz (21.1 MB view details)

Uploaded Source

Built Distribution

urdfenvs-0.4.0-py3-none-any.whl (21.2 MB view details)

Uploaded Python 3

File details

Details for the file urdfenvs-0.4.0.tar.gz.

File metadata

  • Download URL: urdfenvs-0.4.0.tar.gz
  • Upload date:
  • Size: 21.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.7.1 Linux/5.15.0-1022-azure

File hashes

Hashes for urdfenvs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d75eed20953d24338cabc13411823e534a90d3d75fd5d3599c889edf13b60b9e
MD5 4e60f48eebbab95efb7adf3b0b7d3bb1
BLAKE2b-256 e03817925614a64787e838b039799aaff985b912040c95dfbaf303cec8686d7a

See more details on using hashes here.

File details

Details for the file urdfenvs-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: urdfenvs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.7.1 Linux/5.15.0-1022-azure

File hashes

Hashes for urdfenvs-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81b2b2f176bd414ecf72bd1d581282fe06cd95585d23762420b84d3f1f45eb23
MD5 89b2ce6493440ed6f7e414b1382c97fb
BLAKE2b-256 347ae65e1cbe5f5136a1c7b2b10a6d113222dbb56144eeebdb22a1367e4439bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page