ROS-aware controller to manage a differential drive mobile base. This subcribes to cmd_vel topic, publishes odom and tf, and manages the two wheel joints. More...
#include <diff_drive_base.h>
Public Member Functions | |
void | command (const geometry_msgs::TwistConstPtr &msg) |
Command callback from either a ROS topic, or a higher controller. More... | |
DiffDriveBaseController () | |
virtual std::vector< std::string > | getClaimedNames () |
Get the names of joints/controllers which this controller exclusively claims. More... | |
virtual std::vector< std::string > | getCommandedNames () |
Get the names of joints/controllers which this controller commands. More... | |
virtual std::string | getType () |
Get the type of this controller. More... | |
virtual int | init (ros::NodeHandle &nh, ControllerManager *manager) |
Initialize the controller and any required data structures. More... | |
virtual bool | reset () |
Cleanly reset the controller to it's initial state. Some controllers may choose to stop themselves. This is mainly used in the case of the the robot exiting some fault condition. More... | |
virtual bool | start () |
Attempt to start the controller. This should be called only by the ControllerManager instance. More... | |
virtual bool | stop (bool force) |
Attempt to stop the controller. This should be called only by the ControllerManager instance. More... | |
virtual void | update (const ros::Time &now, const ros::Duration &dt) |
This is the update loop for the controller. More... | |
virtual | ~DiffDriveBaseController () |
Public Member Functions inherited from robot_controllers::Controller | |
Controller () | |
std::string | getName () |
virtual | ~Controller () |
Public Member Functions inherited from robot_controllers::Handle | |
Handle () | |
virtual | ~Handle () |
Private Member Functions | |
void | publishCallback (const ros::TimerEvent &event) |
void | scanCallback (const sensor_msgs::LaserScanConstPtr &scan) |
void | setCommand (float left, float right) |
ROS-aware controller to manage a differential drive mobile base. This subcribes to cmd_vel topic, publishes odom and tf, and manages the two wheel joints.
Definition at line 63 of file diff_drive_base.h.
robot_controllers::DiffDriveBaseController::DiffDriveBaseController | ( | ) |
Definition at line 47 of file diff_drive_base.cpp.
|
inlinevirtual |
Definition at line 67 of file diff_drive_base.h.
void robot_controllers::DiffDriveBaseController::command | ( | const geometry_msgs::TwistConstPtr & | msg | ) |
Command callback from either a ROS topic, or a higher controller.
Definition at line 158 of file diff_drive_base.cpp.
|
virtual |
Get the names of joints/controllers which this controller exclusively claims.
Implements robot_controllers::Controller.
Definition at line 348 of file diff_drive_base.cpp.
|
virtual |
Get the names of joints/controllers which this controller commands.
Implements robot_controllers::Controller.
Definition at line 338 of file diff_drive_base.cpp.
|
inlinevirtual |
Get the type of this controller.
Reimplemented from robot_controllers::Controller.
Definition at line 110 of file diff_drive_base.h.
|
virtual |
Initialize the controller and any required data structures.
nh | Node handle for this controller. |
manager | The controller manager instance, this is needed for the controller to get information about joints, etc. |
Reimplemented from robot_controllers::Controller.
Definition at line 63 of file diff_drive_base.cpp.
|
private |
Definition at line 354 of file diff_drive_base.cpp.
|
virtual |
Cleanly reset the controller to it's initial state. Some controllers may choose to stop themselves. This is mainly used in the case of the the robot exiting some fault condition.
Implements robot_controllers::Controller.
Definition at line 210 of file diff_drive_base.cpp.
|
private |
Definition at line 383 of file diff_drive_base.cpp.
|
private |
Definition at line 411 of file diff_drive_base.cpp.
|
virtual |
Attempt to start the controller. This should be called only by the ControllerManager instance.
Implements robot_controllers::Controller.
Definition at line 182 of file diff_drive_base.cpp.
|
virtual |
Attempt to stop the controller. This should be called only by the ControllerManager instance.
force | Should we force the controller to stop? Some controllers may wish to continue running until they absolutely have to stop. |
Implements robot_controllers::Controller.
Definition at line 193 of file diff_drive_base.cpp.
|
virtual |
This is the update loop for the controller.
time | The system time. |
dt | The timestep since last call to update. |
Implements robot_controllers::Controller.
Definition at line 217 of file diff_drive_base.cpp.
|
private |
Definition at line 180 of file diff_drive_base.h.
|
private |
Definition at line 178 of file diff_drive_base.h.
|
private |
Definition at line 157 of file diff_drive_base.h.
|
private |
Definition at line 159 of file diff_drive_base.h.
|
private |
Definition at line 158 of file diff_drive_base.h.
|
private |
Definition at line 183 of file diff_drive_base.h.
|
private |
Definition at line 125 of file diff_drive_base.h.
|
private |
Definition at line 170 of file diff_drive_base.h.
|
private |
Definition at line 154 of file diff_drive_base.h.
|
private |
Definition at line 163 of file diff_drive_base.h.
|
private |
Definition at line 162 of file diff_drive_base.h.
|
private |
Definition at line 171 of file diff_drive_base.h.
|
private |
Definition at line 134 of file diff_drive_base.h.
|
private |
Definition at line 165 of file diff_drive_base.h.
|
private |
Definition at line 167 of file diff_drive_base.h.
|
private |
Definition at line 126 of file diff_drive_base.h.
|
private |
Definition at line 148 of file diff_drive_base.h.
|
private |
Definition at line 147 of file diff_drive_base.h.
|
private |
Definition at line 146 of file diff_drive_base.h.
|
private |
Threshold for dx to be considered "moving".
Definition at line 145 of file diff_drive_base.h.
|
private |
Threshold for dr to be considered "moving".
Definition at line 143 of file diff_drive_base.h.
|
private |
Definition at line 175 of file diff_drive_base.h.
|
private |
Definition at line 174 of file diff_drive_base.h.
|
private |
Definition at line 176 of file diff_drive_base.h.
|
private |
Definition at line 177 of file diff_drive_base.h.
|
private |
Definition at line 181 of file diff_drive_base.h.
|
private |
Definition at line 138 of file diff_drive_base.h.
|
private |
Definition at line 184 of file diff_drive_base.h.
|
private |
Definition at line 135 of file diff_drive_base.h.
|
private |
Definition at line 166 of file diff_drive_base.h.
|
private |
Definition at line 168 of file diff_drive_base.h.
|
private |
Definition at line 153 of file diff_drive_base.h.
|
private |
Threshold for wheel velocity to be "moving".
Definition at line 142 of file diff_drive_base.h.
|
private |
Definition at line 151 of file diff_drive_base.h.
|
private |
Definition at line 152 of file diff_drive_base.h.
|
private |
Definition at line 178 of file diff_drive_base.h.
|
private |
Definition at line 139 of file diff_drive_base.h.
|
private |
Definition at line 172 of file diff_drive_base.h.
|
private |
Definition at line 137 of file diff_drive_base.h.
|
private |
Definition at line 141 of file diff_drive_base.h.