Refer to the Unitree Documentation Center | Application Development.
- Download unitree_sdk2.
- Copy
scripts/turn_off_arm_action_service.cpptounitree_sdk2/example/g1/high_level/. - Modify
unitree_sdk2/example/g1/CMakeLists.txtaccordingly. - Build and install
unitree_sdk2.
-
Refer to the Unitree Documentation Center | ROS2 Communication Routine to install and build unitree_ros2.
-
Open
~/unitree_ros2/setup.shand change"enp3s0"to"eth0":
export CYCLONEDDS_URI='<CycloneDDS><Domain><General><Interfaces>
<NetworkInterface name="eth0" priority="default" multicast="default" />
</Interfaces></General></Domain></CycloneDDS>'Download the official model g1-description for IK computation.
Open brainco_ws/src/control_py/control_py/state_manager/robot_control.py and modify the arm_urdf_path path.
cd ~
git clone https://github.com/BrainCoTech/unitree-g1-brainco-hand.gitSet executable permissions:
cd ~/unitree-g1-brainco-hand/brainco_ws
chmod +x ./launch/launch_trans.sh
chmod +x ./launch/launch_robot.shInstall the BrainCo SDK library files:
cd ~/unitree-g1-brainco-hand/ros2_stark_ws
chmod +x download-lib.sh
./download-lib.sh
mkdir src/ros2_stark_controller_new/lib
mv dist/shared/linux/libbc_stark_sdk.so src/ros2_stark_controller_new/lib/libbc_stark_sdk.soModify params_revo2_left.yaml and params_revo2_right.yaml under ros2_stark_ws/src/ros2_stark_controller_new/config/:
port: The serial ports for the left and right hands, corresponding to the two signal ports on the USB-to-485 board.baudrate: The default baud rate for Revo2 is460800.slave_id: The default is0x7efor the left hand and0x7ffor the right hand.
conda activate g1brainco
# Build brainco_ws
cd ~/unitree-g1-brainco-hand/brainco_ws
python -m colcon build
# Build ros2_stark_ws
cd ~/unitree-g1-brainco-hand/ros2_stark_ws
python -m colcon build