Skip to content

lwzbuaa/PupperPythonSim

 
 

Repository files navigation

Pupper Robot: Python Simulation

Overview

This repository contains Python code to run Pupper, a Raspberry Pi-based quadruped robot. In addition to the robot code, this repository also contains a wrapper to simulate the robot in MuJoCo or PyBullet using the same code that runs on the robot.

Installing and Running Code on the Raspberry Pi

Materials

  • Raspberry Pi 4
  • SD Card (32GB recommended)
  • Raspberry Pi 4 power supply (USB-C, 5V, >=3A)
  • Ethernet cable

Steps

Running the Robot

Installation for PyBullet Simulation

The PyBullet simulator is free for academic use and requires no license whatsoever, but in my experience PyBullet is much slower than MuJoCo and is less clear about how to tune the contact parameters.

  1. Clone this repository
git clone https://github.com/Nate711/PupperSimulation.git
  1. Install pybullet (in a python 3.7 environment)
pip install pybullet

Run PyBullet Simulation

  1. Run simulation:
python3 simulate_pybullet.py

Installation for MuJoCo Simulation

MuJoCo has been faster than PyBullet in my experience, but requires that you request and activate a license. The process to acquire a license can take several days.

  1. Clone this repository
git clone https://github.com/Nate711/PupperSimulation.git
  1. Acquire a license for MuJoCo at http://mujoco.org/. You can get a free trial of the professional license for a month, or with a student account, a free year.

  2. Follow the instructions at https://github.com/openai/mujoco-py to correctly install MuJoCo.

If you have trouble installing MuJoCo on macOS because gcc can't find certain header files, like "limits.h" or "stdio.h", then try completing the installation wizard that pops up when you run:

sudo open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg 

And also do:

brew update
brew install gcc@8
brew link --overwrite gcc
  1. Install the python requirements:
bash install_packages_sim.sh

Run MuJoCo Simulation

  1. Run
python3 simulate.py
  1. The MuJoCo simulator should then pop up in a new window with various interactive options. Press space to stop or start the simulation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 99.5%
  • Shell 0.5%