Serial Commands

Supported Boards (Main Controller = MC, Dynamixel Controller = DC, Audio/Mouth/Eyes = AME, Arm Controller = AC, Eyes = E)

Important: You must run the B_INIT command to initiate a handshake between the Main Controller and the SLAM base robot before sending any other commands to the base. If the base is rebooted, B_INIT must be sent again.


πŸ”§ System & Setup Commands

PING

  • Boards: MC, DC, AME, AC

  • JSON: βœ…

  • Description: Pings all attached boards and returns which ones are connected.

  • Usage: PING

VERSION

  • Boards: MC, DC, AME, AC

  • JSON: βœ…

  • Description: Reports firmware versions. On MC, it also reports versions for all connected boards.

  • Usage: VERSION

JSON,enabled

  • Boards: MC

  • JSON: βœ…

  • Description: Enables/disables JSON formatted responses for easier parsing.

  • Usage: JSON,1

  • Params:

    • enabled: 0 = Off, 1 = On (default off)

TOFS,enabled

  • Boards: MC

  • JSON: βœ…

  • Description: Enables/disables Time-of-Flight (ToF) object avoidance.

  • Usage: TOFS,0

  • Params:

    • enabled: 0 = Off, 1 = On (default)


πŸ€– SLAM Base Commands

B_INIT

  • Boards: MC

  • JSON: ❌

  • Description: Initializes handshake with SLAM base (must be sent once per power cycle).

  • Usage: B_INIT

B_MODE,mode

  • Boards: MC

  • JSON: ❌

  • Description: Sets base mode. (Untested; report findings on Discord.)

  • Usage: B_MODE,11

  • Params: mode = 0..12

B_START

  • Boards: MC

  • JSON: ❌

  • Description: Wakes robot, undocks, and starts LiDAR.

  • Usage: B_START

B_QUICKMAP

  • Boards: MC

  • JSON: ❌

  • Description: Starts quick mapping (may not save map).

  • Usage: B_QUICKMAP

B_GOTO,x,y,angle,speed

  • Boards: MC

  • JSON: ❌

  • Description: Drives robot to a specified pose on an existing map.

  • Usage: B_GOTO,0.5,-1,0,0.1

  • Params:

    • x, y: in meters

    • angle: in degrees

    • speed: in m/s (e.g., 0.1)

B_DOCK

  • Boards: MC

  • JSON: ❌

  • Description: Sends robot to charging dock.

  • Usage: B_DOCK

B_KILL

  • Boards: MC

  • JSON: ❌

  • Description: Unknown effect (untested).

  • Usage: B_KILL

B_BUMP,left,right

  • Boards: MC

  • JSON: βœ…

  • Description: Simulates bump sensor triggers.

  • Usage: B_BUMP,1,1

  • Params:

    • left, right: 0 = No bump, 1 = Triggered

B_DRIVE,linear_velocity,angular_velocity

  • Boards: MC

  • JSON: βœ…

  • Description: Direct drive control of base.

  • Usage: B_DRIVE,-50,0

  • Params:

    • linear_velocity: mm/s

    • angular_velocity: degrees/s

B_MAPLIST

  • Boards: MC

  • JSON: βœ…

  • Description: Lists stored maps and their IDs.

  • Usage: B_MAPLIST

B_MAPDATA,map_id

  • Boards: MC

  • JSON: βœ…

  • Description: Returns lz4-compressed map data.

  • Usage: B_MAPDATA,10

  • Params: map_id

B_STATUS

  • Boards: MC

  • JSON: βœ…

  • Description: Returns current base status packet.

  • Usage: B_STATUS

B_POSE

  • Boards: MC

  • JSON: βœ…

  • Description: Reports robot's current pose after localization.

  • Usage: B_POSE


🧠 Head Commands (AI Pro / Elite)

H_IDLE,enabled

  • Boards: MC, DC

  • JSON: ❌

  • Description: Enables/disables head idle animation.

  • Usage: H_IDLE,0

  • Params: enabled = 0 = Off, 1 = On

H_LOOK,yaw,pitch,speed

  • Boards: MC, DC

  • JSON: ❌

  • Description: Sets head yaw/pitch; disables IDLE.

  • Usage: H_LOOK,180.0,180.0,10

  • Params:

    • yaw: degrees (100.0–260.0)

    • pitch: degrees (150.0–250.0)

    • speed: 6–70

H_GAZE,x,y

  • Boards: MC, AME, E

  • JSON: ❌

  • Description: Controls gaze direction on LCD eyes.

  • Usage: H_GAZE,0,-0.36

  • Params:

    • x, y: -1.0 to 1.0


πŸ€– Arm Commands (AI Elite)

A_CAL

  • Boards: MC, AC

  • JSON: ❌

  • Description: Calibrates the gripper's closed position.

  • Usage: A_CAL

A_OPEN

  • Boards: MC, AC

  • JSON: ❌

  • Description: Fully opens the gripper.

  • Usage: A_OPEN

A_CLOSE

  • Boards: MC, AC

  • JSON: ❌

  • Description: Closes the gripper until resistance or fully closed.

  • Usage: A_CLOSE

A_ANGLE,joint,angle,speed

  • Boards: MC, AC

  • JSON: ❌

  • Description: Sets a single joint's angle.

  • Usage: A_ANGLE,6,-30.0,20

  • Params:

    • joint: 1–6

    • angle: degrees

    • speed: 0–100

A_ANGLES,j1,j2,j3,j4,j5,j6,speed

  • Boards: MC, AC

  • JSON: ❌

  • Description: Sets all joint angles at once.

  • Usage: A_ANGLES,0,0,0,0,0,0,30

  • Params:

    • j1..j6: degrees (range: -165.0 to 165.0, joint 6 up to 175.0)

    • speed: 0–100

Last updated