Upkie is an open source wheeled biped robot. It has wheels for balancing and legs to negotiate uneven terrains. Upkies are designed to be buildable using only tools and components ordered online, like mjbots actuators. You can develop in Python or C++, on Linux or macOS, then deploy your agent to the robot's Raspberry Pi. Here are some videos of Upkies in action.
This repository contains all the materials needed to build and control an Upkie: build instructions, documentation and examples. Questions are welcome in the Chat and Discussions forum.
conda install -c conda-forge upkie
pip install upkie
Let's start a Bullet simulation spine:
./start_simulation.sh
Click on the robot in the simulator window to apply external forces. Once the simulation spine is running, we can control the robot using one of its Gymnasium environments, for instance:
import gymnasium as gym
import numpy as np
import upkie.envs
upkie.envs.register()
with gym.make("UpkieGroundVelocity-v4", frequency=200.0) as env:
observation, _ = env.reset()
gain = np.array([10.0, 1.0, 0.0, 0.1])
for step in range(1_000_000):
action = gain.dot(observation).reshape((1,))
observation, reward, terminated, truncated, _ = env.step(action)
if terminated or truncated:
observation, _ = env.reset()
The 9123 Python code is the same whether we run in simulation or on a real Upkie. Head over to the examples directory for more use cases.
Upkie has environments compatible with the Gymnasium API, for instance:
UpkieGroundVelocity
: keep legs straight and balance with the wheels.UpkieServoPositions
: joint position control.UpkieServoTorques
: joint torque control.UpkieServos
: control joint servos directly, including feedforward torques, position and velocity feedback.
Check out the full list of environments for details.
Larger Upkie agents have their own repositories:
- MPC balancer: balance in place using model predictive control.
- Pink balancer: a more advanced agent that can crouch and stand up while balancing.
- PPO balancer: balance in place with a policy trained by reinforcement learning.
- PID balancer: legacy agent used to test new Upkies with minimal dependencies.
Head over to the new_agent template to create your own, and feel free to open a PR here to add your agent to the list.
Contributions are welcome to both the hardware and software of Upkies! If you are a developer/maker with some robotics experience looking to hack on open source, check out the contribution guidelines. On the software side, you can also report any bug you encounter in the issue tracker.
If you built an Upkie or use parts of this project in your works, please cite the project and its contributors:
@software{upkie,
title = {{Upkie open source wheeled biped robot}},
author = {Caron, St\'{e}phane and Perrin-Gilbert, Nicolas and Ledoux, Viviane and G\"{o}kbakan, \"{Umit} Bora and Raverdy, Pierre-Guillaume and Raffin, Antonin and Tordjman--Levavasseur, Valentin},
url = {https://github.com/upkie/upkie},
license = {Apache-2.0},
version = {7.0.0},
year = {2025}
}
- Awesome Open Source Robots: Upkies are one among many open-source open-hardware robot initiative: check out the others!
- Open Dynamic Robot Initiative: An open torque-controlled modular robot architecture for legged locomotion research.