Skip to content

A ros package to control unitree a1 along side with unitree_ros package utilizing a pytorch model trained in isaac-gym

Notifications You must be signed in to change notification settings

Li-Guanda/unitree_model_control

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package Description

This package is used to control the Unitree A1 robot with a pre-trained AI model. The training is done by this repository. The main purpose is to provide an interface to use pre-trained AI models with unitree robots using unitree_ros package.

Installation

To run the robot from the terminal teleop-twist-keyboard package is required.

sudo apt install ros-noetic-teleop-twist-keyboard

Model depends on libtorch and it needs to be installed too.

cd ~/Downloads
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-2.0.1+cpu.zip -d ./

Unzip the folder and inside bashrc add this command with the path of your libtorch installation. export Torch_DIR=/path/to/your/torchlib

Install unitree ros package.

git clone https://github.com/mertgungor/unitree_ros.git ~/unitree_ros/src --recurse-submodules

After cloning cd into the unitree_ros and install model control package.

cd ~/unitree_ros/src
git clone https://github.com/mertgungor/unitree_model_control.git

Build the workspace

cd ~/unitree_ros
catkin_make

Usage

First start the Gazebo simulation.

cd ~/unitree_ros
source devel/setup.bash
roslaunch unitree_gazebo normal.launch rname:=a1

In a new therminal start the AI model.

cd ~/unitree_ros
source devel/setup.bash
rosrun unitree_model_control model_run

Finally, in a new terminal run teleop_keyboard_twist node to command the robot to walk.

rosrun teleop_twist_keyboard teleop_twist_keyboard.py

About

A ros package to control unitree a1 along side with unitree_ros package utilizing a pytorch model trained in isaac-gym

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.1%
  • CMake 6.9%