5.6 Developer Mode
AimDK Developer Mode for AgiBot X2 - By disabling the capabilities of Zhiyuan’s native system software, it grants users greater system control privileges.
Developers can enable a specific developer mode to deactivate the native AgiBot software, facilitating the deployment of their own applications and the takeover of certain system capabilities. This module complies with ROS2 standards, supports both C++ and Python programming languages, and provides developers with a unified switching interface.The mode-switch and locomotion interfaces provide core capabilities for switching motion modes and controlling walking/running.
Mode |
Value |
Description |
Use cases |
|---|---|---|---|
Default State |
|
The default state of robot initialization |
Developers need to restart or switch the robot back to that mode to re-enable the original features after completing the code development. |
Develop mode of Interaction(Linux) |
|
Disable |
Release the occupation of the system audio device. Developers can manually open the |
Develop mode of Interaction(ROS) |
|
Disable |
Developers can obtain the raw audio stream by subscribing to ROS topics for interactive development. |
Develop mode of Navigation |
|
Disable all autonomous capabilities of AgiBot X2, including: navigation, mapping, planning, and perception. |
Developers can independently develop the robot’s navigation, mapping, planning, and perception functions. |
Develop mode of Motion Control |
|
Disable AgiBot X2 native motion control. |
Developers can directly send data to the |
**Note: After completing development, be sure to switch the robot back to the Ready state or perform a full reboot to ensure exiting developer mode.
5.6.1 Check system status
Service name |
Data type |
Description |
|---|---|---|
|
|
Check system status |
GetSystemStateros2-srv @ sm/srv/GetSystemState.srv# Check system status # Service name: /aimdk_5Fmsgs/srv/GetSystemState # Request Header CommonRequest header # ---------------------------------------------------- req --- # --------------------------------------------------- # ---------------------------------------------------- resp # Response header CommonResponse header # ----------------------------------------------------- # State name string cur_state # ---------------------------------------------------- # current system status SystemStatus curr_status
SystemStatusros2-msg @ sm/msg/SystemStatus.msguint8 value uint8 IN_INITIAL = 0 # Initial state uint8 IN_READY = 1 # Ready state (can execute services) uint8 IN_MOVE = 2 # Migration state (cannot execute services, rejects migration requests) uint8 IN_ROLLBACK = 3 # Rollback state (cannot execute services, rejects migration requests) uint8 IN_FALLBACK = 4 # Exception state (accepts migration requests) uint8 IN_FALLBACK_MOVE = 5 # Exception migration state (cannot execute services, rejects migration requests)
5.6.2 Migrate to Develop mode
Service name |
Data type |
Description |
|---|---|---|
|
|
Migrate to Develop mode |
MigrateSystemStateros2-srv @ sm/srv/MigrateSystemState.srv# Migrate to Develop mode # Service name: /aimdk_5Fmsgs/srv/MigrateSystemState # ---------------------------------------------------- # Request Header CommonRequest header #---------------------------------------------------- # target state string state # ---------------------------------------------------- req --- # --------------------------------------------------- # ---------------------------------------------------- resp # Response Header CommonResponse header
5.6.3 Programming example
For detailed programming examples and code explanations, please refer to:
C++ examples: Developer Mode
Python examples: Developer Mode
5.6.4 Safety precautions
Warning
Do not use system modes not mentioned in this section.
Mode switching must ensure the robot is in a safe state.
After completing development, be sure to switch back to
Readymode or perform a full system reboot.