#include <four_wheel_steering_controller.h>
Classes | |
struct | Command |
Velocity command related: More... | |
struct | Command4ws |
struct | CommandTwist |
Private Member Functions | |
void | brake () |
Brakes the wheels, i.e. sets the velocity to 0. More... | |
void | cmdFourWheelSteeringCallback (const four_wheel_steering_msgs::FourWheelSteering &command) |
Velocity and steering command callback. More... | |
void | cmdVelCallback (const geometry_msgs::Twist &command) |
Velocity command callback. More... | |
bool | getWheelNames (ros::NodeHandle &controller_nh, const std::string &wheel_param, std::vector< std::string > &wheel_names) |
Get the wheel names from a wheel param. More... | |
void | setOdomPubFields (ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh) |
Sets the odometry publishing fields. More... | |
void | updateCommand (const ros::Time &time, const ros::Duration &period) |
Compute and publish command. More... | |
void | updateOdometry (const ros::Time &time) |
Update and publish odometry. More... | |
This class makes some assumptions on the model of the robot:
Definition at line 60 of file four_wheel_steering_controller.h.
four_wheel_steering_controller::FourWheelSteeringController::FourWheelSteeringController | ( | ) |
Definition at line 46 of file four_wheel_steering_controller.cpp.
|
private |
Brakes the wheels, i.e. sets the velocity to 0.
Definition at line 500 of file four_wheel_steering_controller.cpp.
|
private |
Velocity and steering command callback.
command | Velocity and steering command message (4ws) |
Definition at line 544 of file four_wheel_steering_controller.cpp.
|
private |
Velocity command callback.
command | Velocity command message (twist) |
Definition at line 517 of file four_wheel_steering_controller.cpp.
|
private |
Get the wheel names from a wheel param.
[in] | controller_nh | Controller node handler |
[in] | wheel_param | Param name |
[out] | wheel_names | Vector with the whel names |
Definition at line 572 of file four_wheel_steering_controller.cpp.
|
virtual |
Initialize controller.
robot_hw | Velocity and position joint interface for the wheels |
root_nh | Node handle at root namespace |
controller_nh | Node handle inside the controller namespace |
Reimplemented from controller_interface::MultiInterfaceController< hardware_interface::VelocityJointInterface, hardware_interface::PositionJointInterface >.
Definition at line 60 of file four_wheel_steering_controller.cpp.
|
private |
Sets the odometry publishing fields.
root_nh | Root node handle |
controller_nh | Node handle inside the controller namespace |
Definition at line 625 of file four_wheel_steering_controller.cpp.
|
virtual |
Starts controller.
time | Current time |
Reimplemented from controller_interface::ControllerBase.
Definition at line 240 of file four_wheel_steering_controller.cpp.
|
virtual |
Stops controller.
time | Current time |
Reimplemented from controller_interface::ControllerBase.
Definition at line 250 of file four_wheel_steering_controller.cpp.
|
virtual |
Updates controller, i.e. computes the odometry and sets the new velocity commands.
time | Current time |
period | Time since the last called to update |
Implements controller_interface::ControllerBase.
Definition at line 234 of file four_wheel_steering_controller.cpp.
|
private |
Compute and publish command.
time | Current time |
period | Time since the last called to update |
TODO check limits to not apply the same steering on right and left when saturated !
Definition at line 337 of file four_wheel_steering_controller.cpp.
|
private |
Update and publish odometry.
time | Current time |
Definition at line 255 of file four_wheel_steering_controller.cpp.
|
private |
Frame to use for the robot base:
Definition at line 164 of file four_wheel_steering_controller.h.
|
private |
Timeout to consider cmd_vel commands old:
Definition at line 161 of file four_wheel_steering_controller.h.
|
private |
FourWheelSteering command related:
Definition at line 138 of file four_wheel_steering_controller.h.
|
private |
Definition at line 139 of file four_wheel_steering_controller.h.
|
private |
Definition at line 134 of file four_wheel_steering_controller.h.
|
private |
Definition at line 133 of file four_wheel_steering_controller.h.
|
private |
Whether to publish odometry to tf or not:
Definition at line 167 of file four_wheel_steering_controller.h.
|
private |
Whether the control is make with four_wheel_steering msg or twist msg:
Definition at line 170 of file four_wheel_steering_controller.h.
|
private |
Definition at line 107 of file four_wheel_steering_controller.h.
|
private |
Hardware handles:
Definition at line 105 of file four_wheel_steering_controller.h.
|
private |
Definition at line 174 of file four_wheel_steering_controller.h.
|
private |
Speed limiters:
Definition at line 173 of file four_wheel_steering_controller.h.
|
private |
Definition at line 101 of file four_wheel_steering_controller.h.
|
private |
Definition at line 176 of file four_wheel_steering_controller.h.
|
private |
Definition at line 175 of file four_wheel_steering_controller.h.
|
private |
Definition at line 97 of file four_wheel_steering_controller.h.
|
private |
Definition at line 144 of file four_wheel_steering_controller.h.
|
private |
Odometry related:
Definition at line 143 of file four_wheel_steering_controller.h.
|
private |
Definition at line 146 of file four_wheel_steering_controller.h.
|
private |
Definition at line 102 of file four_wheel_steering_controller.h.
|
private |
Odometry related:
Definition at line 100 of file four_wheel_steering_controller.h.
|
private |
Definition at line 108 of file four_wheel_steering_controller.h.
|
private |
Definition at line 106 of file four_wheel_steering_controller.h.
|
private |
Definition at line 135 of file four_wheel_steering_controller.h.
|
private |
Definition at line 140 of file four_wheel_steering_controller.h.
|
private |
Definition at line 145 of file four_wheel_steering_controller.h.
|
private |
Wheel separation (or track), distance between left and right wheels (from the midpoint of the wheel width):
Definition at line 149 of file four_wheel_steering_controller.h.
|
private |
Wheel base (distance between front and rear wheel):
Definition at line 158 of file four_wheel_steering_controller.h.
|
private |
Wheel radius (assuming it's the same for the left and right wheels):
Definition at line 155 of file four_wheel_steering_controller.h.
|
private |
Distance between a wheel joint (from the midpoint of the wheel width) and the associated steering joint: We consider that the distance is the same for every wheel
Definition at line 152 of file four_wheel_steering_controller.h.