19 #ifndef FETCH_AUTO_DOCK_H 20 #define FETCH_AUTO_DOCK_H 32 #include <fetch_driver_msgs/RobotState.h> 33 #include <fetch_driver_msgs/DisableChargingAction.h> 34 #include <fetch_auto_dock_msgs/DockAction.h> 35 #include <fetch_auto_dock_msgs/UndockAction.h> 56 void stateCallback(
const fetch_driver_msgs::RobotStateConstPtr& state);
168 #endif // FETCH_AUTO_DOCK_H AutoDocking()
Autodocking constructor. Object builds action servers for docking and undocking.
void undockCallback(const fetch_auto_dock_msgs::UndockGoalConstPtr &goal)
Method to execute the undocking behavior.
bool lockoutCharger(unsigned seconds)
Method to disable the charger for a finite amount of time.
void checkDockChargingConditions()
Method to see if the robot seems to be docked but not charging. If the robot does seem to be docked a...
void executeBackupSequence(ros::Rate &r)
Method to back the robot up under the abort conditon. Once complete, the method resets the abort flag...
bool isDockingTimedOut()
Method checks to see if we have run out of time or retries.
BaseController controller_
double DOCK_CONNECTOR_CLEARANCE_DISTANCE_
bool isApproachBad(double &dock_yaw)
Method to check approach abort conditions. If we are close to the dock but the robot is too far off s...
void dockCallback(const fetch_auto_dock_msgs::DockGoalConstPtr &goal)
Method to execute the docking behavior.
double DOCKED_DISTANCE_THRESHOLD_
bool continueDocking(fetch_auto_dock_msgs::DockResult &result)
Method that checks success or failure of docking.
bool charging_timeout_set_
void stateCallback(const fetch_driver_msgs::RobotStateConstPtr &state)
Method to update the robot charge state.
void initDockTimeout()
Method sets the docking deadline and number of retries.
charge_lockout_client_t charge_lockout_
ros::Time deadline_not_charging_
DockPerception perception_
double backupDistance()
Method to compute the distance the robot should backup when attemping a docking correction. Method uses a number of state variables in the class to compute distance. TODO(enhancement): Should these be parameterized instead?
ros::Time deadline_docking_
actionlib::SimpleActionServer< fetch_auto_dock_msgs::DockAction > dock_server_t
actionlib::SimpleActionClient< fetch_driver_msgs::DisableChargingAction > charge_lockout_client_t
actionlib::SimpleActionServer< fetch_auto_dock_msgs::UndockAction > undock_server_t