Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

STM32 controller code for Northstar Robotics 2020

Notifications You must be signed in to change notification settings

GOFIRST-Robotics/NASA-RMC-2020-RT

Repository files navigation

NASA-RMC-2020-RT

The code for the RT controller on the Lunabotics robot for the 2020 season.

Interface

The controller takes extended CAN messages. The arbitration ID of these messages should be formatted as follows:

Bytes 31-8 Bytes 7-0
Message ID (subsystem-specific) Controller subsystem ID

Below is a table of controller subsystem IDs:

Subsystem ID
Drivetrain 100
ACHOO 101
GESUNDHEIT 102
SNEEZE 103
BLESSYOU 104

These IDs start at 100 to avoid interaction with VESCs. See the subsystem tables below for message IDs. Message IDs are required to begin above 35 to avoid interaction with VESC command IDs, which go up to 27.

Drivetrain

Command ID Broadcasts/Listens Length Data
Twist 35 Listens 8 Bits 7-4: Linear velocity (int32) mm/s
Bits 3-0: Angular Velocity (int32) mrad/s

ACHOO

Command ID Broadcasts/Listens Length Data
Set kneel 40 Listens 1 0: Stand
1: Kneel
Kneel state 41 Broadcasts (10 Hz) 1 0: Standing
1: Moving up
2: Moving Down
3: Kneeling

GESUNDHEIT

Command ID Broadcasts/Listens Length Data
Set extension 50 Listens 1 0: Stow
1: Extend
Conveyor speed 51 Listens 4 Speed (int32) rpm
Set door 52 Listens 1 0: Close
1: Open
Extension state 53 Broadcasts (10 Hz) 6 Byte 0:
 0: Stowed
 1: Moving to stow
 2: Moving to extend
 3: Extended
Byte 1:
 0: Door closed
 1: Door open
Byte 2-5: Speed (int32) rpm

SNEEZE

Command ID Broadcasts/Listens Length Data
Extension state 60 Broadcasts (50 Hz) 6 Byte 0 (State):
 0: Idle
 1: Digging
 2: Homing
Byte 1: Is homed (bool)
Byte 2-5: Speed (int32) rpm
Set dig speed 61 Listens 4 Speed (int32) rpm
Go home 62 Listens 0 N/A
Set transfer speed 63 Listens 4 Speed (int32) rpm

About

STM32 controller code for Northstar Robotics 2020

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages