Unitree A1 robot on ROS Noetic

Verify your Noetic Environment

printenv | grep ROS

Create ROS Catkin Workspace Environment

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin_make
ls ~/catkin_ws
source devel/setup.bash

Unitree A1 ROS prerequisite items

  1. boost
  2. CMake
  3. g++
  4. gedit (optional)
  5. LCM (Lightweight Communications and Marshalling server to pass the massage and data marshalling under low latency for real-time system.)
  6. Unitree Leg SDK V3.2 (low level SDK for robot movement)
  7. Unitree ROS to Real V3.2.1 (it is optional, not necessary for simulation testing)

Check and install boost

dpkg -s libboost-dev | grep Version

Check and install CMake

cmake --version
sudo apt install cmake -y

Check and install g++

g++ --version
sudo apt install g++ -y

Install gedit (Optional)

sudo apt gedit -y

Install LCM

Install build essential

sudo apt update
sudo apt install build-essential -y

Install libglib2.0

sudo apt install libglib2.0-dev-bin -y

Clone LCM Source Code

git clone https://github.com/lcm-proj/lcm.git
ls

Build and Install LCM

mkdir ~/lcm/build
cd ~/lcm/build
cmake ..
make
sudo make install

Install unitree_legged_sdk_v3.2

cd ~
wget https://github.com/unitreerobotics/unitree_legged_sdk/archive/refs/tags/v3.2.tar.gz
ls
sudo tar -xvf v3.2.tar.gz
ls
sudo mv unitree_legged_sdk-3.2 unitree_legged_sdk
sudo chmod 777 unitree_legged_sdk

Build unitree_legged_sdk

mkdir unitree_legged_sdk/build
cd unitree_legged_sdk/build
cmake ..

Setup unitree_ros_to_real_3.2.1

cd ~/catkin_ws/src
wget https://github.com/unitreerobotics/unitree_ros_to_real/archive/refs/tags/v3.2.1.tar.gz
ls ~/catkin_ws/src
sudo tar -xvf v3.2.1.tar.gz
sudo mv unitree_ros_to_real-3.2.1 unitree_ros_to_real
sudo chmod 777 unitree_ros_to_real
dpkg --print-architecture
sudo gedit ~/.bashrc
source ~/catkin_ws/devel/setup.bash
source /usr/share/gazebo-11/setup.sh
export ROS_PACKAGE_PATH=~/catkin_ws:${ROS_PACKAGE_PATH}
export GAZEBO_PLUGIN_PATH=~/catkin_ws/devel/lib:${GAZEBO_PLUGIN_PATH}
export LD_LIBRARY_PATH=~/catkin_ws/devel/lib:${LD_LIBRARY_PATH}
export UNITREE_LEGGED_SDK_PATH=~/unitree_legged_sdk
export UNITREE_PLATFORM="amd64"
export UNITREE_SDK_VERSION="3_2"
echo $UNITREE_SDK_VERSION
echo $GAZEBO_PLUGIN_PATH
echo $ROS_PACKAGE_PATH
cd ~/catkin_ws
catkin_make

Set up Unitree A1 ROS

sudo apt-get install ros-noetic-controller-interface  ros-noetic-gazebo-ros-control ros-noetic-joint-state-controller ros-noetic-effort-controllers ros-noetic-joint-trajectory-controller -y

Download unitree_ros and Build

cd ~/catkin_ws/src
git clone https://github.com/unitreerobotics/unitree_ros.git
cd ~/catkin_ws
catkin_make

Test unitree_gazebo & unitree_controller

roslaunch unitree_gazebo normal.launch rname:=a1
rosrun unitree_controller unitree_servo
rosrun unitree_controller unitree_move_kinetic

Browse ROS Topic List when running Unitree_Gazebo

cd ~/catkin_ws
/a1_gazebo/FL_calf_controller/command
/a1_gazebo/FL_calf_controller/joint_wrench
/a1_gazebo/FL_calf_controller/state
/a1_gazebo/FL_hip_controller/command
/a1_gazebo/FL_hip_controller/joint_wrench
/a1_gazebo/FL_hip_controller/state
/a1_gazebo/FL_thigh_controller/command
/a1_gazebo/FL_thigh_controller/joint_wrench
/a1_gazebo/FL_thigh_controller/state
/a1_gazebo/FR_calf_controller/command
/a1_gazebo/FR_calf_controller/joint_wrench
/a1_gazebo/FR_calf_controller/state
/a1_gazebo/FR_hip_controller/command
/a1_gazebo/FR_hip_controller/joint_wrench
/a1_gazebo/FR_hip_controller/state
/a1_gazebo/FR_thigh_controller/command
/a1_gazebo/FR_thigh_controller/joint_wrench
/a1_gazebo/FR_thigh_controller/state
/a1_gazebo/RL_calf_controller/command
/a1_gazebo/RL_calf_controller/joint_wrench
/a1_gazebo/RL_calf_controller/state
/a1_gazebo/RL_hip_controller/command
/a1_gazebo/RL_hip_controller/joint_wrench
/a1_gazebo/RL_hip_controller/state
/a1_gazebo/RL_thigh_controller/command
/a1_gazebo/RL_thigh_controller/joint_wrench
/a1_gazebo/RL_thigh_controller/state
/a1_gazebo/RR_calf_controller/command
/a1_gazebo/RR_calf_controller/joint_wrench
/a1_gazebo/RR_calf_controller/state
/a1_gazebo/RR_hip_controller/command
/a1_gazebo/RR_hip_controller/joint_wrench
/a1_gazebo/RR_hip_controller/state
/a1_gazebo/RR_thigh_controller/command
/a1_gazebo/RR_thigh_controller/joint_wrench
/a1_gazebo/RR_thigh_controller/state
/a1_gazebo/joint_states
/apply_force/trunk
/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/performance_metrics
/gazebo/set_link_state
/gazebo/set_model_state
/rosout
/rosout_agg
/tf
/tf_static
/trunk_imu
/visual/FL_foot_contact/the_force
/visual/FR_foot_contact/the_force
/visual/RL_foot_contact/the_force
/visual/RR_foot_contact/the_force

Install ROS RQT

sudo apt install ros-noetic-rqt -y
sudo apt install ros-noetic-rqt-common-plugins -y

Unitree A1 Nodes and Topics in ROS RQT

rosrun rqt_graph rqt_graph

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

INHERITANCE

[Bash] [Kubernetes] Script to list all available resources/subresources

Install InvoiceNinja on Kubernetes with Rancher surface and Traefik

Hard Link vs. Symbolic Link

What I Learnt About Estimation

IF YOUhttps://nytimes.one/if-you-pick-your-nose-you-should-probably-stop-now-this-is-how-dangerous-i

TheRailMap v1.3: Small Changes, Big Features!

GraalVM. High-Performance Java Persistence. MicroProfile 5.0. Apple’s GCGC !

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ZIN MIN

ZIN MIN

More from Medium

ZkPad — The big revolution of launchpad platform.

PRELIMS 2022…….?

Invluencer’s i3D Protocol: using the power of blockchain and communities to redefine start-up…

CRO partnering with Veeva eTMF