Revision 7cb5de78
Updated encoder node code with preliminary driver functionality.
Renamed encoder_state.msg to encoders_state.msg.
Added functions to encoders.cpp to send message of current encoder state.
Added function headers to encoders.h.
Added function to encoders.cpp to convert to different units.
Added additional global variables to store encoder state.
Updated encoder_state.msg and query_encoders.srv with additional fields for units.
Node is not completed. Still requires lowest level driver functionality. Needs constants for encoders and wheels. Needs initialization in main for encoders_state publisher. Needs implementation of encoders_set_mode, which should change what units the encoders node publishes the encoders_state message, and with which frequency.
I know this is bad practice, but I have not tried compiling my changes. I broke my computer's ability to compile ROS code, so this is untested. However, it should work. SORRY.
scout/encoders/srv/query_encoders.srv | ||
---|---|---|
1 |
int8 units |
|
1 | 2 |
--- |
2 | 3 |
int8 fl_speed |
3 | 4 |
int8 fr_speed |
4 | 5 |
int8 bl_speed |
5 | 6 |
int8 br_speed |
7 |
int8 fl_index |
|
8 |
int8 fr_index |
|
9 |
int8 bl_index |
|
10 |
int8 br_index |
|
11 |
int8 fl_distance |
|
12 |
int8 fr_distance |
|
13 |
int8 bl_distance |
|
14 |
int8 br_distance |
Also available in: Unified diff