|
upkie
13.2.0
Open-source wheeled biped robots
|
Upkie has environments compatible with the Gymnasium API. The name of an environment is:
where <Robot> is the robot name, <Backend> selects a physics simulator or a robot spine, and <ActObs> defines the action and observation spaces in which to interact with the robot. All combinations are available. See all environments below. For instance, Upkie-PyBullet-Pendulum simulates an Upkie in PyBullet and exposes it as a wheeled inverted pendulum, while Upkie-Spine-Pendulum runs the same agent code on the real robot.
While each environment has its own observation and action spaces, all of them also report full spine observations in their info dictionaries.
The robot sets the model (URDF) used by the backend: its kinematics, inertias and joint limits.
upkie package.cookie_description package, which you can install with pip install upkie[cookie].The backend is what runs on the other side of the environment: a simulator, a spine process, or a mock for testing. Since environments are backend-agnostic, the same agent code runs on any of them.
regulate_frequency=False) and in parallel across processes (e.g. with Gymnasium vector environments), which makes it the backend of choice for reinforcement learning. It requires the pybullet package. Options include gui to toggle the simulator window and inertia_variation for domain randomization.Spine environment. It runs on a single CPU thread at the spine's frequency.The last part of the name selects how the agent interacts with the robot, from low-level servo commands to high-level velocity commands.
| Robot | Action and observation spaces | PyBullet backend | Spine backend | Mock backend |
|---|---|---|---|---|
| Upkie | Servos | Upkie-PyBullet-Servos | Upkie-Spine-Servos | Upkie-Mock-Servos |
| Upkie | Gyropod | Upkie-PyBullet-Gyropod | Upkie-Spine-Gyropod | Upkie-Mock-Gyropod |
| Upkie | Pendulum | Upkie-PyBullet-Pendulum | Upkie-Spine-Pendulum | Upkie-Mock-Pendulum |
| Upkie | BaseVelocity | Upkie-PyBullet-BaseVelocity | Upkie-Spine-BaseVelocity | Upkie-Mock-BaseVelocity |
| Cookie | Servos | Cookie-PyBullet-Servos | Cookie-Spine-Servos | Cookie-Mock-Servos |
| Cookie | Gyropod | Cookie-PyBullet-Gyropod | Cookie-Spine-Gyropod | Cookie-Mock-Gyropod |
| Cookie | Pendulum | Cookie-PyBullet-Pendulum | Cookie-Spine-Pendulum | Cookie-Mock-Pendulum |
| Cookie | BaseVelocity | Cookie-PyBullet-BaseVelocity | Cookie-Spine-BaseVelocity | Cookie-Mock-BaseVelocity |
Environments are registered with Gymnasium by calling upkie.envs.register(). They can then be created with gymnasium.make(), passing environment, wrapper and backend options as keyword arguments: