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.
To run the robot from the terminal teleop-twist-keyboard package is required.
sudo apt install ros-noetic-teleop-twist-keyboardModel 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-submodulesAfter cloning cd into the unitree_ros and install model control package.
cd ~/unitree_ros/src
git clone https://github.com/mertgungor/unitree_model_control.gitBuild the workspace
cd ~/unitree_ros
catkin_makeFirst start the Gazebo simulation.
cd ~/unitree_ros
source devel/setup.bash
roslaunch unitree_gazebo normal.launch rname:=a1In a new therminal start the AI model.
cd ~/unitree_ros
source devel/setup.bash
rosrun unitree_model_control model_runFinally, in a new terminal run teleop_keyboard_twist node to command the robot to walk.
rosrun teleop_twist_keyboard teleop_twist_keyboard.py