Advanced; Usb Serial Protocol - Kauai Labs VMX-pi User Manual

Robotics controller/motion & vision processor
Hide thumbs Also See for VMX-pi:
Table of Contents

Advertisement

Advanced

USB Serial Protocol

In addition to direct communication with the Raspberry Pi, VMX-pi can simultaneously
communicate sensor data to a client (e.g., a RoboRio robot controller) via a custom protocol
which communicates over USB Serial connection. This protocol defines messages sent
between the VMX-pi and the client over the serial USB interface, and includes an error
detection capability to ensure corrupted data is not used by the client.
The VMX-pi Serial protocol uses two message types, the legacy ASCII messages initially
introduced in the nav6 sensor, and the modern binary messages introduced in the navX-MXP.
Source code that implements the VMX-pi ASCII and binary protocols in
available online to simplify adding support for the VMX-pi protocol to a software project.
Message Structure
ASCII Protocol Messages
Each VMX-pi Serial ASCII protocol message has the following structure:
Start of Message
1 byte
Binary Protocol Messages
Each VMX-pi Serial Binary protocol message has the following structure:
Start of
Binary
Message
Message
Indicator
1 byte
1 byte
Data Type Encoding (ASCII)
Base16 encoding is used for ASCII message elements, as follows:
Data Type
Float
Advanced
USB Serial Protocol
Message ID
1 byte
Binary
Message
Length
1 byte
Encoding
(Sign)(100s)(10s)(1s).(10ths)(1
00ths)
Message Body
length is message-type
dependent
Message ID
Message Body Message
1 byte
length is
message-type
dependent
Example
'-132.96'. ' 257.38'
C/C++
and
Java
are
Message Termination
4 bytes
Termination
4 bytes
45

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents