upkie


Nameupkie JSON
Version 3.2.0 PyPI version JSON
download
home_pageNone
SummaryPython module to control Upkie wheeled bipeds.
upload_time2024-02-09 10:21:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords wheeled biped robot balance motion control robotics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Upkie wheeled biped robot

[![CI](https://github.com/upkie/upkie/actions/workflows/bazel.yml/badge.svg)](https://github.com/upkie/upkie/actions/workflows/bazel.yml)
[![Build instructions](https://img.shields.io/badge/build-read-brightgreen?logo=read-the-docs&style=flat)](https://github.com/upkie/upkie/wiki)
[![Documentation](https://img.shields.io/badge/docs-read-brightgreen?logo=read-the-docs&style=flat)](https://upkie.github.io/upkie/)
[![Coverage](https://coveralls.io/repos/github/upkie/upkie/badge.svg?branch=main)](https://coveralls.io/github/upkie/upkie?branch=main)
[![PyPI version](https://img.shields.io/pypi/v/upkie)](https://pypi.org/project/upkie/)
[![Chat](https://img.shields.io/badge/matrix-chat-%234eb899)](https://app.element.io/#/room/#tasts-robots:matrix.org)

**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](https://app.element.io/#/room/#tasts-robots:matrix.org) and [Discussions forum](https://github.com/upkie/upkie/discussions).

## Installation

To code for Upkie in Python, just install:

```console
pip install upkie
```

This Python interface is already [fast enough](https://github.com/upkie/vulp#performance) for real-time control. If later on you want to optimize parts of your code, you can move them to C++ [spines](https://upkie.github.io/upkie/spines.html).

## Simulation

Assuming you have a C++ compiler (setup one-liners: [Fedora](https://github.com/upkie/upkie/discussions/100), [Ubuntu](https://github.com/upkie/upkie/discussions/101)), 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:

<img src="https://user-images.githubusercontent.com/1189580/170496331-e1293dd3-b50c-40ee-9c2e-f75f3096ebd8.png" height="100" align="right" />

```console
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:

```python
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](https://upkie.github.io/upkie/spines.html#pi3hat-spine) and execute the script on the Pi itself.

## To go further

- [Build your own Upkie](https://github.com/upkie/upkie/wiki) 🧰
- [Documentation](https://upkie.github.io/upkie/)
- [More examples](https://github.com/upkie/upkie/tree/main/examples)
- [Project log on Hackaday.io](https://hackaday.io/project/185729-upkie-wheeled-biped-robots)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "upkie",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "St\u00e9phane Caron <stephane.caron@normalesup.org>",
    "keywords": "wheeled,biped,robot,balance,motion,control,robotics",
    "author": null,
    "author_email": "St\u00e9phane Caron <stephane.caron@normalesup.org>",
    "download_url": "https://files.pythonhosted.org/packages/e2/cf/1c7a25113aadacc33b31f61d261b8fea3566b506ead77ef90b4289f2b035/upkie-3.2.0.tar.gz",
    "platform": null,
    "description": "# Upkie wheeled biped robot\n\n[![CI](https://github.com/upkie/upkie/actions/workflows/bazel.yml/badge.svg)](https://github.com/upkie/upkie/actions/workflows/bazel.yml)\n[![Build instructions](https://img.shields.io/badge/build-read-brightgreen?logo=read-the-docs&style=flat)](https://github.com/upkie/upkie/wiki)\n[![Documentation](https://img.shields.io/badge/docs-read-brightgreen?logo=read-the-docs&style=flat)](https://upkie.github.io/upkie/)\n[![Coverage](https://coveralls.io/repos/github/upkie/upkie/badge.svg?branch=main)](https://coveralls.io/github/upkie/upkie?branch=main)\n[![PyPI version](https://img.shields.io/pypi/v/upkie)](https://pypi.org/project/upkie/)\n[![Chat](https://img.shields.io/badge/matrix-chat-%234eb899)](https://app.element.io/#/room/#tasts-robots:matrix.org)\n\n**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.\n\nThis 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](https://app.element.io/#/room/#tasts-robots:matrix.org) and [Discussions forum](https://github.com/upkie/upkie/discussions).\n\n## Installation\n\nTo code for Upkie in Python, just install:\n\n```console\npip install upkie\n```\n\nThis Python interface is already [fast enough](https://github.com/upkie/vulp#performance) for real-time control. If later on you want to optimize parts of your code, you can move them to C++ [spines](https://upkie.github.io/upkie/spines.html).\n\n## Simulation\n\nAssuming you have a C++ compiler (setup one-liners: [Fedora](https://github.com/upkie/upkie/discussions/100), [Ubuntu](https://github.com/upkie/upkie/discussions/101)), 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:\n\n<img src=\"https://user-images.githubusercontent.com/1189580/170496331-e1293dd3-b50c-40ee-9c2e-f75f3096ebd8.png\" height=\"100\" align=\"right\" />\n\n```console\ngit clone https://github.com/upkie/upkie.git\ncd upkie\n./start_pid_balancer.sh\n```\n\nClick on the robot in the simulator window to apply external forces.\n\n## Example\n\nYou can develop your own agent using the Gymnasium environments distributed in ``upkie.envs``. For example, here is a simple proportional-feedback balancer:\n\n```python\nimport gymnasium as gym\nimport upkie.envs\n\nupkie.envs.register()\n\nwith gym.make(\"UpkieGroundVelocity-v3\", frequency=200.0) as env:\n    observation = env.reset()\n    action = 0.0 * env.action_space.sample()\n    for step in range(1_000_000):\n        observation, reward, done, _ = env.step(action)\n        if done:\n            observation = env.reset()\n        pitch = observation[0]\n        action[0] = 10.0 * pitch\n```\n\nTo 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.\n\nTo run this agent on the robot, `scp` the script to the Raspberry Pi, start a [pi3hat spine](https://upkie.github.io/upkie/spines.html#pi3hat-spine) and execute the script on the Pi itself.\n\n## To go further\n\n- [Build your own Upkie](https://github.com/upkie/upkie/wiki) \ud83e\uddf0\n- [Documentation](https://upkie.github.io/upkie/)\n- [More examples](https://github.com/upkie/upkie/tree/main/examples)\n- [Project log on Hackaday.io](https://hackaday.io/project/185729-upkie-wheeled-biped-robots)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python module to control Upkie wheeled bipeds.",
    "version": "3.2.0",
    "project_urls": {
        "Changelog": "https://github.com/upkie/upkie/blob/main/CHANGELOG.md",
        "Documentation": "https://upkie.github.io/upkie/",
        "Source": "https://github.com/upkie/upkie",
        "Tracker": "https://github.com/upkie/upkie/issues"
    },
    "split_keywords": [
        "wheeled",
        "biped",
        "robot",
        "balance",
        "motion",
        "control",
        "robotics"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9c10fd6f0c3d516c0f31788a5fd5a560c47ad424d58c6cf6a8a4205264b41249",
                "md5": "101bf82724d062e50e324d8fedf5aacc",
                "sha256": "f76c5cb1d27957e6b14b4b2e51c4f8205099da231d5ef076f6066b4bf1122078"
            },
            "downloads": -1,
            "filename": "upkie-3.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "101bf82724d062e50e324d8fedf5aacc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 63112,
            "upload_time": "2024-02-09T10:21:53",
            "upload_time_iso_8601": "2024-02-09T10:21:53.957071Z",
            "url": "https://files.pythonhosted.org/packages/9c/10/fd6f0c3d516c0f31788a5fd5a560c47ad424d58c6cf6a8a4205264b41249/upkie-3.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e2cf1c7a25113aadacc33b31f61d261b8fea3566b506ead77ef90b4289f2b035",
                "md5": "60ae17d639fc5637e821dc3b617ac64b",
                "sha256": "22dec96bd250f5f17f774bb5df11a7d5895eb227311829e81c45421fce8a1d92"
            },
            "downloads": -1,
            "filename": "upkie-3.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "60ae17d639fc5637e821dc3b617ac64b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 250995,
            "upload_time": "2024-02-09T10:21:56",
            "upload_time_iso_8601": "2024-02-09T10:21:56.550741Z",
            "url": "https://files.pythonhosted.org/packages/e2/cf/1c7a25113aadacc33b31f61d261b8fea3566b506ead77ef90b4289f2b035/upkie-3.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-09 10:21:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "upkie",
    "github_project": "upkie",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "upkie"
}
        
Elapsed time: 0.18945s