MotorController
|
Go to the source code of this file.
Functions | |
int32_t | set_orientation (int16_t heading) |
Set the euler heading angle offset. More... | |
int32_t | set_pitch (int16_t pitch) |
Set the euler pitch angle offset. More... | |
int32_t | set_roll (int16_t roll) |
Set the euler roll angle offset. More... | |
int16_t | get_relative_heading (void) |
Get the relative heading (relative to the last setting) in trigo sense. More... | |
int16_t | get_relative_pitch (void) |
Get the relative pitch angle (relative to the last setting). More... | |
int16_t | get_relative_roll (void) |
Get the relative roll angle (relative to the last setting). More... | |
void | update_orientation (void) |
Update the current orientation. More... | |
Variables | |
int16_t | orientation |
int16_t | heading_offset |
int16_t get_relative_heading | ( | void | ) |
Get the relative heading (relative to the last setting) in trigo sense.
Definition at line 65 of file orientation.c.
int16_t get_relative_pitch | ( | void | ) |
Get the relative pitch angle (relative to the last setting).
Definition at line 115 of file orientation.c.
int16_t get_relative_roll | ( | void | ) |
Get the relative roll angle (relative to the last setting).
Definition at line 155 of file orientation.c.
int32_t set_orientation | ( | int16_t | heading | ) |
Set the euler heading angle offset.
WARNING : setting angles DOES NOT MOVE the robot, it offsets the angle.
[in] | heading | The current heading angle. |
NO_ERROR | No error, offset set. |
INVALID_PARAMETER | heading out of range. |
Definition at line 38 of file orientation.c.
int32_t set_pitch | ( | int16_t | pitch | ) |
Set the euler pitch angle offset.
WARNING : setting angles DOES NOT MOVE the robot, it offsets the angle.
NO_ERROR | No error, offset set. |
INVALID_PARAMETER | pitch out of range. |
[in] | pitch | The current pitch angle. |
Definition at line 90 of file orientation.c.
int32_t set_roll | ( | int16_t | roll | ) |
Set the euler roll angle offset.
WARNING : setting angles DOES NOT MOVE the robot, it offsets the angle.
NO_ERROR | No error, offset set. |
INVALID_PARAMETER | roll out of range. |
[in] | roll | The current roll angle. |
Definition at line 130 of file orientation.c.
void update_orientation | ( | void | ) |
Update the current orientation.
This function uses either the IMU or the coding wheels to compute the new orientation value. A threshold on the angular speed is used to select one of the two sources.
Definition at line 169 of file orientation.c.
int16_t heading_offset |
Offset to apply to the raw value given by the IMU.
Definition at line 31 of file orientation.c.
int16_t orientation |
The last computed orientation of the robot.
Definition at line 32 of file orientation.c.