RoboTeam Embedded Messages (REM)
https://github.com/RoboTeamTwente/roboteam_embedded_messages
The RoboTeam Embedded Messages repository holds the definition of all packets sent between the computer, the basestation, and the robot. All packets come in two formats: A bit array, optimized for size (as seen on the right), and a C struct for ease of use. Functions are provided to easily switch between the two formats. Each type of packet comes with a unique header. The packet header, combined with the known packet lengths, allows sending multiple packets in a single transmission. Python bindings are provided to control the robots via python scripts. Python scripts are provided to automatically generate .c and .h files. No more manual bitshifting!
Overview of REM
Name | Function |
---|---|
REM_BasestationConfiguration | Used for changing channel basestation communicates on |
REM_Log | Used for sending data through UART to the PC |
REM_Packet | Contains the generic header that will be added to every packet |
REM_RobotAssuredAck | Acknowledgement that a packet with REM_RobotAssuredPacket has been received |
REM_RobotAssuredPacket | Request an acknowledgment that the packet has been received |
REM_RobotCommand | Contains the instructions for the robot from AI |
REM_RobotCommandTesting | An extension of REM_RobotCommand, contains more options for testing |
REM_RobotFeedback | Contains data from the robot that is used in the AI |
REM_RobotGetPIDGains | Request the PID gains from the robot |
REM_RobotKillCommand | Remotely turn off the robot |
REM_RobotMusicCommand | Send commands for usage of the speaker of the robot |
REM_RobotPIDGains | Contains PID gains of the robot |
REM_RobotSetPIDGains | Set the PID gains of the robot |
REM_RobotStateInfo | Contains the state of the robot |
REM_SX1280Filler | Filler packet as the minimum payload is 6 bytes |
REM_Log
REM_log should be no longer than 127 bytes. This means that the message cannot be longer than 127 - payloadSize of REM_Packet characters long. Furthermore the last character has to be an '\n'.
REM_RobotCommandTesting
Not used yet on basestation or robot.
REM_RobotAssured
Not actively used Used for packets that are only send once during a robots uptime. The REM_RobotAssuredPacket is part of the send packet. Once received by the robot the robot send a REM_RobotAssuredAck with the same sequenceNumber as the REM_RobotAssuredPacket. If the sender of the REM_RobotAssuredPacket does not receive and REM_RobotAssuredAck the original packet will be send again after a timeframe.