Robot Mower Communications Standard: Unterschied zwischen den Versionen

Aus www.wiki.ardumower.de
Wechseln zu: Navigation, Suche
(ultrasonic sensor data event)
 
(31 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
NOTE: THIS IS ONLY AN IDEA - NOT IMPLEMENTED IN ARDUMOWER (YET)
  
Robot Mower Communications Standard (RMCS) - *** DRAFT ***
+
=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.)
 
Describes message format used to externally control a robot mower (e.g. Ardumower-based) using a serial line (PC/Raspberry/Android etc.)
 +
 +
TODO:
 +
*add robot setup commands
  
 
=Requirements=
 
=Requirements=
Zeile 30: Zeile 35:
 
commands:
 
commands:
 
*$RMREQ: Request an event or configure message event command (frequency, one-time events etc.)
 
*$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)
 
*$RMMOW: Set mowing state command (start mowing, stop mowing, go to docking station)
 
*$RMMOV: Move robot until sensor trigger command
 
*$RMMOV: Move robot until sensor trigger command
Zeile 36: Zeile 42:
 
events:
 
events:
 
*$RMSTA: Robot state event (robot state, errors, battery, charger)
 
*$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)
 
*$RMCFG: Robot mower configuration event (protocol version, available sensors)
 
*$RMMOT: motor current sensor event
 
*$RMMOT: motor current sensor event
Zeile 48: Zeile 53:
 
*$RMBEA: beacons ranging data event (e.g. DW1000)
 
*$RMBEA: beacons ranging data event (e.g. DW1000)
  
=Request an event or configure message event command (frequency, one-time events, trigger events etc.)=
+
=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.
 
This command is used to configure the frequency for an event message or to request a certain message once.
  
Zeile 56: Zeile 61:
 
*t: enable trigger for this message (0/1)
 
*t: enable trigger for this message (0/1)
  
=Set mowing state command (start,stop,dock)=
+
=Command: Set mowing state (start,stop,dock)=
 
This command is used to for remote controlling the mower actions.
 
This command is used to for remote controlling the mower actions.
  
Zeile 62: Zeile 67:
 
*s:  stop mowing (0), start mowing (1), go to docking station (2)
 
*s:  stop mowing (0), start mowing (1), go to docking station (2)
  
=Move robot until sensor trigger command=
+
=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.
 
This command is used to control the robot movements directly. Once a sensor triggers (bumper, perimeter, etc.), the robot should stop.
Zeile 74: Zeile 79:
 
*d: PID_Kd
 
*d: PID_Kd
  
=Keep ongoing action command (mower communications saftety)=
+
=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.
 
This command is used to control the robot movements directly. The mower will stop motors if not receiving another message within 2 seconds.
Zeile 80: Zeile 85:
 
$RMKOA<cr><lf>
 
$RMKOA<cr><lf>
  
=Robot state event (robot state, errors, battery, charger)=
+
=Event: Robot state (robot state, errors, battery, charger)=
  
 
Robot will send current state via this message.
 
Robot will send current state via this message.
Zeile 95: Zeile 100:
 
*d: moved distance in meter since last message
 
*d: moved distance in meter since last message
  
=Robot sensor trigger event (sensor trigger counters)=
+
=Event: Robot mower configuration (protocol version, type of sensors)=
 
+
Robot will send a summary of triggered sensors (counters) via this message. Once a sensor triggers, the counter for this sensor should increase.
+
 
+
$RMTRG,ts,ml,mr,bl,br,bc,pfl,pfr,pfc,prl,prr,prc,t,ul,ur,uc,dl,dr<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
+
*dl: dropSensorLeft
+
*dr: dropSensorRight
+
 
+
=Robot mower configuration event (protocol version, type of sensors)=
+
  
 
Robot will send a summary of the robot's configuration via this message.
 
Robot will send a summary of the robot's configuration via this message.
Zeile 143: Zeile 124:
 
*dr: dropSensorRight available (1/0)
 
*dr: dropSensorRight available (1/0)
  
=motor current sensor data event=
+
=Event: motor current sensor data=
 
$RMMOT,ts, ml, mr, mm, mlt, mrt, mmt
 
$RMMOT,ts, ml, mr, mm, mlt, mrt, mmt
  
Zeile 154: Zeile 135:
 
*mmt: mower motor stall triggered (0/1)
 
*mmt: mower motor stall triggered (0/1)
  
=ultrasonic sensor data event=
+
=Event: ultrasonic sensor data=
 
$RMSON,ts,ul,ur,uc,ult,urt,uct
 
$RMSON,ts,ul,ur,uc,ult,urt,uct
  
Zeile 165: Zeile 146:
 
*uct: ultrasonicCenter triggered (0/1)
 
*uct: ultrasonicCenter triggered (0/1)
  
=bumper sensor data event=
+
=Event: bumper sensor data=
$RMBUM,ts, bl, br, bc
+
$RMBUM,ts,bl,br,bc,blt,brt,bct
  
 
*ts: timestamp ms
 
*ts: timestamp ms
*bl: bumperLeft
+
*bl: bumperLeft value
*br: bumperRight
+
*br: bumperRight value
*bc: bumperCenter
+
*bc: bumperCenter value
 +
*blt: bumperLeft triggered (0/1)
 +
*brt: bumperRight triggered (0/1)
 +
*bct: bumperCenter triggered (0/1)
  
=odometry data event=
+
=Event: odometry data=
 
$RMODO,ts, ol, or
 
$RMODO,ts, ol, or
  
Zeile 180: Zeile 164:
 
*or: right odometry
 
*or: right odometry
  
=GPS data event=
+
=Event: GPS data=
 
$RMGPS,ts, ga, go
 
$RMGPS,ts, ga, go
  
Zeile 187: Zeile 171:
 
*go: GPSlongitude
 
*go: GPSlongitude
  
=perimeter sensor data event=
+
=Event: perimeter sensor data=
$RMPER,ts, pfl, pfr, pfc, prl, prr, prc
+
$RMPER,ts,pfl,pfr,pfc,prl,prr,prc,pflr,pfrt,pfct,prlt,prrt,prct
 
*ts: timestamp ms
 
*ts: timestamp ms
*pfl: perimeterFrontLeft
+
*pfl: perimeterFrontLeft value
*pfr: perimeterFrontRight
+
*pfr: perimeterFrontRight value
*pfc: perimeterFrontCenter
+
*pfc: perimeterFrontCenter value
*prl: perimeterRearLeft
+
*prl: perimeterRearLeft value
*prr: perimeterRearRight
+
*prr: perimeterRearRight value
*prc: perimeterRearCenter
+
*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=
+
=Event: drop sensor data=
$RMDRO,ts, dl, dr
+
$RMDRO,ts,dl,dr,dlt,drt
 
*ts: timestamp ms
 
*ts: timestamp ms
*dl: left drop sensor
+
*dl: left drop sensor value (0/1)
*dr: right drop sensor
+
*dr: right drop sensor value (0/1)
 +
*dlt: left drop sensor triggered (0/1)
 +
*drt: right drop sensor triggered (0/1)
  
=IMU data event=
+
=Event: IMU data=
$RMIMU,ts, ih, ip, ir
+
$RMIMU,ts,ih,ip,ir,tr
 
*ts: timestamp ms
 
*ts: timestamp ms
 
*ih: IMUcompassHeading degree
 
*ih: IMUcompassHeading degree
 
*ip: IMUpitch degree
 
*ip: IMUpitch degree
 
*ir: IMUroll degree
 
*ir: IMUroll degree
 +
*tr: tilt triggered (0/1)
  
=beacon ranging data event (e.g. DW1000)=
+
=Event: beacon ranging data (e.g. DW1000)=
 
$RMBEA,t,b1,b2,b3,b4,...<cr><lf>
 
$RMBEA,t,b1,b2,b3,b4,...<cr><lf>
 
*t: timestamp ms
 
*t: timestamp ms
 
*b1,b2,b3,b4,...: beacons ranging in meter
 
*b1,b2,b3,b4,...: beacons ranging in meter
  
=Proprietary=
+
=Proprietary messages=
 
*Any proprietary message types not defined by this protocol
 
*Any proprietary message types not defined by this protocol

Aktuelle Version vom 24. Mai 2018, 20:02 Uhr

NOTE: THIS IS ONLY AN IDEA - NOT IMPLEMENTED IN ARDUMOWER (YET)

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 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>

Event: Robot state (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

Event: Robot mower configuration (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)

Event: motor current sensor data

$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)

Event: ultrasonic sensor data

$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)

Event: bumper sensor data

$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)

Event: odometry data

$RMODO,ts, ol, or

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

Event: GPS data

$RMGPS,ts, ga, go

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

Event: perimeter sensor data

$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)

Event: drop sensor data

$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)

Event: IMU data

$RMIMU,ts,ih,ip,ir,tr

  • ts: timestamp ms
  • ih: IMUcompassHeading degree
  • ip: IMUpitch degree
  • ir: IMUroll degree
  • tr: tilt triggered (0/1)

Event: beacon ranging data (e.g. DW1000)

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

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

Proprietary messages

  • Any proprietary message types not defined by this protocol