Skip to content

despargy/maestro

Repository files navigation


Two-layer adaptive trajectory tracking controller for quadruped robots on slippery terrains.

Go1

Maestro Project


About the project

We propose an adaptive trajectory tracking controller for quadruped robots, which involves two prioritized layers of adaptation for avoiding possible slippage of one or multiple legs.

Description

This package is developed for the simulated and the real robot experiments of the submitted paper to Humanoids 2023 with title "Two-layer adaptive trajectory tracking controller for quadruped robots on slippery terrains" .

Development and Implementation using Unitree's Go1 EDU legged robot, real and simulated.

Slippage detection is achieved by ProbabilisticContactEstimation.

Back to top

Getting Started

Dependencies

Unitree's Go1 legged robot:

Simulator

System

  • Ubuntu 20.04
  • ROS Noetic (tested), ROS Melodic (possibly, not-tested)

Installation

  1. Get the above package dependencies:
    unitree_ros_to_real, unitree_ros, unitree_legged_sdk .

  2. Clone the repo

    $ git clone https://github.com/despargy/maestro
  3. Catkin make

    $ cd ~/catkin_ws 
    $ catkin_make
  4. Set the "<path-to-workspace>" to your workspace path at:

    • line 15, src/contact_estimation/contacts/fl_pce.py
    • line 15, src/contact_estimation/contacts/fr_pce.py
    • line 15, src/contact_estimation/contacts/rl_pce.py
    • line 15, src/contact_estimation/contacts/rr_pce.py

Back to top

Run the package

❗ This is very important

Warning

- Before run experiments with the real robot Go1, first secure Unitree's Go1 EDU, ex. photo below. 

Case A: Simulation - without Adaptation

Run the package ( Simulation - without Adaptation ) (Default)

  1. Default launch for simulation
    $ roslaunch maestro basic.launch
  2. Run the controller.
    $ rosrun maestro main_handler
  3. Terminate the controller.
    $ rostopic pub /maestro/ctrl std_msgs/Bool "data: false"

Case B: Simulation - Adaptation

Run the package (Simulation - Adaptation)

  1. Launch for simulation with adaptation parameters.
    $ roslaunch maestro basic.launch slip_detection:=true adapt_b:=true
  2. Launch Probabilistic Contact Estimation.
    $ roslaunch maestro contact.launch
  3. Run the controller.
    $ rosrun maestro main_handler
  4. Terminate the controller.
    $ rostopic pub /maestro/ctrl std_msgs/Bool "data: false"

Case C: Real Robot* - without Adaptation

Run the package ( Real Robot* - without Adaptation )

  1. Default launch for simulation.
    $ roslaunch maestro basic.launch real_experiment:=true
  2. Run the controller.
    $ rosrun maestro main_handler
  3. Terminate the controller.
    $ rostopic pub /maestro/ctrl std_msgs/Bool "data: false"

Case D: Real Robot* - Adaptation

Run the package (Real Robot* - Adaptation)

  1. Launch for simulation with adaptation parameters.
    $ roslaunch maestro basic.launch real_experiment:=true slip_detection:=true adapt_b:=true
  2. Launch Probabilistic Contact Estimation **.
    $ roslaunch maestro contact.launch
  3. Run the controller.
    $ rosrun maestro main_handler
  4. Terminate the controller.
    $ rostopic pub /maestro/ctrl std_msgs/Bool "data: false"

Case E: Simulation - Swing without Adaptation

Run the package ( Simulation - Swing without Adaptation )

  1. Default launch for simulation
    $ roslaunch maestro basic.launch inf:=true
  2. Run the controller.
    $ rosrun maestro main_handler
  3. Terminate the controller.
    $ rostopic pub /maestro/ctrl std_msgs/Bool "data: false"

Case F: Simulation - Swing Adaptation

Run the package (Simulation - Swing Adaptation)

  1. Launch for simulation with swing adaptation parameters.
    $ roslaunch maestro basic.launch slip_detection:=true adapt_b:=true inf:=true
  2. Launch Probabilistic Contact Estimation.
    $ roslaunch maestro contact.launch
  3. Run the controller.
    $ rosrun maestro main_handler
  4. Terminate the controller.
    $ rostopic pub /maestro/ctrl std_msgs/Bool "data: false"

Important Notes

- ### Secure the real robot before the experiment.

Note *: The robot's model state (CoM position) is needed since the provided controller is a closed-loop. Set the appropriate topic at line 39 of file /maestro/include/CommunicationHandler.h. Note *: In order to tune the Real Robot, it is recommended to comment 49-52 lines and comment 43-46 lines, from /maestro/launch/basic.launch, for tuning the real robot. Note *: For Real Robot first follow the steps setting the connection with Real Robot(ip: 192.168.123.161). Instruction at /maestro/go1_description/connection/Go1Config.txt

Note **: ProbabilisticContactEstimation for real experiment needs a 6DOF IMU sensor to publish at /imu topic.

Back to top

Terminate ROS Background process

Make kill_ros.sh executable, once:

  chmod +x kill_ros.sh 

Run kill_ros.sh, everytime to terminate ROS processes from background.

  ./kill_ros.sh 

Launch Parameters

Parameter name Default Value Description
real_experiment false false: robot in Gazebo simulator, true: real robot connection
slip_detection false Slip terrain perception disabled, if true: use ProbabilisticContactEstimation
adapt_b false Adaptation disabled, if true slip_detection should be true.
inf false Swinging leg's weights to infinity.
num_imus 0 Optional parameter waiting for msg from a specific num of IMUs, before start tracking. Slip detection needs also to be true
world_name wname Affects only simulation world. wname: 1 leg slippage, wnameGlobal: 4 legs slippage (global slip) Select line-22 or line-24 from 'basic.launch'
kp 3000.0 Position gain of controller (tuning parameters)
kv 550.0 Velocity gain of controller (tuning parameters)
ko 15.0 Orientation gain of controller (tuning parameters)
alpha 150.0 Increasing, sharper-quiqer adaptation / Decreasing, smoother-slower adaptation (tuning parameters)

Experiment setup

Control of two-layer adaptation uses slip probabilbity from ProbabilisticContactEstimation package. At least one IMU sensor is required, attached to robot's leg in order to detect the slipage at this foot tip.

Test your experiments!

Set your desired trajectory and avoid slipage! Desired position trajectory is given from get_pDesiredTrajectory() at maestro/src/Math.cpp file. Desired orientation trajectory is given from get_RDesiredRotationMatrix() c.

Note Tuning of controller's gains (launch parameters) is possibly needed, after trajectory has been modified.

Note Tuning of adaptation can be achived for different robot's behavior, by changing the values of

  1. w0 line 36, /maestro/src/Leg.cpp file.
  2. alpha /maestro/launch/basic.launch file.

Contact

Despina-Ekaterini Argiropoulos - despinar@ics.forth.gr

LinkedIn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •