Robot Mower Communications Standard
Inhaltsverzeichnis
- 1 Abstract
- 2 Requirements
- 3 Message format
- 4 Messages
- 5 Command: Request or onfigure a message event (frequency, one-time events)
- 6 Command: Set mowing state (start,stop,dock)
- 7 Command: Move robot until sensor trigger
- 8 Command: Keep ongoing action (mower communications saftety)
- 9 Robot state event (robot state, errors, battery, charger)
- 10 Robot mower configuration event (protocol version, type of sensors)
- 11 motor current sensor data event
- 12 ultrasonic sensor data event
- 13 bumper sensor data event
- 14 odometry data event
- 15 GPS data event
- 16 perimeter sensor data event
- 17 drop sensor data event
- 18 IMU data event
- 19 beacon ranging data event (e.g. DW1000)
- 20 Proprietary
Abstract
Robot Mower Communications Standard (RMCS) - *** DRAFT ***
Describes message format used to externally control a robot mower (e.g. Ardumower-based) using a serial line (PC/Raspberry/Android etc.)
TODO:
- add sensor trigger events
- add robot setup commands
Requirements
- Serial interface (or serial USB)
- ...
Message format
NMEA 0183 compatible format (ASCII encoded)
message structure: $IDMSG,data,*XX<cr><lf>
message components:
- $: start of message symbol
- ID: device ID (the destination of a command message or source of an event message) - examples: RM (robot mower), DW (ranging beacons), ...
- MSG: message type (see below)
- data: comma separated message data (see below) - if a value is not existing it should be empty
- XX: checksum: representation of two hexadecimal characters of an XOR of all characters in the sentence between – but not including – the $ and the * character.
- <cr><lf>: end of message symbol
example: $RMSTA,145984,1,,,179.8,,,0,0*3F<cr><lf>
Messages
There are command and event messages. Command messages are received by the robot, event messages are sent by the robot.
commands:
- $RMREQ: Request an event or configure message event command (frequency, one-time events etc.)
- $RMTRG: Configure a sensor trigger
- $RMMOW: Set mowing state command (start mowing, stop mowing, go to docking station)
- $RMMOV: Move robot until sensor trigger command
- $RMKOA: Keep ongoing action command (mower communications saftety)
events:
- $RMSTA: Robot state event (robot state, errors, battery, charger)
- $RMCFG: Robot mower configuration event (protocol version, available sensors)
- $RMMOT: motor current sensor event
- $RMSON: ultrasonic sensor event
- $RMBUM: bumper sensor event
- $RMODO: odometry event
- $RMGPS: GPS event
- $RMPER: perimeter sensor event
- $RMDRO: drop sensor event
- $RMIMU: IMU event
- $RMBEA: beacons ranging data event (e.g. DW1000)
Command: Request or onfigure a message event (frequency, one-time events)
This command is used to configure the frequency for an event message or to request a certain message once.
$RMREQ,MSG,f,t<cr><lf>
- MSG: the message type (CFG, STA, TRG, MOT, SON, BUM etc.)
- f: frequency (0 - 10.0 Hz), 0 means turn off periodic events for this message, -1 means fire message once
- t: enable trigger for this message (0/1)
Command: Set mowing state (start,stop,dock)
This command is used to for remote controlling the mower actions.
$RMMOW,s<cr><lf>
- s: stop mowing (0), start mowing (1), go to docking station (2)
Command: Move robot until sensor trigger
This command is used to control the robot movements directly. Once a sensor triggers (bumper, perimeter, etc.), the robot should stop.
$RMMOV,m,l,r,p,i,d<cr><lf>
- m: mowing motor on (1) or off (0)
- l: left motor target rpm
- r: right motor target rpm
- p: PID_Kp
- i: PID_Ki
- d: PID_Kd
Command: Keep ongoing action (mower communications saftety)
This command is used to control the robot movements directly. The mower will stop motors if not receiving another message within 2 seconds.
$RMKOA<cr><lf>
Robot state event (robot state, errors, battery, charger)
Robot will send current state via this message.
$RMSTA,ts,s,e,b,bl,c,h,d<cr><lf>
- ts: timestamp ms
- s: robot state: stopped (0), mowing (1), busy (2), error (3), going to dock (4)
- o: docking state: not docked (0), docked (1)
- e: error code
- b: battery percent
- bl: battery low (0/1)
- c: charging percent
- h: absolute compass heading in degree
- d: moved distance in meter since last message
Robot mower configuration event (protocol version, type of sensors)
Robot will send a summary of the robot's configuration via this message.
$RMCFG,p,m,d,pfl,pfr,pfc,prl,prr,prc,ih,ip,o,g,ul,ur,uc,dl,dr<cr><lf>
- p: robot is using protocol version (currently 1)
- m: robot requires minimum protocol version (currently 1)
- d: Docking station available (1/0)
- pfl: perimeterFrontLeft available (1/0)
- pfr: perimeterFrontRight available (1/0)
- pfc: perimeterFrontCenter available (1/0)
- prl: perimeterRearLeft available (1/0)
- prr: perimeterRearRight available (1/0)
- prc: perimeterRearCenter available (1/0)
- ih: IMU compass available (1/0)
- ip: IMU pitch/roll available (1/0)
- o: Odometry available (1/0)
- g: GPS available (1/0)
- ul: ultrasonicLeft available (1/0)
- ur: ultrasonicRight available (1/0)
- uc: ultrasonicCenter available (1/0)
- dl: dropSensorLeft available (1/0)
- dr: dropSensorRight available (1/0)
motor current sensor data event
$RMMOT,ts, ml, mr, mm, mlt, mrt, mmt
- ts: timestamp ms
- ml: left motor current (Ampere)
- mr: right motor current (Ampere)
- mm: mower motor current (Ampere)
- mlt: left motor stall triggered (0/1)
- mrt: left motor stall triggered (0/1)
- mmt: mower motor stall triggered (0/1)
ultrasonic sensor data event
$RMSON,ts,ul,ur,uc,ult,urt,uct
- ts: timestamp ms
- ul: ultrasonicLeft meter
- ur: ultrasonicRight meter
- uc: ultrasonicCenter meter
- ult: ultrasonicLeft triggered (0/1)
- urt: ultrasonicRight triggered (0/1)
- uct: ultrasonicCenter triggered (0/1)
bumper sensor data event
$RMBUM,ts,bl,br,bc,blt,brt,bct
- ts: timestamp ms
- bl: bumperLeft value
- br: bumperRight value
- bc: bumperCenter value
- blt: bumperLeft triggered (0/1)
- brt: bumperRight triggered (0/1)
- bct: bumperCenter triggered (0/1)
odometry data event
$RMODO,ts, ol, or
- ts: timestamp ms
- ol: left odometry
- or: right odometry
GPS data event
$RMGPS,ts, ga, go
- ts: timestamp ms
- ga: GPSlatitude
- go: GPSlongitude
perimeter sensor data event
$RMPER,ts,pfl,pfr,pfc,prl,prr,prc,pflr,pfrt,pfct,prlt,prrt,prct
- ts: timestamp ms
- pfl: perimeterFrontLeft value
- pfr: perimeterFrontRight value
- pfc: perimeterFrontCenter value
- prl: perimeterRearLeft value
- prr: perimeterRearRight value
- prc: perimeterRearCenter value
- pflt: perimeterFrontLeft triggered (0/1)
- pfrt: perimeterFrontRight triggered (0/1)
- pfct: perimeterFrontCenter triggered (0/1)
- prlt: perimeterRearLeft triggered (0/1)
- prrt: perimeterRearRight triggered (0/1)
- prct: perimeterRearCenter triggered (0/1)
drop sensor data event
$RMDRO,ts,dl,dr,dlt,drt
- ts: timestamp ms
- dl: left drop sensor value (0/1)
- dr: right drop sensor value (0/1)
- dlt: left drop sensor triggered (0/1)
- drt: right drop sensor triggered (0/1)
IMU data event
$RMIMU,ts,ih,ip,ir,tr
- ts: timestamp ms
- ih: IMUcompassHeading degree
- ip: IMUpitch degree
- ir: IMUroll degree
- tr: tilt triggered (0/1)
beacon ranging data event (e.g. DW1000)
$RMBEA,t,b1,b2,b3,b4,...<cr><lf>
- t: timestamp ms
- b1,b2,b3,b4,...: beacons ranging in meter
Proprietary
- Any proprietary message types not defined by this protocol