add sensors

This commit is contained in:
Darby Lim 2018-05-14 14:41:19 +09:00
parent 135cf17d4a
commit 942ec28d64

View File

@ -2,19 +2,21 @@
# CONSTANTS
########################################
# Bumper states (states are combined, when multiple bumpers are pressed)
uint8 BUMPER_RIGHT = 1
uint8 BUMPER_CENTER = 2
uint8 BUMPER_LEFT = 4
uint8 BUMPER_FORWARD = 1
uint8 BUMPER_BACKWARD = 2
# Cliff sensor states (states are combined, when multiple cliff sensors are triggered)
uint8 CLIFF_RIGHT = 1
uint8 CLIFF_CENTER = 2
uint8 CLIFF_LEFT = 4
uint8 CLIFF = 1
# Button states (only one button can be triggered at a time)
# Sonar sensor states (states are combined, when multiple sonar sensors are triggered)
uint8 SONAR = 1
# Illumination sensor (states are combined, when multiple illumination sensors are triggered)
uint8 ILLUMINATION = 1
# Button states (states are combined, when multiple buttons are pressed)
uint8 BUTTON0 = 1
uint8 BUTTON1 = 2
uint8 BUTTON2 = 4
# Motor errors
uint8 ERROR_LEFT_MOTOR = 1
@ -27,9 +29,12 @@ uint8 TORQUE_OFF = 2
########################################
# Messages
########################################
Header header
uint8 bumper
uint8 cliff
Header header
uint8 bumper
float32 cliff
float32 sonar
float32 illumination
uint8 led
uint8 button
bool torque
int32 left_encoder # (-2,147,483,648 ~ 2,147,483,647)