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

Ready

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)

Develop_Audio_Linux

Disable hal_audio

Release the occupation of the system audio device. Developers can manually open the /dev to handle the raw audio stream.

Develop mode of Interaction(ROS)

Develop_Audio_ROS

Disable agent

Developers can obtain the raw audio stream by subscribing to ROS topics for interactive development.

Develop mode of Navigation

Develop_Nav

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

Develop_MC

Disable AgiBot X2 native motion control.

Developers can directly send data to the ethercat module for full-body robot control.

**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

/aimdk_5Fmsgs/srv/GetSystemState

aimdk_msgs/srv/GetSystemState

Check system status

  • GetSystemState ros2-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
    
    • SystemStatus ros2-msg @ sm/msg/SystemStatus.msg

          uint8 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

/aimdk_5Fmsgs/srv/MigrateSystemState

aimdk_msgs/srv/MigrateSystemState

Migrate to Develop mode

  • MigrateSystemState ros2-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:

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 Ready mode or perform a full system reboot.