Giter Site home page Giter Site logo

upkie's Introduction

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

upkie's People

Contributors

stephane-caron avatar pgraverdy avatar dependabot[bot] avatar ubgk avatar vivianeledoux avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.