-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose driver enumerations in messages #2
Open
AdamPettinger
wants to merge
1
commit into
odriverobotics:main
Choose a base branch
from
tamu-edu:add_enums_to_msgs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Note that this is a bit-wise accumulation of errors, where each active bit represents one specific error type | ||
uint32 errors | ||
|
||
# Active Error types | ||
uint32 INITIALIZING = 0x1 | ||
uint32 SYSTEM_LEVEL = 0x2 | ||
uint32 TIMING_ERROR = 0x4 | ||
uint32 MISSING_ESTIMATE = 0x8 | ||
uint32 BAD_CONFIG = 0x10 | ||
uint32 DRV_FAULT = 0x20 | ||
uint32 MISSING_INPUT = 0x40 | ||
uint32 DC_BUS_OVER_VOLTAGE = 0x100 | ||
uint32 DC_BUS_UNDER_VOLTAGE = 0x200 | ||
uint32 DC_BUS_OVER_CURRENT = 0x400 | ||
uint32 DC_BUS_OVER_REGEN_CURRENT = 0x800 | ||
uint32 CURRENT_LIMITATION_VIOLATION = 0x1000 | ||
uint32 MOTOR_OVER_TEMP = 0x2000 | ||
uint32 INVERTER_OVER_TEMP = 0x4000 | ||
uint32 VELOCITY_LIMIT_VIOLATION = 0x8000 | ||
uint32 POSITION_LIMIT_VIOLATION = 0x10000 | ||
uint32 WATCHDOG_TIMER_EXPIRED = 0x1000000 | ||
uint32 ESTOP_REQUESTED = 0x2000000 | ||
uint32 SPINOUT_DETECTED = 0x4000000 | ||
uint32 BRAKE_RESISTOR_DISARMED = 0x8000000 | ||
uint32 THERMISTOR_DISCONNECTED = 0x10000000 | ||
uint32 CALIBRATION_ERROR = 0x40000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
uint8 state | ||
|
||
# Axis State enumerations | ||
uint8 UNDEFINED = 0x0 | ||
uint8 IDLE = 0x1 | ||
uint8 STARTUP_SEQUENCE = 0x2 | ||
uint8 FULL_CALIBRATION_SEQUENCE = 0x3 | ||
uint8 MOTOR_CALIBRATION = 0x4 | ||
uint8 ENCODER_INDEX_SEARCH = 0x6 | ||
uint8 ENCODER_OFFSET_CALIBRATION = 0x7 | ||
uint8 CLOSED_LOOP_CONTROL = 0x8 | ||
uint8 LOCKIN_SPIN = 0x9 | ||
uint8 ENCODER_DIR_FIND = 0xA | ||
uint8 HOMING = 0xB | ||
uint8 ENCODER_HALL_POLARITY_CALIBRATION = 0xC | ||
uint8 ENCODER_HALL_PHASE_CALIBRATION = 0xD | ||
uint8 ANTICOGGING_CALIBRATION = 0xE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
uint32 control_mode | ||
uint32 input_mode | ||
ControlMode control_mode | ||
InputMode input_mode | ||
float32 input_pos | ||
float32 input_vel | ||
float32 input_torque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
uint32 mode | ||
|
||
# Control Mode enumerations | ||
# This mode is not used internally. | ||
uint32 VOLTAGE_CONTROL = 0x0 | ||
|
||
# Uses only the inner torque control loop. | ||
# Use input_torque to command desired torque. | ||
uint32 TORQUE_CONTROL = 0x1 | ||
|
||
# Uses both the inner torque control loop and the velocity control loop. | ||
# Use input_vel to command desired velocity, and input_torque. | ||
uint32 VELOCITY_CONTROL = 0x2 | ||
|
||
# Uses the inner torque loop, the velocity control loop, and the outer position control loop. | ||
# Use input_pos to command desired position, input_vel to command velocity feed-forward, and input_torque for torque feed-forward. | ||
uint32 POSITION_CONTROL = 0x3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
uint32 mode | ||
|
||
# Input Mode enumerations | ||
uint32 INACTIVE = 0x0 | ||
uint32 PASSTHROUGH = 0x1 | ||
uint32 VEL_RAMP = 0x2 | ||
uint32 POS_FILTER = 0x3 | ||
uint32 MIX_CHANNELS = 0x4 | ||
uint32 TRAP_TRAJ = 0x5 | ||
uint32 TORQUE_RAMP = 0x6 | ||
uint32 MIRROR = 0x7 | ||
uint32 TUNING = 0x8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
uint8 result | ||
|
||
# Procedure Result enumerations | ||
uint8 SUCCESS = 0x0 | ||
uint8 BUSY = 0x1 | ||
uint8 CANCELLED = 0x2 | ||
uint8 DISARMED = 0x3 | ||
uint8 NO_RESPONSE = 0x4 | ||
uint8 POLE_PAIR_CPR_MISMATCH = 0x5 | ||
uint8 PHASE_RESISTANCE_OUT_OF_RANGE = 0x6 | ||
uint8 PHASE_INDUCTANCE_OUT_OF_RANGE = 0x7 | ||
uint8 UNBALANCED_PHASES = 0x8 | ||
uint8 INVALID_MOTOR_TYPE = 0x9 | ||
uint8 ILLEGAL_HALL_STATE = 0xA | ||
uint8 TIMEOUT = 0xB | ||
uint8 HOMING_WITHOUT_ENDSTOP = 0xC | ||
uint8 INVALID_STATE = 0xD | ||
uint8 NOT_CALIBRATED = 0xE | ||
uint8 NOT_CONVERGING = 0xF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AxisState axis_requested_state | ||
--- | ||
ActiveErrors active_errors | ||
AxisState axis_state | ||
ProcedureResult procedure_result |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be called
ODriveErrors
to match other places (like the Pythonodrive
library).