-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publishing encoder message at regular intervals
- Loading branch information
Showing
5 changed files
with
157 additions
and
124 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# TODO: How should this mapping be done? What if there's a 6-wheeled (or more) rover? | ||
uint8_t FRONT_RIGHT = 0 | ||
uint8_t FRONT_LEFT = 1 | ||
uint8_t REAR_RIGHT = 2 | ||
uint8_t REAR_LEFT = 3 | ||
uint8 FRONT_RIGHT = 0 | ||
uint8 FRONT_LEFT = 1 | ||
uint8 REAR_RIGHT = 2 | ||
uint8 REAR_LEFT = 3 | ||
|
||
uint64 timestamp # time since system start (microseconds) | ||
|
||
# TODO: How large should the arrays be? What if we have a 6-wheeled rover? | ||
bool[4] has_encoder # True for each wheel that has an encoder | ||
int64[4] encoder_position # The wheel position, in encoder counts since boot. Positive is forward rotation, negative is reverse rotation | ||
float[4] speed # Speed of each wheel, in encoder counts per second. Positive is forward, negative is reverse | ||
float32[4] speed # Speed of each wheel, in encoder counts per second. Positive is forward, negative is reverse | ||
|
||
# TODO: Should this be just one uint32, assuming each wheel has the same encoder? | ||
uint32[4] pulses_per_rev # Number of pulses per revolution for each wheel |
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
Oops, something went wrong.