Skip to main content

Upkie wheeled biped robot

CI Build instructions Documentation Coverage PyPI version Chat

Upkie is a fully open source self-balancing wheeled biped robot. It has wheels for balancing, and legs to go off-road or negotiate uneven terrains. Upkies are designed to be buildable at home with tools and components ordered online, like mjbots actuators. Motion control runs onboard the robot's Raspberry Pi.

This repository contains all the software and instructions required to build and operate an Upkie. Development can be done in Python or C++, on Linux or macOS. Questions are welcome in the Chat and Discussions forum.

Installation

To code for Upkie in Python, just install:

pip install upkie

This Python interface is already fast enough for real-time control. If later on you want to optimize parts of your code, you can move them to C++ spines.

Simulation

Assuming you have a C++ compiler (setup one-liners: Fedora, Ubuntu), you can run an Upkie simulation right from the command line. It won't install anything on your machine, everything will run locally from the repository:

git clone https://github.com/upkie/upkie.git
cd upkie
./start_pid_balancer.sh

Click on the robot in the simulator window to apply external forces.

Example

You can develop your own agent using the Gymnasium environments distributed in upkie.envs. For example, here is a simple proportional-feedback balancer:

import gymnasium as gym
import upkie.envs

upkie.envs.register()

with gym.make("UpkieGroundVelocity-v3", frequency=200.0) as env:
    observation = env.reset()
    action = 0.0 * env.action_space.sample()
    for step in range(1_000_000):
        observation, reward, done, _ = env.step(action)
        if done:
            observation = env.reset()
        pitch = observation[0]
        action[0] = 10.0 * pitch

To test this agent on your computer, run the agent and simulation spine in two separate processes: python this_agent.py in one shell, and ./start_simulation.sh in the other.

To run this agent on the robot, scp the script to the Raspberry Pi, start a pi3hat spine and execute the script on the Pi itself.

To go further

Metadata

Release files for upkie 3.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for upkie 3.3.0
File Size Uploaded
upkie-3.3.0.tar.gz 252.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for upkie 3.3.0
File Interpreter ABI Platform
upkie-3.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 315.4 kB

Release files / upkie-3.3.0.tar.gz

Download URL upkie-3.3.0.tar.gz
Size 252.4 kB
Tags Source
SHA-256 checksum
How to use checksums
df0c70c9a4c11f68a4f852df97f7d9789c08dfb8376750aaef677c0f51b3a891
BLAKE2b-256 checksum
How to use checksums
e9b6435a5b8c0b3ceea1d8a772dcef6a75f83242918cbe24a73a3fbff4c587dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / upkie-3.3.0-py3-none-any.whl

Download URL upkie-3.3.0-py3-none-any.whl
Size 63.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a8e1b1197cbd354a1130b0be9cd127f8cc3f38e0c144eb19cc98ad871290997
BLAKE2b-256 checksum
How to use checksums
9c7f529f8381501b3609f3da1909eea1d949351980a1257b4691ad8ff4415b9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release history Release notifications | RSS feed

12.0.0

2 release files

10.1.0

2 release files

10.0.0

2 release files

9.0.1

2 release files

9.0.0

2 release files

8.1.1

2 release files

8.1.0

2 release files

8.0.0

2 release files

7.0.0

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.2.0

2 release files

5.1.0

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.0.0

2 release files

3.4.0

2 release files

This release

3.3.0 This release

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page