#include <drive_commands.h>
AutoCommand wrapper class for the turn_to_heading() function in the TankDrive class
◆ TurnToHeadingCommand()
TurnToHeadingCommand::TurnToHeadingCommand |
( |
TankDrive & | drive_sys, |
|
|
Feedback & | feedback, |
|
|
double | heading_deg, |
|
|
double | max_speed = 1, |
|
|
double | end_speed = 0 ) |
Construct a TurnToHeadingCommand Command
- Parameters
-
drive_sys | the drive system we are commanding |
feedback | the feedback controller we are using to execute the drive |
heading_deg | the heading to turn to in degrees |
max_speed | 0 -> 1 percentage of the drive systems speed to drive at |
◆ on_timeout()
void TurnToHeadingCommand::on_timeout |
( |
| ) |
|
|
override |
Cleans up drive system if we time out before finishing
reset the drive system if we don't hit our target
◆ run()
bool TurnToHeadingCommand::run |
( |
| ) |
|
|
override |
Run turn_to_heading Overrides run from AutoCommand
- Returns
- true when execution is complete, false otherwise
The documentation for this class was generated from the following files: