Datasheet

Annex B. Board Controllers Software Protocol
The Onboard Navigation Computer is able to communicate with the Motor and Sensor&Management
Boards using two independent USB Ports. In each board a FTDI USB to RS232 converter converts
the USB data connection to a TTL Serial PORT data connection for the microcontrollers on the board.
The Interaction Computer will communicate with the Interaction Board through 2 USB communication
ports. The first one will control the Eyes and the Laser pointer and a second USB Port will control the
3DOF arm. The first will use the same communication protocol used by the Motor and
Sensor&Management Boards and the second will use the Herkulex protocol
5
.
All the USB board connectors can be connected using the following UART settings:
Baud rate: 115200bps
Data bits: 8
Stop bits: 1
Parity bit: No parity
HW Flow Control: Disable
To communicate with the robot boards the following protocol is used (except the 3D arm):
Write -> [Command][First Byte][Second Byte][....]
Read -> [Command][First Byte][Second Byte] [....][Send Number][CheckSum_H][CheckSum_L]
Where:
[Command] is the set or get command;
[Send Number] is an incremental number that counts all the sends that each microcontroller
has already performed;
[CheckSum_H:CheckSum_L] is the checksum of the [Command]+[First Byte]+[Second
Byte]+ [....]+[Send Number].
B.1. Motor Board Communication Protocol
Set Velocity command:
[Command] = 0x56
[Left wheel Velocity] = [Left wheel Velocity High][Left wheel Velocity Low]
[Right wheel Velocity] = [Right wheel Velocity High][Right wheel Velocity Low]
Write -> [0x56][Left wheel Velocity High][Left wheel Velocity Low][Right wheel Velocity High]
[Right wheel Velocity Low]
Read -> [0x56][Send Number][CheckSum_H][CheckSum_L]
To obtain the Left and Right Wheel Velocities, use the following known equations:
Left wheel Velocity = -(Linear Velocity + Rotation Velocity);
Right wheel Velocity = (Linear Velocity - Rotation Velocity);
To obtain the High and Low bytes use:
5 http://www.robotshop.com/content/PDF/manual-drs-0101.pdf
FROG – FP7 STREP nr. 288235
Deliverable: D1.4 – Platform User and Developer Manual 53