Advanced - Kauai Labs navX-MXP User Manual

Robotics navigation sensor
Table of Contents

Advertisement

Advanced

Serial Protocol
In order to communicate sensor data to a client (e.g., a RoboRio robot controller) the navX-MXP
software uses a custom protocol. This protocol defines messages sent between the navX-MXP
and the client over a serial interface, and includes an error detection capability to ensure
corrupted data is not used by the client.
The navX-MXP 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 navX-MXP ASCII and binary protocols in
provided to simplify adding support for the navX-MXP protocol to a software project.
Message Structure
ASCII Protocol Messages
Each navX-MXP Serial ASCII protocol message has the following structure:
Start of Message
1 byte
Binary Protocol Messages
Each navX-MXP 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
8-bit Integer
Advanced
Serial Protocol
Message ID
1 byte
Binary
Message
Length
1 byte
Encoding
(Sign)(100s)(10s)(1s).(10ths)(1
00ths)
(HighNibble)(LowNibble)
Message Body
length is message-type
dependent
Message ID
Message Body Message
1 byte
length is
message-type
dependent
Example
'-132.96'. ' 257.38'
'E9'
Java
and
C++
are
Message Termination
4 bytes
Termination
4 bytes
77

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Kauai Labs navX-MXP

Table of Contents