In this package, generic robot for simple tests are made available for gym environments.
This package depends on casadi for dynamics generation and gym. Dependencies will be installed through pip installation, see below. It uses the lightweight implementation for forward kinematics in casadi.
Clone the repository
git clone git@github.com:maxspahn/gym_envs_planar.git
If you are not familiar with poetry see Poetry Installation. Once poetry is installed you can run
poetry install
If you want the motion planning scenes
poetry install -E scenes
The virtual environment with everything installed is entered with
poetry shell
pip3 install .
When obstacles are required, you must use
pip3 install ".[scenes]"
Environments can be created using the normal gym syntax. For example the below code line creates a planar robot with 3 links and a constant k. Actions are torques to the individual joints.
env = gym.make('nLink-reacher-tor-v0', n=3, dt=0.01, k=2.1)
For a constant controlled torque, the simulation is displayed below: