Skip to content

Autonomous Charging Interface

Send UDP commands to the perception host 192.168.1.105:3333.

The autonomous charging function includes the following states:

  1. Idle: State when charging is not activated.
  2. Charging Task: Robot returns to the charging dock after receiving the start charging command.
  3. Charging: Robot is on the charging dock and charging current is detected.
  4. End Charging: Robot stands up and exits the dock after receiving the end charging command.
  5. Dock Power Loss: Robot fails to detect charging current during charging. It will automatically return to the Charging state once current is detected again.
  6. Charging Error: An error occurred during the charging task.

State transitions are shown below:

Charging State Transition

Autonomous charging uses a request-response interaction. The perception host processes requests and returns responses with the current charging state value.

Command NameCommand CodeCommand ValueCommand TypeFunction
Start charging0x9191025010Request to start charging
End charging0x9191025000Request to end charging
Reset task0x9191025020Clear charging state, return to idle
Query status0x9191025300Query autonomous charging status

After receiving command code 0x91910250, the perception host returns a response with charge_manager_state:

Command ValueCharging State
0x0000idle
0x0001do_charge_task
0x0002charging
0x0003do_over_charge_task
0x0004pile_error
0x0005safety_warning (please unplug the charger first)
Command ValueError Description
0x1002TAGRECETIMEOUT — Localization info retrieval timeout
0x1003MARKLAUNCHFAILED — Localization algorithm launch failed
0x1004GOTOSTACKFAILED — Arrival timeout
0x1005TAGNOVALUE — No localization info
0x1006TAGPOSEJUMP — Localization info jump
0x1007NOCHARGEPLUG — Charging current detection failed, on dock
0x100aNOCHARGEPLUG_STEP_BACK — Charging current detection failed, exiting dock

When querying real-time basic status (Type=1002) via TCP, the response includes:

ParameterDescriptionNotes
ChargeStateAutonomous charging statusNot charging=0, Charging=1
OnDockStateWhether on the charging dockNot on dock=0, On dock=1