All Projects → bostoncleek → quadruped_control

bostoncleek / quadruped_control

Licence: other
Quadruped control architecture

Programming Languages

C++
36643 projects - #6 most used programming language
Jupyter Notebook
11667 projects
CMake
9771 projects

Projects that are alternatives of or similar to quadruped control

language-planner
Official Code for "Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agents"
Stars: ✭ 84 (+82.61%)
Mutual labels:  planning
taxi
Hierarchical Online Planning and Reinforcement Learning on Taxi
Stars: ✭ 24 (-47.83%)
Mutual labels:  planning
autonomous-delivery-robot
Repository for Autonomous Delivery Robot project of IvLabs, VNIT
Stars: ✭ 65 (+41.3%)
Mutual labels:  planning
jpp
Joint Perception and Planning For Efficient Obstacle Avoidance Using Stereo Vision
Stars: ✭ 42 (-8.7%)
Mutual labels:  planning
nuplan-devkit
The devkit of the nuPlan dataset.
Stars: ✭ 107 (+132.61%)
Mutual labels:  planning
setting-up-an-open-source-project
🔁 Setting Up An Open Source Project
Stars: ✭ 14 (-69.57%)
Mutual labels:  planning
DnaWeaver
A route planner for DNA assembly
Stars: ✭ 20 (-56.52%)
Mutual labels:  planning
cellrank
CellRank for directed single-cell fate mapping
Stars: ✭ 222 (+382.61%)
Mutual labels:  trajectory-generation
plasp
🗺️ ASP planning tools for PDDL
Stars: ✭ 24 (-47.83%)
Mutual labels:  planning
node-quadprog
Module for solving quadratic programming problems with constraints
Stars: ✭ 28 (-39.13%)
Mutual labels:  quadratic-programming
l5kit
L5Kit - https://level-5.global/
Stars: ✭ 683 (+1384.78%)
Mutual labels:  planning
GoPlan-app
An intuitive portfolio mangaer !
Stars: ✭ 27 (-41.3%)
Mutual labels:  planning
Timetable-App
This is a timetable App for android phones.
Stars: ✭ 19 (-58.7%)
Mutual labels:  planning
mapus
A map tool with real-time collaboration 🗺️
Stars: ✭ 2,687 (+5741.3%)
Mutual labels:  planning
fun-with-dnc
Pytorch Implementation of Deepmind's 'Hybrid computing using a neural network with dynamic external memory' (Differentiable Neural Computer) + some applications
Stars: ✭ 18 (-60.87%)
Mutual labels:  planning
Robotics-Planning-Dynamics-and-Control
RPDC : This contains all my MATLAB codes for the Robotics, Planning, Dynamics and Control . The implementations model various kinds of manipulators and mobile robots for position control, trajectory planning and path planning problems.
Stars: ✭ 171 (+271.74%)
Mutual labels:  planning
Annotated-Angular-Roadmap
More details about each item in the Angular roadmap (https://angular.io/guide/roadmap)
Stars: ✭ 41 (-10.87%)
Mutual labels:  planning
CarND-Path-Planning-Project-P1
Udacity Self-Driving Car Nanodegree - Path Planning Project
Stars: ✭ 20 (-56.52%)
Mutual labels:  trajectory-generation
sr plan
Save and restore query plans in PostgreSQL
Stars: ✭ 57 (+23.91%)
Mutual labels:  planning
pm-discussify
Discussify's project management repository
Stars: ✭ 17 (-63.04%)
Mutual labels:  planning

Quadruped Control

Table of Contents

Control Architecture

Balance Controller

The balance controller architecture is based on ETH Zürich Star1ETH, IIT HyQ, and MIT Mini Cheetah.

The robot is modeled as a single rigid body with ground reaction forces at the feet using the Newton-Euler equations of motion. PD control is used to compose the desired center of mass linear and angular accelerations based on the center of mass pose and velocities. A quadratic program is minimized to find the ground reaction forces that produce the desired center of mass acclerations. The quadratic program has infinitely many solutions. Therefore, in order for the optimization to converge, it is constrained such that the ground reaction forces must exist within a friction cone. The ground reaction forces are transformed into joint torques using the jacobian transpose. The balance contoller is only used for feet in the stance phase.

Below, the balance controller is used to transition the quadruped from laying to standing.

The benefit of this controller is that is provides an alternative way of achieving a desired center of mass orientation without requiring full body inverse kinematics.

To demonstrate the robustness of the balance controller, the robot stands upright with the knees locked out. In this state, the robot is most unstable and therefore difficult to balance.

Swing Leg Controller

When a leg is in swing state, a joint level PD controller is used. The reference trajectory consists of desired foot positions and velocities. The desired foot position is transformed to joint positions using an analytical inverse kinematic solution. The desired foot velocity is transformed to joint velocities using the jacobian inverse. If the jacobian is near singular, the Moore-Penrose pseudo-inverse of the jacobian is used. However, sometimes the pseudo-inverse cannot be solved within a tolerance and the jacobian transpose is used as an approximation of the inverse.

Planning

Foot Step Planner

The foothold is determined using the Raibert heuristic and the linear inverted pendulum model.

Foot Trajectory

The foot trajectory consists of desired foot positions and velocities. Given the starting and final foot positions and a desired foot height, the trajectory is composed using a 6th order polynomial. A 6th order polynomial is used because there are 7 trajectory constraints, therefore there exists unique polynomial coefficients. The constraints are: 3 position constraints for start, final, and center (max height is achieved here) foot positions, 2 velocity constraints (starting and final foot velocities are 0), and 2 acceleration constraints (starting and final foot accelerations are 0).

Results

The fastest forward walking speed achieved so far was 0.4 m/s. Below are gait transitions from a stationary state to walking forwards and backwards at 0.2 m/s.

The quadruped can walk sideways (max speed 0.1 m/s) and rotate about the z-axis. The max yaw rate is 0.05 rad/s. Further work is needed to improve this capability.

Getting Started

Development Environment

  • Ubuntu 20.04
  • ROS Noetic
  • GCC 9.3.0

Dependencies

Important: The current version of qpOASES only creates a static library and will cause Armadillo to segfault. The segfault is likely due to the fact that qpOASES redefines internally some BLAS/LAPACK functions and this can create problems if linking with another library that uses BLAS or LAPACK. For more info see PR #108 and PR #109.

To properly build qpOASES, add/modify the following lines to the CMakeLists.txt.

# Avoids names conflicting with BLAS/LAPACK
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__AVOID_LA_NAMING_CONFLICTS__")

# Remove STATIC to build a shared library
ADD_LIBRARY(qpOASES ${SRC})

Optional Dependencies

For improved performance in both Armadillo and qpOASES, install first OpenBlas and LAPACK. See Armadillo's install notes.

Dependency Versions

  • OpenBlas 0.3.13
  • LAPACK 3.9.0
  • Armadillo 10.2.1
  • Drake v0.26.0
  • qpOASES master (SHAID: 326a651)

Workspace

If you don't have vcstool, see the install instuctions. Create a workspace and build:

mkdir -p quadruped_ws/src 
cd ~/quadruped_ws/src 
wget https://raw.githubusercontent.com/bostoncleek/quadruped_control/master/quadruped.repos
vcs import < quadruped.repos
cd ~/quadruped_ws
catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin build

Launch

The Drake install instructions recommend extracting the binaries to /opt. Add the Drake binaries to your PATH to make runnning the visualization tools easier.

export PATH="/opt/drake/bin/:$PATH"  

Then run the Drake visualizer:

drake-visualizer

Launch the Drake-ROS Interface. The robot model should appear laying down in an empty world.

roslaunch quadruped_simulation world.launch

Finally, launch the controller:

roslaunch quadruped_controller control.launch

Tell the robot to transition into the standing configuration:

rosservice call /stand_up

If the robot falls over, reset it to the initial configuration

rosservice call /start_position

Use a gamepad to drive the robot. The left joystick controls the translation in the xy plane and the right joystick will control the yaw rate.

There is a gait visualization tool. To launch this tool run:

roslaunch quadruped_controller gait_visualizer.launch

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].