Robot Mower Communications Standard: Unterschied zwischen den Versionen

Aus www.wiki.ardumower.de
Wechseln zu: Navigation, Suche
(ultrasonic sensor event)
(motor sensor event)
Zeile 127: Zeile 127:
 
$RMKOA<cr><lf>
 
$RMKOA<cr><lf>
  
=motor sensor event=
+
=motor current sensor event=
 
$RMMOT: ts, ml, mr, mm,  
 
$RMMOT: ts, ml, mr, mm,  
  
 
*ts: timestamp ms
 
*ts: timestamp ms
*ml: left motor
+
*ml: left motor current
*mr: right motor
+
*mr: right motor current
*mm: mower motor
+
*mm: mower motor current
  
 
=ultrasonic sensor event=
 
=ultrasonic sensor event=

Version vom 8. Januar 2017, 18:06 Uhr

Robot Mower Communications Standard (RMCS)

Describes message format used to externally control a robot mower (e.g. Ardumower-based) using a serial line (PC/Raspberry/Android etc.)

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: $RMSEN,1,1,,,,0,1,,0,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.

  • $RMMOW: Set mowing state command (start mowing, stop mowing, go to docking station)
  • $RMSTA: Robot state event (robot state, errors, battery, charger)
  • $RMTRG: Robot sensor trigger event (sensor trigger counters)
  • $RMCFG: Robot mower configuration event (protocol version, available sensors)
  • $RMMOV: Move robot until sensor trigger command
  • $RMKOA: Keep ongoing action command (mower communications saftety)
  • $RMSON: ultrasonic sensor event
  • $RMBUM: bumper sensor event
  • $RMODO: odometry event
  • $RMGPS: GPS event
  • $RMPER: perimeter sensor event
  • $RMIMU: IMU event
  • $RMBEA: beacons ranging data event (e.g. DW1000)

Set mowing state command (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)

Robot state event (robot state, errors, battery, charger)

Robot will send current state via this message.

$RMSTA,ts,s,e,b,bl,c,h,l,r<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
  • l: left odometry counter
  • r: right odometry counter

Robot sensor trigger event (sensor trigger counters)

Robot will send a summary of triggered sensors via this message.

$RMTRG,ts,ml,mr,bl,br,bc,pfl,pfr,pfc,prl,prr,prc,t,ul,ur,uc<cr><lf>

  • ts: timestamp ms
  • ml: motorLeftStall
  • mr: motorRightStall
  • bl: bumperLeft
  • br: bumperRight
  • bc: bumperCenter
  • pfl: perimeterFrontLeft
  • pfr: perimeterFrontRight
  • pfc: perimeterFrontCenter
  • prl: perimeterRearLeft
  • prr: perimeterRearRight
  • prc: perimeterRearCenter
  • t: robot orientation tilt
  • ul: ultrasonicLeft
  • ur: ultrasonicRight
  • uc: ultrasonicCenter

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,i,d,pfl,pfr,pfc,prl,prr,prc,ih,ip,o,g,ul,ur,uc<cr><lf>

  • p: robot is using protocol version (currently 1)
  • m: robot requires minimum protocol version (currently 1)
  • i: messages implemented bitmask ($RMMOW, $RMSTA, $RMSEN, $RMTRG, $RMCFG, $RMMOV, $RMKOA, $RMBEA) - example: 10001000
  • 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)

Move robot until sensor trigger command

This command is used to control the robot movements directly.

$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

Keep ongoing action command (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>

motor current sensor event

$RMMOT: ts, ml, mr, mm,

  • ts: timestamp ms
  • ml: left motor current
  • mr: right motor current
  • mm: mower motor current

ultrasonic sensor event

$RMSON: ts, bl, br, bc,

  • ts: timestamp ms
  • ul: ultrasonicLeft
  • ur: ultrasonicRight
  • uc: ultrasonicCenter

bumper sensor event

$RMBUM: ts, bl, br, bc

  • ts: timestamp ms
  • bl: bumperLeft
  • br: bumperRight
  • bc: bumperCenter

odometry event

$RMODO: ts, ol, or

  • ts: timestamp ms
  • ol: left odometry
  • or: right odometry

GPS event

$RMGPS: ts, ga, go

  • ts: timestamp ms
  • ga: GPSlatitude
  • go: GPSlongitude

perimeter sensor event

$RMPER: ts, pfl, pfr, pfc, prl, prr, prc

  • ts: timestamp ms
  • pfl: perimeterFrontLeft
  • pfr: perimeterFrontRight
  • pfc: perimeterFrontCenter
  • prl: perimeterRearLeft
  • prr: perimeterRearRight
  • prc: perimeterRearCenter

IMU event

$RMIMU: ts, ih, ip, ir

  • ih: IMUcompassHeading degree
  • ip: IMUpitch degree
  • ir: IMUroll degree

beacon ranging data event (e.g. DW1000)

$RMBEA,t,b1,b2,b3,b4,...<cr><lf>

  • t: timestamp ms
  • b1,b2,b3,b4,...: beacon ranging in meter


Proprietary

  • Any proprietary message types not defined by this protocol