Skip to content

3. Overview of the Software System

The robot is equipped with an x86_64 architecture industrial PC, running Ubuntu 22.04, and uses systemd as the system service manager. The agibot_em.service is configured as the entry point for the Agibot software system. This service starts automatically on boot and launches the EM (process startup management) and SM (process status management) modules. The EM and SM then work together to start the remaining module processes. The SM manages the state (start and stop) of process lists under different system modes. The configuration file paths for EM and SM are /agibot/software/v0/entry/bin/cfg/run_agibot.yaml and /agibot/software/v0/entry/bin/cfg/sm.yaml, respectively. The former lists the default processes to be started, while the latter specifies which groups of processes are enabled in each system mode.

The following diagram shows the logical layout of the main processes on the robot, displaying only the primary interaction relationships. Not all processes are started at the same time.

The table below provides explanations for the terms used in the diagram:

NameDescription/Function
AimMasterClient SoftwareUsed to operate the basic functions of the robot
OMPAgibot Cloud PlatformResponsible for receiving and processing telemetry data from the client side
SpeakerSpeakerUsed to play sounds
VRVirtual Reality DeviceUsed for remote operation of the robot
MCUMicrocontrollerControls the robot’s motors, receives motor and IMU information, communicates with HAL Ethercat to receive control instructions, and uploads motor and IMU information
MQTT BrokerMQTT GatewayGateway node that interfaces with AimMaster and the onboard software
emProcess Management ModuleResponsible for starting processes and querying their status
smSystem Status Management ModuleManages system state transitions and controls the process list
iox_roudiIceoryx Shared Memory Central NodeManages the central scheduling for Iceoryx communication
ota_mastersota_slave0ota_gatewayOTA Related Function ModulesHandles downloading OTA packages and executing the OTA process
recordbag0Data Recording ModuleRecords diagnostic data packets
settingSystem Settings ModuleManages device settings such as WIFI and volume
osmonitorSystem Monitoring ModuleMonitors system resource usage and basic operational status
resource_managerResource Management ModuleManages actions on the robot
skillpilotSkill Scheduling ModuleManages and arbitrates the execution of basic robot skills
data_exporterData Export ModuleCompresses and exports diagnostic data packets
reboot0Reboot ScriptReboots the system when called by the SM
hdsHealth Diagnosis ModuleReceives and processes fault information from various modules
InteractionVoice Interaction ModuleUsed for playing music and prompts, does not handle large model interactions
rcRemote Control ModuleProvides an interface for AimMaster to call basic robot functions such as expressions, movements, and walking
motion_playerMotion Playback ModulePlays specified motion files
motion_streamerMotion Streaming ModuleDedicated to remote operation, maps VR and motion capture suit data to the robot’s upper limb joint movements
gatewayGateway ModuleForwards external requests to internal modules, primarily from AimMaster
mcMotion Control ModuleManages the overall motion control of the robot
hal_ethercatHardware Abstraction Layer ModuleCommunicates with the MCU via EtherCAT, transmitting hardware status and commands
elink_log_dumpEtherCAT Communication Log ModuleLogs the communication between hal_ethercat and the MCU

Different sets of software functionalities are enabled under different system modes. The specific configurations are as follows (excerpted from /agibot/software/v0/entry/bin/cfg/sm.yaml):

system_modes:
"Startup": # Status Name
next_mode_list: [ "Ready", "OTA", "Poweroff" ] # List of Transitionable States
active_FG_list: [ "System", "EStop", "RC", "MoCap", "Gateway" ] # List of Functional Groups to Maintain
action_list:
- [ DIFF ]
"Poweroff":
next_mode_list: []
active_FG_list: []
action_list:
- [ open Poweroff ]
"Reboot":
next_mode_list: []
active_FG_list: []
action_list:
- [ open Reboot ]
"Ready":
next_mode_list: [ "Manual", "EStop", "Poweroff" ]
active_FG_list: [ "System", "EStop", "RC", "MoCap", "Gateway" ]
action_list:
- [ DIFF ]
"OTA":
next_mode_list: [ "Reboot", "Ready", "Poweroff" ]
active_FG_list: [ "System", "OTA", "Gateway" ]
action_list:
- [ DIFF ]
"Manual":
next_mode_list: [ "OTA", "Auto", "Reset", "EStop", "Poweroff", "Safe", "MotionStream" ]
active_FG_list: [ "System", "EStop", "RC", "MoCap", "Gateway", "Motion" ]
action_list:
- [ DIFF ]
- [ activate rc ]
post_process:
- level: 47
action_list: [ [ fallback mc ] ]
"Reset":
next_mode_list: [ "Reboot", "Poweroff" ]
active_FG_list: [ "System", "OTA", "Gateway" ]
action_list:
- [ DIFF ]
"EStop":
next_mode_list: [ "Ready", "OTA", "Poweroff" ]
active_FG_list: [ "System", "EStop", "RC", "MoCap", "Gateway" ]
action_list:
- [ DIFF ]
"Safe":
next_mode_list: [ "Manual", "EStop", "Poweroff" ]
active_FG_list: [ "System", "EStop", "Gateway", "Motion", "RC", "MoCap"]
action_list:
- [ DIFF ]
- [ deactivate mc, deactivate rc ]
# Real-time Teleoperation Status, used for real-time teleoperation
"MotionStream":
next_mode_list: [ "Manual", "EStop", "Poweroff" ]
active_FG_list: [ "System", "EStop", "RC", "Gateway", "Motion", "MoStream" ]
action_list:
- [ DIFF ]
- [ activate rc ]

Upon startup, the system transitions from Startup to Ready and then to Manual. When it reaches the Manual state, the initialization of the onboard software can be considered complete.