Go1 Software Manual
Go1 Software Manual
2021.12.1
1
Go1 Software Manual
contents
Go1Software Manual................................................................................................................................................ 1
1 System....................................................................................................................................................................... 3
1.1 Robot system structure..................................................................................................................................3
1.2 Network configuration.............................................................................................................................. 4
1.2.1 wifi settings....................................................................................................................................... 4
1.2.1 wired settings................................................................................................................................... 4
1.3 Units................................................................................................................................................................5
1.4 Coordinate, kinematics and dynamics......................................................................................................... 5
1.4.1 Joint number and joint limits.......................................................................................................5
1.4.2 Coordinate, joint axis and zero point............................................................................................. 6
1.4.3 Kinematic parameters.................................................................................................................... 6
1.4.4 Dynamics parameters.....................................................................................................................6
1.5 Foot force sensor........................................................................................................................................ 7
2 Unitree_legged_sdk............................................................................................................................................... 7
3 Go1_ros......................................................................................................................................................................8
3.1 ros dependency...........................................................................................................................................8
3.1.1 build message msgs....................................................................................................................... 8
3.1.2 build controller.................................................................................................................................9
3.2 Rviz..................................................................................................................................................................9
3.3 Gazebo........................................................................................................................................................... 9
3.3.1 build plugins..................................................................................................................................... 9
3.3.2 Run the simulation........................................................................................................................10
3.4 ROS control robot.....................................................................................................................................10
3.4.1 LCM Server...................................................................................................................................... 10
3.4.2 control examples........................................................................................................................... 10
4 Go1_camera_SDK................................................................................................................................................. 11
4.1 Control the use of robot cameras........................................................................................................11
4.1.1dependency......................................................................................................................................11
4.1.2 compile.............................................................................................................................................11
4.1.3 run......................................................................................................................................................12
4.2 System Files................................................................................................................................................ 12
2
Go1 Software Manual
1 System
System diagram
The operating system of the onboard PC is a real-time Linux (Ubuntu) operating system and an
ARM architecture, and the real-time communication frequency is up to 1KHz.
The following is a schematic diagram of the back interface of Go1:
1. Nano2 USB
2. Nano2 HDMI
3. Nano/Nx3 USB
4. Nano/Nx3 HDMI
① ② 5. Raspberry USB
⑧ 6. Raspberry HDMI
③ ④ 7. Gigabit Ethernet port
8. SIM
⑤ ⑥ ⑨
9. Integratedinterface
⑦ 10. External power input ( 24V
30A)
11. Type-C
⑩
12. Type-C
⑪ ⑫
3
Go1 Software Manual
In order to meet the different needs of users, the controller with IP 192.168.123.15 is Nano controller
or Nx controller
Among them, the head Nano controller 1 does not open the usb and hdmi interfaces. For access,
please see the network connection section below
The robot transmits a wireless network segment of 192.168.12.xxx, so users can connect to this wifi with
their PC and remotely connect to the robot's operating system via SSH:
ssh [email protected]
Password:123
After logging in to the Raspberry Pi system, if you need to access other nano controllers, you need to
perform a secondary SSH remote through the udp of the internal network segment 192.168.123.xxx. Take
nano controller 1 as an example:
ssh [email protected]
Password:123
The back of the robot opens the udp network cable interface, which is directly connected to the internal
switch. Therefore, after connecting the user's personal PC and the robot through the network cable, you can
access any controller. Take nano controller 1 as an example:
ssh [email protected]
Password:123
Note: Since the internal wired network of the robot is in the 192.168.123.xxx network segment, when the
personal PC and the robot are directly connected through the network cable, the network of the personal PC
needs to be set to the static 192.168.123.xxx network segment, which is static The ip should avoid conflict
with the ip of the board in the picture above
4
Go1 Software Manual
1.3 Units
The quadruped robot is like an animal, and its trunk and legs are bilaterally symmetrical. The four
legs are divided into two groups according to the front and back. The two groups are the same except
for the front and rear. The coordinate system and joint motion range of the two groups are the same.
But the coordinate system we defined is not mirror-symmetric, see section 1.4.2.
Number of legs and joints:
Leg0 FR = right front leg
Leg1 FL = left front leg
Leg2 RR = right rear leg
Leg3 RL = left rear leg
5
Go1 Software Manual
Considering the symmetry, we only provide parameters of necessary modules. You can find the
reference coordinate of each module in our 3D models. You can also find those parameters in our
ROS package.
Each module contains three key elements: mass, position of the center of mass(CoM) and
inertial tensor.
6
Go1 Software Manual
There are four force sensors at the same position of each foot. The position is as follows:
Force sensor
The blue part in the figure is the sensor, and the red arrow represents the direction of the force
sensor. The direction of the force on the sensor is determined by the specific contact form of the foot
end and the ground, which is perpendicular to the contact surface. If the foot contact is a multiple
point contact, the magnitude of the force can be equivalent to the combined force of these forces.
This sensor is sensitive to the direction of the vertical line at any point on the spherical surface. In
addition, the drift of this sensor is serious, and it needs to calibrate the zero point intermittently
(such as when the foot is off the ground).
2 Unitree_legged_sdk
User control to robot is divided into two types: high level control mode and low level control
mode. User can only be in one of the two modes at the same time, and cannot switch after running.
Under high-level control, initialize the target ip and port of udp as ip:192.168.123.161,
port:8082,
7
Go1 Software Manual
Under the control of the bottom layer, the target ip and port of the initialization udp are
ip:192.168.123.10, port:8007.
In low level mode, the motor also has three modes: torque mode, speed mode, and position
mode.
Unlike other API through function calls, our API is all through communication interface that
packaged into “ struct ” , which is more convenient to development. The default workspace is
“ ~/unitree_legged_sdk ” . Before control the robot, the library file “ libunitree_legged_sdk.so ” and
header file ” unitree_legged_sdk.h ” should be included. This library is the most commonly used
library by developers and contains the communication interface required for control
For details, please refer to《unitree_legged_sdk manual》
3 Go1_ros
unitreerobotics/unitree_ros (github.com)
Before using it, please note that the ros package only contains the simulation part,If you need to
control the robot, you need to compile the routine of unitree_ros_to_realandunitree_rosin the same
workspace..We provide a ROS interface that can control the virtual robot. Put the "unitree_ros" folder
into the catkin workspace
(Generally: ~/catkin_ws/src/unitree_ros), then compile:
cd ~/catkin_ws
catkin_make
In ROS, the node itself contains many basic data types for communication. It is necessary to
define data sets needed by robots, like structures in C language. The msgs we use are in the
go1_msgs folder, and the content is consistent with the communication architecture used in the Go1
API. You need to compile go1_msgs with catkin_make first, otherwise you may have dependency
problems (such as that you cannot find the header file).
8
Go1 Software Manual
3.2 Rviz
The robot description file uses the xacro format, which is more concise than the URDF format, and
contains details of the robot joint limit, collision space, kinematics and dynamics. The collision space uses
simple geometric shapes to improve the performance of the physics engine. Rviz of ROS is only used for
visualization. You can use joint_state_publisher to check the link and the range of motion of each joint.
See how to use it
unitree_ros/go1_rviz.launch at master · unitreerobotics/unitree_ros (github.com)
3.3 Gazebo
In Gazebo, if you want to get simulated data (such as joint angle, speed, force), you need to achieve
this through plugins. After calling the Gazebo API, the data should be put into the node for
communication. Also note that many plugins need to rely on links, joints or modules. For further details,
refer to "gazebo. xacro" file. The following shows how to build a plugin that can visualize the foot force.
Plugin for obtaining foot force
First, the contact force between the foot and the ground should be obtained. For more information,
see "foot_contact_plugin.cc". This plug-in belongs to the sensor plugin.
Plugin for force visualization
After obtaining the force value, it needs to be visualized. For more information, see
"draw_force_plugin.cc". This plugin belongs to the visual plugin.
9
Go1 Software Manual
Each node is a process, so we need two terminals here. Firstly, make sure the compilation:
cd ~/catkin_ws
catkin_make
Terminal-1 will initiate scene, plugins and controllers by roslaunch:
roslaunch unitree_gazebo normal.launch rname:=go1 wname:=stairs
Terminal-2 will run all the nodes:
rosrun unitree_controller unitree_servo
We also provide a node for imposing an external force to simulation the outside disturbance:
rosrun unitree_controller unitree_external_force
The real-time performance of ROS 1 is not guaranteed. Sending UDP instructions in ROS nodes may
cause communication abnormalities. It should be noted that in the communication with robot, ROS
Subscriber/Publisher is not adopted to transfer data. As an alternative, LCM is used to transfer messages
between processes. Non-real-time ROS processes will not affect the real-time process while controlling
robot to ensure real-time performance.
In LCM Server, LCM commands will be converted into UDP commands to send down, UDP status
will be converted into LCM status to send up. In ROS, a node can be set up to send LCM commands and
receive LCM status separately.
Here take low-level control as an example, and we need three terminals here.
Firstly,copy go1_real to~/catkin_ws/src,and compile it:
cd ~/catkin_ws
catkin_make
Running lcm server:
10
Go1 Software Manual
sudo ~/unitree_legged_sdk/build/sdk_lcm_server_low
4 Go1_camera_SDK
GO1 EDU itself contains 5 sets of cameras. UnitreeCameraSDK is a cross-platform library of the
stereo camera. It can provide depth and color video streams, internal calibration information, and depth
images where the point cloud is aligned with the color image.
4.1.1dependency
4.1.2 compile
11
Go1 Software Manual
cmake ../
make
4.1.3 run
Open the binary files in the "bins" folder in the middle section and run the routines directly when the
camera is not in use, such as
sudo ./bins/example_getRawFrame
sudo ./bins/example_getCalibaParamsFile
output_camCalibParams.yam
Param:
Include:
StereoCameraCommon.hpp
Declared the stereo camera algorithm API, such as image capture, image correction, parallax
calculation, depth image and point cloud generation functions。
SystemLog.hpp
It declares the API of the logging system
UnitreeCameraSDK.hpp
It declares the unitree camera API, which inherits the API of the StereoCamera class, and updates the
camera firmware to the camera
Examples:
12
Go1 Software Manual
13