Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
|
Provides robot drive velocity commands to navigate the robot to a given waypoint given the velocity parameters to drive the robot at, the proportional factor to steer the robot with and the 2D Cartesian position of the target in the world reference frame. More...
#include <DriveToWaypointCommand.h>
Public Member Functions | |
DriveToWaypointCommand (const navtypes::point_t &target, double thetaKP, double driveVel, double slowDriveThresh, double doneThresh, util::dseconds closeToTargetDur) | |
Creates a new DriveToWaypointCommand with the specified targeting information. | |
void | setState (const navtypes::pose_t &pose, robot::types::datatime_t time) |
Must be called before getOutput() for each iteration. | |
command_t | getOutput () override |
Gets the angular velocity and forward speed to run the robot at in order to navigate robot to target. | |
bool | isDone () override |
Returns whether the DriveToWaypointCommand has finished its navigation task. | |
Provides robot drive velocity commands to navigate the robot to a given waypoint given the velocity parameters to drive the robot at, the proportional factor to steer the robot with and the 2D Cartesian position of the target in the world reference frame.
commands::DriveToWaypointCommand::DriveToWaypointCommand | ( | const navtypes::point_t & | target, |
double | thetaKP, | ||
double | driveVel, | ||
double | slowDriveThresh, | ||
double | doneThresh, | ||
util::dseconds | closeToTargetDur ) |
Creates a new DriveToWaypointCommand with the specified targeting information.
target | the position of the target in world coordinates. |
thetaKP | the scaling factor to use for robot steering proportional control. |
driveVel | the speed to drive the robot at. |
slowDriveThresh | the distance at which the robot will start slowing down. |
doneThresh | the threshold for minimum robot-target distance to complete command. |
closeToTargetDurVal | the duration within doneThresh after which robot navigation is considered done, seconds. |
|
overridevirtual |
Gets the angular velocity and forward speed to run the robot at in order to navigate robot to target.
Implements commands::CommandBase.
|
overridevirtual |
Returns whether the DriveToWaypointCommand has finished its navigation task.
Implements commands::CommandBase.
void commands::DriveToWaypointCommand::setState | ( | const navtypes::pose_t & | pose, |
robot::types::datatime_t | time ) |
Must be called before getOutput() for each iteration.
Updates the current pose of the robot in the global reference frame used by DriveToWaypointCommand.
pose,the | current pose of the robot in the global reference frame. |
time,the | current time from robot::types::dataclock. |