This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

Overview

Stanford Quadruped

Overview

This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

Pupper CC Max Morse

Video of pupper in action: https://youtu.be/NIjodHA78UE

Project page: https://stanfordstudentrobotics.org/pupper

Documentation & build guide: https://pupper.readthedocs.io/en/latest/

How it works

Overview diagram The main program is run_robot.py which is located in this directory. The robot code is run as a loop, with a joystick interface, a controller, and a hardware interface orchestrating the behavior.

The joystick interface is responsible for reading joystick inputs from a UDP socket and converting them into a generic robot command type. A separate program, joystick.py, publishes these UDP messages, and is responsible for reading inputs from the PS4 controller over bluetooth. The controller does the bulk of the work, switching between states (trot, walk, rest, etc) and generating servo position targets. A detailed model of the controller is shown below. The third component of the code, the hardware interface, converts the position targets from the controller into PWM duty cycles, which it then passes to a Python binding to pigpiod, which then generates PWM signals in software and sends these signals to the motors attached to the Raspberry Pi. Controller diagram This diagram shows a breakdown of the robot controller. Inside, you can see four primary components: a gait scheduler (also called gait controller), a stance controller, a swing controller, and an inverse kinematics model.

The gait scheduler is responsible for planning which feet should be on the ground (stance) and which should be moving forward to the next step (swing) at any given time. In a trot for example, the diagonal pairs of legs move in sync and take turns between stance and swing. As shown in the diagram, the gait scheduler can be thought of as a conductor for each leg, switching it between stance and swing as time progresses.

The stance controller controls the feet on the ground, and is actually quite simple. It looks at the desired robot velocity, and then generates a body-relative target velocity for these stance feet that is in the opposite direction as the desired velocity. It also incorporates turning, in which case it rotates the feet relative to the body in the opposite direction as the desired body rotation.

The swing controller picks up the feet that just finished their stance phase, and brings them to their next touchdown location. The touchdown locations are selected so that the foot moves the same distance forward in swing as it does backwards in stance. For example, if in stance phase the feet move backwards at -0.4m/s (to achieve a body velocity of +0.4m/s) and the stance phase is 0.5 seconds long, then we know the feet will have moved backwards -0.20m. The swing controller will then move the feet forwards 0.20m to put the foot back in its starting place. You can imagine that if the swing controller only put the leg forward 0.15m, then every step the foot would lag more and more behind the body by -0.05m.

Both the stance and swing controllers generate target positions for the feet in cartesian coordinates relative the body center of mass. It's convenient to work in cartesian coordinates for the stance and swing planning, but we now need to convert them to motor angles. This is done by using an inverse kinematics model, which maps between cartesian body coordinates and motor angles. These motor angles, also called joint angles, are then populated into the state variable and returned by the model.

How to Build Pupper

Main documentation: https://pupper.readthedocs.io/en/latest/

You can find the bill of materials, pre-made kit purchasing options, assembly instructions, software installation, etc at this website.

Help

Owner
Stanford Student Robotics
Stanford Student Robotics
Electrolux Pure i9 robot vacuum integration for Home Assistant.

Home Assistant Pure i9 This repository integrates your Electrolux Pure i9 robot vacuum with the smart home platform Home Assistant. The integration co

Niklas Ekman 15 Dec 22, 2022
iot-dashboard: Fully integrated architecture platform with a dashboard for Logistics Monitoring, Internet of Things.

Fully integrated architecture platform with a dashboard for Logistics Monitoring, Internet of Things. Written in Python. Flask applicati

2 Jul 29, 2022
Python script: Enphase Envoy mqtt json for Home Assistant

A Python script that takes a real time stream from Enphase Envoy and publishes to a mqtt broker. This can then be used within Home Assistant or for other applications. The data updates at least once

29 Dec 27, 2022
Testing additional addon devices, and their working scripts

ESP32-addon-devices-potpurri Testing additional addon devices, and their micropython working scripts 📑 List of device addons tested so far Ethernet P

f-caro 0 Nov 26, 2022
Open-Source board for converting RaspberryPI to Brain-computer interface

The easiest way to the neuroscience world with the shield for RaspberryPi - PIEEG (website). Open-source. Crowdsupply This project is the result of se

Ildaron 436 Jan 01, 2023
CPU benchmark by calculating Pi, powered by Python3

cpu-benchmark Info: CPU benchmark by calculating Pi, powered by Python 3. Algorithm The program calculates pi with an accuracy of 10,000 decimal place

Alex Dedyura 20 Jan 03, 2023
A ch341dll Wrap is for using in Python 32bits windows to access I2C SPI and MDIO (by GPIO), and Demo with display PC sreen on OLED by i2c or SPI .

ch341dll_wrap_typcal_app A ch341dll Wrap is for using in Python 32bits windows to access I2C SPI and MDIO (by GPIO). In addition, I provided 3 Demo. I

13 Jan 02, 2023
ArucoFollow - A script for Robot Operating System and it is a part of a project Robot

ArucoFollow ArucoFollow is a script for Robot Operating System and it is a part

5 Jan 25, 2022
Brogrammer-keyboard - FIrmware for the Brogrammer Keyboard v1.0

Brogrammer Keyboard Firmware The package contains the firmware that runs on the Brogrammer Keyboard v1.0 See https://imgur.com/a/oY5QZ14 This keyboard

Devin Hartleben 1 Apr 21, 2022
The PicoEMP is a low-cost Electromagnetic Fault Injection (EMFI) tool,

ChipSHOUTER-PicoEMP The PicoEMP is a low-cost Electromagnetic Fault Injection (EMFI) tool, designed specifically for self-study and hobbiest research.

NewAE Technology Inc. 312 Jan 07, 2023
LED effects plugin for klipper

This plugin allows Klipper to run effects and animations on addressable LEDs, such as Neopixels, WS2812 or SK6812.

Julian Schill 238 Jan 04, 2023
Automatically draw a KiCad schematic for a circuit prototyped on a breadboard.

Schematic-o-matic Schematic-o-matic automatically draws a KiCad schematic for a circuit prototyped on a breadboard. How It Works The first step in the

Nick Bild 22 Oct 11, 2022
Classes and functions for animated text and graphics on an LED display

LEDarcade A collection of classes and functions for animated text and graphics on an Adafruit LED Matrix.

datagod 31 Jan 04, 2023
Volta: A Virtual Assistant which increases your productivity with time as you use it…

Volta Official Documentation Overview & Purpose Volta: A Virtual Assistant which increases your productivity with time as you use it… Volta, developed

Abeer Joshi 1 Jan 14, 2022
DIY split-flap display

The goal is to make a low-cost display that's easy to fabricate at home in small/single quantities (e.g. custom materials can be ordered from Ponoko or similar, and other hardware is generally availa

Scott Bezek 2.5k Jan 05, 2023
This Home Assistant custom component adding support for controlling Midea dehumidifiers on local network.

This custom component for Home Assistant adds support for Midea air conditioner and dehumidifier appliances via the local area network. homeassistant-

Nenad Bogojevic 92 Dec 31, 2022
PyTorch implementation of paper "MT-ORL: Multi-Task Occlusion Relationship Learning" (ICCV 2021)

MT-ORL: Multi-Task Occlusion Relationship Learning Official implementation of paper "MT-ORL: Multi-Task Occlusion Relationship Learning" (ICCV 2021) P

Panhe Feng 12 Oct 11, 2022
A dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc. written in Python

Weather Clock for Raspberry PI This project is a dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc.

Markus Geiger 1 May 01, 2022
Terkin is a flexible data logger application for MicroPython and CPython environments.

Terkin Data logging for humans, written in MicroPython. Documentation: https://terkin.org/ Source Code: https://github.com/hiveeyes/terkin-datalogger

hiveeyes 45 Dec 15, 2022
A custom mechanical keyboard inspired by the CFTKB Mysterium

Env-KB A custom mechanical keyboard inspired by the CFTKB Mysterium Build Guide and Parts List What is to do? Right now for the first 5 PCBs I have, i

EnviousData 203 Jan 04, 2023