Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
controller::Pr2BaseController2 Class Reference

#include <pr2_base_controller2.h>

Inheritance diagram for controller::Pr2BaseController2:
Inheritance graph
[legend]

List of all members.

Public Member Functions

geometry_msgs::Twist getCommand ()
 Returns the current position command.
bool init (pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
 Pr2BaseController2 ()
 Default Constructor of the Pr2BaseController2 class.
void setCommand (const geometry_msgs::Twist &cmd_vel)
void setDesiredCasterSteer ()
 set the desired caster steer
void setJointCommands ()
 set the joint commands
void starting ()
void update ()
 (a) Updates commands to caster and wheels. Called every timestep in realtime
 ~Pr2BaseController2 ()
 Destructor of the Pr2BaseController2 class.

Public Attributes

BaseKinematics base_kinematics_
 class where the robot's information is computed and stored
pthread_mutex_t pr2_base_controller_lock_
 mutex lock for setting and getting commands

Private Member Functions

void commandCallback (const geometry_msgs::TwistConstPtr &msg)
 deal with Twist commands
void computeDesiredCasterSteer (const double &dT)
 computes the desired caster speeds given the desired base speed
void computeDesiredWheelSpeeds (const double &dT)
 computes the desired wheel speeds given the desired base speed
void computeJointCommands (const double &dT)
 computes the desired caster steers and wheel speeds
geometry_msgs::Twist interpolateCommand (const geometry_msgs::Twist &start, const geometry_msgs::Twist &end, const geometry_msgs::Twist &max_rate, const double &dT)
 interpolates velocities within a given time based on maximum accelerations
void publishState (const ros::Time &current_time)
 Publish the state.
void setDesiredWheelSpeeds ()
 sends the desired wheel speeds to the wheel controllers
void updateJointControllers ()
 tells the wheel and caster controllers to update their speeds

Private Attributes

double alpha_stall_
 low pass filter value used for finding stalls
geometry_msgs::Twist base_vel_msg_
 callback message, used to remember where the base is commanded to go
std::vector< boost::shared_ptr
< JointVelocityController > > 
caster_controller_
 vector that stores the caster controllers
std::vector< control_toolbox::Pidcaster_position_pid_
 The pid controllers for caster position.
filters::MultiChannelTransferFunctionFilter
< double > 
caster_vel_filter_
ros::Time cmd_received_timestamp_
 timestamp corresponding to when the command received by the node
ros::Subscriber cmd_sub_
ros::Subscriber cmd_sub_deprecated_
geometry_msgs::Twist cmd_vel_
 speed command vector used internally to represent the current commanded speed
double cmd_vel_rot_eps_
 minimum rotational velocity value allowable
geometry_msgs::Twist cmd_vel_t_
 Input speed command vector represents the desired speed requested by the node. Note that this may differ from the current commanded speed due to acceleration limits imposed by the controller.
double cmd_vel_trans_eps_
 minimum tranlational velocity value allowable
geometry_msgs::Twist desired_vel_
 Input speed command vector represents the desired speed requested by the node.
double eps_
 generic epsilon value that is used as a minimum or maximum allowable input value
std::vector< double > filtered_velocity_
std::vector< double > filtered_wheel_velocity_
double kp_caster_steer_
 local gain used for speed control of the caster (to achieve resultant position control)
ros::Time last_publish_time_
 Time interval between state publishing.
ros::Time last_time_
 time corresponding to when update was last called
geometry_msgs::Twist max_accel_
 acceleration limits specified externally
double max_rotational_velocity_
 maximum rotational velocity magnitude allowable
double max_translational_velocity_
 maximum translational velocity magnitude allowable
geometry_msgs::Twist max_vel_
 velocity limits specified externally
bool new_cmd_available_
 true when new command received by node
ros::NodeHandle node_
bool publish_state_
ros::NodeHandle root_handle_
double state_publish_rate_
double state_publish_time_
 Time interval between state publishing.
boost::scoped_ptr
< realtime_tools::RealtimePublisher
< pr2_mechanism_controllers::BaseControllerState2 > > 
state_publisher_
 publishes information about the caster and wheel controllers
double timeout_
 timeout specifying time that the controller waits before setting the current velocity command to zero
std::vector< boost::shared_ptr
< JointVelocityController > > 
wheel_controller_
 vector that stores the wheel controllers
std::vector< control_toolbox::Pidwheel_pid_controllers_
 The pid controllers for caster position.
filters::MultiChannelTransferFunctionFilter
< double > 
wheel_vel_filter_

Detailed Description

Definition at line 55 of file pr2_base_controller2.h.


Constructor & Destructor Documentation

Default Constructor of the Pr2BaseController2 class.

Definition at line 47 of file pr2_base_controller2.cpp.

Destructor of the Pr2BaseController2 class.

Definition at line 68 of file pr2_base_controller2.cpp.


Member Function Documentation

void controller::Pr2BaseController2::commandCallback ( const geometry_msgs::TwistConstPtr &  msg) [private]

deal with Twist commands

Definition at line 494 of file pr2_base_controller2.cpp.

void controller::Pr2BaseController2::computeDesiredCasterSteer ( const double &  dT) [private]

computes the desired caster speeds given the desired base speed

Definition at line 381 of file pr2_base_controller2.cpp.

void controller::Pr2BaseController2::computeDesiredWheelSpeeds ( const double &  dT) [private]

computes the desired wheel speeds given the desired base speed

Definition at line 437 of file pr2_base_controller2.cpp.

void controller::Pr2BaseController2::computeJointCommands ( const double &  dT) [private]

computes the desired caster steers and wheel speeds

Definition at line 365 of file pr2_base_controller2.cpp.

Returns the current position command.

Returns:
Current velocity command

Definition at line 260 of file pr2_base_controller2.cpp.

Implements pr2_controller_interface::Controller.

Definition at line 74 of file pr2_base_controller2.cpp.

geometry_msgs::Twist controller::Pr2BaseController2::interpolateCommand ( const geometry_msgs::Twist &  start,
const geometry_msgs::Twist &  end,
const geometry_msgs::Twist &  max_rate,
const double &  dT 
) [private]

interpolates velocities within a given time based on maximum accelerations

Definition at line 221 of file pr2_base_controller2.cpp.

void controller::Pr2BaseController2::publishState ( const ros::Time current_time) [private]

Publish the state.

Definition at line 324 of file pr2_base_controller2.cpp.

void controller::Pr2BaseController2::setCommand ( const geometry_msgs::Twist &  cmd_vel)

Definition at line 188 of file pr2_base_controller2.cpp.

set the desired caster steer

Definition at line 429 of file pr2_base_controller2.cpp.

sends the desired wheel speeds to the wheel controllers

Definition at line 478 of file pr2_base_controller2.cpp.

set the joint commands

Definition at line 374 of file pr2_base_controller2.cpp.

Reimplemented from pr2_controller_interface::Controller.

Definition at line 271 of file pr2_base_controller2.cpp.

void controller::Pr2BaseController2::update ( void  ) [virtual]

(a) Updates commands to caster and wheels. Called every timestep in realtime

Implements pr2_controller_interface::Controller.

Definition at line 285 of file pr2_base_controller2.cpp.

tells the wheel and caster controllers to update their speeds

Definition at line 486 of file pr2_base_controller2.cpp.


Member Data Documentation

low pass filter value used for finding stalls

Definition at line 192 of file pr2_base_controller2.h.

class where the robot's information is computed and stored

Returns:
BaseKinematic instance that is being used by this controller

Definition at line 95 of file pr2_base_controller2.h.

geometry_msgs::Twist controller::Pr2BaseController2::base_vel_msg_ [private]

callback message, used to remember where the base is commanded to go

Definition at line 247 of file pr2_base_controller2.h.

vector that stores the caster controllers

Definition at line 202 of file pr2_base_controller2.h.

The pid controllers for caster position.

Definition at line 285 of file pr2_base_controller2.h.

Definition at line 287 of file pr2_base_controller2.h.

timestamp corresponding to when the command received by the node

Definition at line 146 of file pr2_base_controller2.h.

Definition at line 124 of file pr2_base_controller2.h.

Definition at line 126 of file pr2_base_controller2.h.

geometry_msgs::Twist controller::Pr2BaseController2::cmd_vel_ [private]

speed command vector used internally to represent the current commanded speed

Definition at line 157 of file pr2_base_controller2.h.

minimum rotational velocity value allowable

Definition at line 257 of file pr2_base_controller2.h.

geometry_msgs::Twist controller::Pr2BaseController2::cmd_vel_t_ [private]

Input speed command vector represents the desired speed requested by the node. Note that this may differ from the current commanded speed due to acceleration limits imposed by the controller.

Definition at line 152 of file pr2_base_controller2.h.

minimum tranlational velocity value allowable

Definition at line 272 of file pr2_base_controller2.h.

geometry_msgs::Twist controller::Pr2BaseController2::desired_vel_ [private]

Input speed command vector represents the desired speed requested by the node.

Definition at line 162 of file pr2_base_controller2.h.

generic epsilon value that is used as a minimum or maximum allowable input value

Definition at line 252 of file pr2_base_controller2.h.

Definition at line 289 of file pr2_base_controller2.h.

Definition at line 293 of file pr2_base_controller2.h.

local gain used for speed control of the caster (to achieve resultant position control)

Definition at line 187 of file pr2_base_controller2.h.

Time interval between state publishing.

Definition at line 267 of file pr2_base_controller2.h.

time corresponding to when update was last called

Definition at line 141 of file pr2_base_controller2.h.

geometry_msgs::Twist controller::Pr2BaseController2::max_accel_ [private]

acceleration limits specified externally

Definition at line 172 of file pr2_base_controller2.h.

maximum rotational velocity magnitude allowable

Definition at line 182 of file pr2_base_controller2.h.

maximum translational velocity magnitude allowable

Definition at line 177 of file pr2_base_controller2.h.

geometry_msgs::Twist controller::Pr2BaseController2::max_vel_ [private]

velocity limits specified externally

Definition at line 167 of file pr2_base_controller2.h.

true when new command received by node

Definition at line 136 of file pr2_base_controller2.h.

Definition at line 120 of file pr2_base_controller2.h.

mutex lock for setting and getting commands

Definition at line 100 of file pr2_base_controller2.h.

Definition at line 280 of file pr2_base_controller2.h.

Definition at line 122 of file pr2_base_controller2.h.

Definition at line 262 of file pr2_base_controller2.h.

Time interval between state publishing.

Definition at line 262 of file pr2_base_controller2.h.

boost::scoped_ptr<realtime_tools::RealtimePublisher<pr2_mechanism_controllers::BaseControllerState2> > controller::Pr2BaseController2::state_publisher_ [private]

publishes information about the caster and wheel controllers

Definition at line 207 of file pr2_base_controller2.h.

timeout specifying time that the controller waits before setting the current velocity command to zero

Definition at line 131 of file pr2_base_controller2.h.

vector that stores the wheel controllers

Definition at line 197 of file pr2_base_controller2.h.

The pid controllers for caster position.

Definition at line 298 of file pr2_base_controller2.h.

Definition at line 291 of file pr2_base_controller2.h.


The documentation for this class was generated from the following files:


pr2_mechanism_controllers
Author(s): Sachin Chita, John Hsu, Melonee Wise
autogenerated on Thu Aug 27 2015 14:22:52