Giter Club home page Giter Club logo

mini_pupper_trajopt's Introduction

Trajectory optimization package for Mini-Pupper robot

The purpose of this repository is to provide low-torque and low-impact trajectories for Mini-Pupper quadrupedal robot.

Requirements

First, install Pinocchio by following the instruction. Next, install robotoc at ROBOTOC_INSTALL_DIR as

git clone https://github.com/mayataka/robotoc & cd robotoc
mkdir build & cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DOPTIMIZE_FOR_NATIVE=ON -DCMAKE_INSTALL_PREFIX=ROBOTOC_INSTALL_DIR
make install -j4

and modify Python path as

export PYTHONPATH=ROBOTOC_INSTALL_DIR/lib/python3.8/site-packages:$PYTHONPATH 

e.g., write it in ~/.bashrc. Finally, install meshcat-python as

pip install meshcat

Running the trajectory optimizer

In mini_pupper_trajopt directory, you can run the mini-pupper's gait optimization, e.g., via python3 troting.py. Then the log file is generated at mini_pupper_trajopt/rsc, e.g., mini_pupper_trajopt/rsc/trotting/q.log.

Note: this step is totally independent of ROS and Gazebo.

Deploying the trajectory to the mini-pupper controller

After generating the log file of the optimized trajectory, you can install the log file via catkin_make in your workspace. That is, catkin_make command also installs mini_pupper_trajopt/rsc/trotting/q.log. You can then run a Gazebo simulation as roslaunch mini_pupper_gazebo mini_pupper_trotting.launch.

Remark: This simulation is different from the trajectory optimizer because the servo motors are assumed to have only the position interface. This is much closer to the real mini-pupper robot than the trajectory optimizer in which the torque interface is assumed.

Summary for the Gazebo simulation

  1. Install Pinocchio, robotoc, and meshcat-python.
  2. Run python3 trotting.py at mini_pupper_trajopt directory.
  3. Run catkin_make at ROS workspace. This command also installs generated trajectory files, e.g., mini_pupper_trajopt/rsc/trotting/q.log.
  4. Launch Gazebo simulation as roslaunch mini_pupper_gazebo mini_pupper_trotting.launch

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.