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.2.tar.gz (21.2 MB view details)

Uploaded Source

Built Distribution

urdfenvs-0.4.2-py3-none-any.whl (21.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: urdfenvs-0.4.2.tar.gz
  • Upload date:
  • Size: 21.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.8.10 Linux/5.15.0-1023-azure

File hashes

Hashes for urdfenvs-0.4.2.tar.gz
Algorithm Hash digest
SHA256 3690b3c46ef27a4c21ee27ebd2de7d0773c9debeb29fdc5c9ba2112696fec743
MD5 fe83d0ac338b9c4bd66d09ac2c2681ee
BLAKE2b-256 0463dcbb8c37b31af4fc33c0f7e234dafcb9b51d40e65012db46b4fa075a2538

See more details on using hashes here.

File details

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

File metadata

  • Download URL: urdfenvs-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 21.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.8.10 Linux/5.15.0-1023-azure

File hashes

Hashes for urdfenvs-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 10ea30ccea52850b92a6542962db3389fdb230dda4452d74bb72034b6645ff25
MD5 cda41ea4e1174ac108b038ed4b504609
BLAKE2b-256 86c19382d3cbb2125c4af4a82798964242a0c109c2487813e9210a4c2a1937a0

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