Skip to content

ROS 2 quick start

Installation

Connect the development machine directly to the G02 robot with an Ethernet cable, and configure the development machine's static IP as 10.42.1.102. Make sure ping 10.42.1.101 works correctly.

Install the GDK dependencies on the development machine:

curl -sSL http://10.42.1.101:8849/install.sh | bash

Building

cd <your_workspace>
cp -r ~/.cache/agibot/app/gdk/build_dep/ros/genie_msgs ./
colcon build 

Running the example

source ~/.cache/agibot/app/gdk/scripts/ros_env.sh gdk_controller
ros2 launch gdk_controller controller.launch.py

You can subscribe to the /hal/joint_state topic to view the robot's joint states.

#Open a new terminal
source ~/.cache/agibot/app/gdk/scripts/ros_env.sh gdk_controller

ros2 topic list
#ros2 topic hz /hal/joint_state #View the publish rate
#ros2 topic echo /hal/joint_state #View the joint states