Skip to content

asblab-research/tbai

 
 

Repository files navigation

tbai

Towards better athletic intelligence

Implemented controllers

📦tbai
 ┣ 📂tbai_static               # Static (high gain PD) controller
 ┣ 📂tbai_mpc_perceptive       # Perceptive NMPC controller [1]
 ┣ 📂tbai_mpc_blind            # Blind NMPC controller [1]
 ┣ 📂tbai_rl_perceptive        # Perceptive RL controller [2]
 ┣ 📂tbai_rl_blind             # Blind RL controller [2]
 ┣ 📂tbai_dtc                  # DTC controller (perceptive) [3]
 ┣ 📂tbai_joe                  # Perceptive NMPC controller with NN-based tracking controller [1],[3]

 [1] Perceptive Locomotion through Nonlinear Model Predictive Control
     https://arxiv.org/abs/2208.08373
 [2] Learning robust perceptive locomotion for quadrupedal robots in the wild
     https://arxiv.org/abs/2201.08117
 [3] DTC: Deep Tracking Control
     https://arxiv.org/abs/2309.15462

Perceptive MPC

mpc_perceptive_f.mp4

Blind MPC

mpc_blind_f.mp4

Perceptive RL

rl_perceptive_fe.mp4

Blind RL

rl_blind_fe.mp4

Dtc

dtc_f.mp4

Joe

joe_f.mp4

System architecture

overview_01

Controller architectures

Mpc

mpc_03

Rl (Bob)

bob_03

Dtc

dtc_03

Joe

joe_03

Installing libtorch C++

There are two steps to installing libtorch. First, you need to download a suitable libtorch version. Once the library is downloaded, it's necessary to create a symlink to it in the dependencies folder. Here's how to do it:

1. Getting libtorch download link

Get your download link from the official PyTorch website. Note that opting for the (cxx11 ABI) version is paramount. If you download the (Pre-cxx11 ABI) version, things won't work as necessary.

image

2. Downloading libtorch and creating a symlink

Now that you have your url, you can download the library, unzip it and create a symlink in the dependencies folder.

wget <your-url>
unzip <downloaded-zip> -d <your-folder>  # can be `dependencies`
ln -s <your-folder>/libtorch dependencies  # Only necessary if, in the previous step, you did not unzip in `dependencies`

Your dependencies folder should not look as follows:

That's it. You should now be able to compile the entire project. Enjoy 🤗

Installing tbai

# Install dependencies
sudo apt install libmpfr-dev

# Download project
mkdir -p <your-file>/src && cd <your-file> && catkin init && cd src
git clone git@github.com:lnotspotl/tbai.git --recursive

# Install other dependencies using rosdep
cd .. && rosdep install --from-paths src --ignore-src -r -y && cd src/tbai

# !! Now install libtorch by following the installation guideline above

# Build tbai
catkin config -DCMAKE_BUILD_TYPE=Release
bash ./tbai.bash --build  # This will only build the necessary packages

# Source tbai
cd ../.. && source devel/setup.bash

If any of the steps throws an error for you, please let use know and we will try to extend this guideline with a fix as soon as possible. Thanks 🤗

Credits

This project stands on the shoulders of giants. None of this would have been possible were it not for many amazing open-source projects. Here are a couple that most inspiration was drawn from and that were instrumental during the development:

Thank you all 🤗

Releases

No releases published

Packages

 
 
 

Languages

  • C++ 77.2%
  • CSS 15.3%
  • CMake 3.8%
  • Python 3.2%
  • Shell 0.5%