Analysis of Protocol Learning for Jueying Quadruped Robot in Deep Cloud

Jueying quadruped robot communication protocol learning analysis

This learning document introduces the communication protocol of the Yunshen Jueying X20 quadruped robot, and briefly analyzes the related communication mechanisms and command formats. This protocol is used for TCP communication between the robot system and the host computer (such as an external board or system).

1. Protocol port number

In this protocol, the robot itself serves as the TCP server , and the host computer serves as the TCP client . The TCP server port number of the protocol is30000

2. Based on Service: Request/Response mechanism communication

The communication protocol interacts based on the request/response mode. The specific communication frame structure is as follows:

communication frame

  • Communication frame protocol frame header:

Communication frame protocol frame header

  • Communication frame data part:

The data part uses XML format for interaction.

<?xml version="1.0" encoding="UTF-8" ?>
<PatrolDevice>
<Type>1002</Type>  # 消息类型
<Command>1</Command>  # 命令码
<Time>2023-01-01 00:00:00</Time>  # 时间戳
<Items/>  # 参数项
</PatrolDevice>

The message type correspondence table is as follows:

Message Type Correspondence Table

3. Common communications

Some common communication examples are listed below. Others can be understood by viewing the above message type correspondence table.

3.1 Get State

Request:

<?xml version="1.0" encoding="UTF-8"?>
<PatrolDevice>
<Type>1002</Type>  # Get state
<Command>1</Command>  # default
<Time>2023-01-01 00:00:00</Time> 
<Items/>  # None
</PatrolDevice>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<PatrolDevice>
<Type>1002</Type>
<Command>1</Command>
<Time>2023-01-01 00:00:01</Time>
<Items>
<MotionState>0</MotionState>  # 运动状态
<PosX>0.0</PosX>  # 地图坐标系下的坐标x
<PosY>0.0</PosY>  # 地图坐标系下的坐标y
<PosZ>0.0</PosZ>  # 地图坐标系下的坐标z
<Yaw>0.0</Yaw>  # 地图坐标系下的偏航角
<Res>0.0</Res>  # 地图像素到真实地图长度比例
<X0>0.0</X0>  # 地图坐标系基准点
<Y0>0.0</Y0>  # 地图坐标系基准点

Insert image description here
The status is explained as follows:

state base

The motion status correspondence table is as follows:

exercise state table

Confuse

Why is there no feedback of the pitch and roll of the robot's own posture here?

3.2 Navigation request (Navigation)

The navigation request is an asynchronous request, suitable for the ROS Action model.

Request:

<?xml version="1.0" encoding="UTF-8"?>
<PatrolDevice>
<Type>1003</Type>  # 下发导航消息类型
<Command>1</Command>
<Time>2023-01-01 00:00:00</Time>
<Items>
<Value>100</Value>  # 该地图中的目标点编号
<MapID>1</MapID>  # 地图编号
<PosX>0.0</PosX>  # 目标点在地图坐标系的坐标x
<PosY>0.0</PosY>  # 目标点在地图坐标系的坐标y
<PosZ>0.0</PosZ>  # 目标点在地图坐标系的坐标z
<AngleYaw>0.0</AngleYaw>  # 目标点与地图基准点偏航角度值
<PointInfo>0</PointInfo>  # 目标点类型过渡/任务/充电(0,1,3)
<Gait>0</Gait>  # 步态(行走/楼梯/斜坡)
<Speed>0</Speed>  # 速度(0~2,low~high)
<Manner>0</Manner>  # 前进或后退(0/1)
<ObsMode>0</ObsMode>  # 障碍物检测开关(0/1)
<NavMode>0</NavMode>  # 导航方式直线或规划(0/1)
</Items>
</PatrolDevice>

Target point and obstacle detection

The transition point is only used to overcome terrain and restricted paths; the task point can perform inspection tasks, such as identifying meters; the charging point is a target point in front of the charging pile used to identify and locate the QR code of the charging pile.
Obstacle detection is divided into two methods: obstacle avoidance and obstacle stopping: when autonomous navigation is selected as the navigation method, the robot will automatically plan a path to avoid obstacles when encountering obstacles; when straight-line navigation is selected as the navigation method, the robot will automatically When encountering an obstacle, it will slow down and stand still until the obstacle disappears.

Confuse

0 # Target point type transition/task/charge (0, 1, 3)
What about 2? Reserved bit, spacer bit or something removed?

3.3 Navigation task execution status query

The corresponding navigation task execution status query is as follows:

Navigation task execution status query

Confuse

It seems that there is no process feedback? There is only execution status, which may need improvement. The Action mechanism in ROS2 can provide real-time feedback during navigation.
Insert image description here

3.3 Motion Control

The code tables corresponding to common sports types are as follows:

Command Description
1 W
2 S
3 Turn Left
4 Turn Right
5
6 walking in place
7
8
9
10
11 A
12 D
13 Soft Stop
14 Stop Walking
15 Get down on the ground

The given parameters are as follows:

Insert image description here

Confuse

What about 5? Reserved bits, gap bits or historical issues?

References

Jueying X20-Inspection Robot Body Monitoring Protocol V1.1.1 2023.6. 27

Guess you like

Origin blog.csdn.net/m0_56661101/article/details/131658133