Rover Control Protocol (Version 2012/04/06)

General outline

In order to remote control the rovers a protocol has been developed that is send using a serial port emulating Bluetooth connection.

To add a little robustness some simple checksums and headers are added.

All stated values are hexadecimal if not said otherwise!

Principal protocol outline

Direction: From the remote to the rover

While the header is fixed, there are a few types that can be understood by each rover. Not every rover however supports each type in each configuration.

Type Description Rovers Status
0 Not used for robustness reasons All
1 motorDriverMotorUpdate - Set ID/IQ and speed for a/several motors R2 Deprecated for R3
2 motorDriverMotorMeasure - Get current current R2 TBD
3 motorDriverGetCurrentsCollection - Get currents from sample buffer R2 TBD
4 motorDriverGetFaultReg - Get fault status of motors R2 TBD
5 motorDriverGetControlCollection - Get controls from sample buffer R2 TBD
6 motorDriverMotorMeasure - Get maximum current during last period R2 TBD
7 spiCommunication - send SPI commands to the Atmel R0,R3 Active, even tough the R3 does not have an Atmel
8 wait - waits a certain amount of time before evaluating the next command. R0 QNX,
R2,R3
Active
9 buggySteering - a higher level steering algo for driving like a buggy R0 QNX Never worked well (Deprecated)
10 onOffControl - allows to enable/disable things R3 Active
11 vectorProtocol - implementation of our vector steering model R3 Active

Data for different types

Type 7: spiCommunication

On the R0, these packets are sent to the Atmel controller to set a servo to a specified value. For compatibility with the control, these packets are also interpreted by the R3.

There are two data bytes to submit: motor and value.

Example:
To turn the front left wheel to 45° and set its driving motor to a slow speed (20% of maximum), these commands have to be transmitted:
0B 05 07 00 02 00 C0 (set front left steering to 45° [value of 192])
0B 05 07 00 02 05 99 (set front left driving to 20% [value of 153])

It is possible to set multiple motors at the same time.
0B 05 07 00 04 05 99 00 C0 (does the same as the commands above, but with just one command).

Type 10: onOffControl

On the R3, the voltage regulators for the motor power supply as well as each of the controller processes can be enabled or disabled via a simple command.

There are three data bytes to submit: type, id and value.

Example:
To use the front motors of the R3, these commands have to be transmitted:
0B 05 0A 00 03 00 00 01 (enable motor power supply 0 [front])
0B 05 0A 00 03 01 00 01 (enable controller 0 [front left steering])
0B 05 0A 00 03 01 01 01 (enable controller 1 [front left driving])
0B 05 0A 00 03 01 02 01 (enable controller 2 [front right steering])
0B 05 0A 00 03 01 03 01 (enable controller 3 [front right driving])

Type 11: vectorProtocol

On the R3, the vector control model is also implemented directly on the rover, the values of every wheel are calculated there.

There are three data bytes to submit, corresponding to the vectors of our model: x, y and ry. Each of them is interpreted as a signed 8-bit integer limited to -127..127.

Example:
To stop the rover, this command has to be transmitted:
0B 05 0B 00 03 00 00 00 (x = 0, y = 0, ry = 0, all wheels will be centered)
To drive diagonal forward/right with moderate speed (38% of maximum), this command has to be transmitted:
0B 05 0B 00 03 30 30 00 (x = 48, y = 48, ry = 0)

Responses from rover to remote

Motor numeration

Due to the spatial separation of front and rear in the R3, the numeration of the R0 was no longer applicable. Both numerations differ substantially.

Motor description R0 numeration R3 numeration
Front left steering 0 0
Front left driving 5 1
Front right steering 3 2
Front right driving 8 3
Rear left steering 1 4
Rear left driving 6 5
Rear right steering 2 6
Rear right driving 7 7
Solar panel 4 n.a.