1 FAQ
Q1: Why is there no effect after the message is sent?
- Check whether the QoS configuration matches (Reliable vs Best Effort)
- Confirm whether the topic name is correct
- Check whether the robot is in the correct motion state (e.g., joint commands only take effect in
joint_bridgemode)
Q2: How to determine the joint index?
- Refer to the robot configuration documentation
- Use
ros2 topic echo /hardware/joint_stateto view the number of joints - Usually numbered sequentially starting from 0
Q3: What to do if control is unstable?
- Lower the stiffness parameter
- Increase the damping parameter
- Increase the control frequency
- Check whether the target position is within a reasonable range
Q4: How to handle request_id errors?
- Subscribe to the state topic to get the current request_id
- Ensure the sent request_id = current ID + 1
- If the state is out of sync, wait for the next state message
2 Unit Conversion Reference
| Conversion | Formula |
|---|---|
| Angle to radian | rad = deg × π / 180 |
| Radian to angle | deg = rad × 180 / π |
| Degree/second to radian/second | rad/s = deg/s × π / 180 |
3 Development Suggestions
- First use the example program to test whether the interface works properly
- Gradually modify parameters to observe the effect
- Use
ros2 topic echoto monitor messages - Use
ros2 topic hzto check the publish frequency - Implement a safety protection mechanism (velocity limit, timeout detection, etc.)
4 Original Content of Message Definition Files
The following is the original content of all message definition files in the interface_protocol package, from the GitHub repository.
4.1 JointCommand.msg
PLAIN |
4.2 JointState.msg
PLAIN |
4.3 MotionState.msg
PLAIN |
4.4 MotionStateRequest.msg
PLAIN |
4.5 BodyVelCmd.msg
PLAIN |
4.6 LedControl.msg
PLAIN |
4.7 JointMotionPlanRequest.msg
PLAIN |
4.8 JointMotionPlanState.msg
PLAIN |
4.9 JointOverrideCommand.msg
PLAIN |
📎 Source files in the open-source repository for this chapter (click file name to jump to GitHub): BodyVelCmd.msg · JointCommand.msg · JointMotionPlanRequest.msg · JointMotionPlanState.msg · JointOverrideCommand.msg · JointState.msg · LedControl.msg · MotionState.msg · MotionStateRequest.msg
