People:Kjeld Jensen:FroboMind Route Plan Server Protocol

From FroboMind [www.frobomind.org]
Jump to: navigation, search

General info

All messages begin with $ and end with \r\n. In the examples below \r\n are not shown.

Following the NMEA 0183 v2.0 standard, P means "proprietary", FM means "FroboMind". The following two letters identify the message type, of these 'Rx' is used for route plan specific messages and 'Hx' is used for HMI specific messages.

NMEA checksum is not yet supported.


Protocol messages

Socket

Connecting to the server

When any client connects to a route_plan_server socket, the first transmission will be:

$PFMRH,version,identifier_text

Example:

$PFMRH,1.0,FroboMind Route Plan Server

Keeping the server connection alive

To ask the serverto keep the socket running beyond the socket inactivity timeout defined in the launch file send:

$PFMRK

The server will not send a response but will reset the timeout timer.


Closing the connection

To ask the server to close the socket send:

$PFMRQ

The server will not send a response but will close down the socket.


HMI

Set mode

To set the current mode send one of the following:

$PFMHM,value

Where value is

0 (manual)
1 (autonomous waypoint navigation)

Possible responses are:

$PFMHM,ok
$PFMHM,passwd   (the correct password has not yet been received)
$PFMHM,err      (the value is not within the accepted range)


Status

To subscribe to the status message send:

$PFMRS,interval

Where interval is the number of seconds between each update (decimals allowed). The value 0 disables the status messages.

Please notice that the update is based on the waypoint navigation status ROS topic, so it makes no sense to set it beyond the rate of this.

Possible responses are:

$PFMRS,ok
$PFMRS,passwd   (the correct password has not yet been received)
$PFMRS,err      (the value is not within the accepted range)

If the response is 'ok' the status will be published at the interval:

$PFMRS,easting,northing,orientation,lin_vel,ang_vel,mode,task,b_name,b_easting,b_northing,a_easting,a_northing,t_easting,t_northing
  • easting,northing,orientation Robot pose.
  • lin_vel,ang_vel Current linear and angular velocity of the robot.
  • mode Current navigation mode (0: manual, 1: autonomous waypoint navigation).
  • task Current task value.
  • b_name String identifying the desgination waypoint name.
  • b_easting,b_northing Coordinates of the destination waypoint B (when performing autonomous navigation).
  • a_easting,a_northing Coordinates of the origin waypoint A (when performing autonomous AB navigation).
  • t_easting,t_northing Coordinates towards which the robot currently navigates.


Route plan

Delete the current route plan

To delete the current route plan send:

$PFMRD

Possible responses are:

$PFMRD,ok
$PFMRD,passwd   (the correct password has not yet been received)


Appending to the current route plan

To append a route point to the current route plan send:

$PFMRE,easting,northing,heading,name,nav_mode,lin_vel,ang_vel,pause,task
  • easting,northing Transverse Mercator coordinates such as Universal Transverse Mercator (UTM)
  • heading Yaw axis orientation measured in the ENU coordinate system (Counter Clock Wise with respect to the Easting (x)-axis
  • name String identifying the route point name
  • nav_mode 0=pure pursuit, 1=AB line navigation
  • lin_vel Desired(and maximum linear velocity
  • ang_vel Maximum angular velocity
  • pause time to pause after reaching the waypoint [s]. To make the robot stop briefly at the waypoint use a small value such as 0.001
  • task integer32 value published as /fmCommand/implement Only value not allowed is -1000000

Only the easting and northing values are required. Any other value not specified will be set to the default value defined in the launch file.

Possible responses are:

 $PFMRE,ok
 $PFMRE,passwd   (the correct password has not yet been received)