Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
controller::JointVelocityController Class Reference

#include <joint_velocity_controller.h>

Inheritance diagram for controller::JointVelocityController:
Inheritance graph

Public Member Functions

void getCommand (double &cmd)
 Get latest position command to the joint: revolute (angle) and prismatic (position). More...
void getGains (double &p, double &i, double &d, double &i_max, double &i_min)
std::string getJointName ()
bool init (pr2_mechanism_model::RobotState *robot, const std::string &joint_name, const control_toolbox::Pid &pid)
bool init (pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
 JointVelocityController ()
void setCommand (double cmd)
 Give set position of the joint for next update: revolute (angle) and prismatic (position) More...
void setGains (const double &p, const double &i, const double &d, const double &i_max, const double &i_min)
virtual void starting ()
 Issues commands to the joint. Should be called at regular intervals. More...
virtual void update ()
 ~JointVelocityController ()
- Public Member Functions inherited from pr2_controller_interface::Controller
 Controller ()
bool getController (const std::string &name, int sched, ControllerType *&c)
bool initRequest (ControllerProvider *cp, pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
bool isRunning ()
void starting (const ros::Time &time)
bool startRequest ()
void stopping (const ros::Time &time)
virtual void stopping ()
bool stopRequest ()
void update (const ros::Time &time, const ros::Duration &period)
void updateRequest ()
virtual ~Controller ()

Public Attributes

double command_
ros::Duration dt_
- Public Attributes inherited from pr2_controller_interface::Controller
std::vector< std::string > after_list_
std::vector< std::string > before_list_
enum pr2_controller_interface::Controller:: { ... }  state_

Private Member Functions

void setCommandCB (const std_msgs::Float64ConstPtr &msg)

Private Attributes

boost::scoped_ptr< realtime_tools::RealtimePublisher< pr2_controllers_msgs::JointControllerState > > controller_state_publisher_
ros::Time last_time_
int loop_count_
ros::NodeHandle node_
control_toolbox::Pid pid_controller_
ros::Subscriber sub_command_


class JointVelocityControllerNode

Detailed Description

Definition at line 80 of file joint_velocity_controller.h.

Constructor & Destructor Documentation

controller::JointVelocityController::JointVelocityController ( )

Definition at line 44 of file joint_velocity_controller.cpp.

controller::JointVelocityController::~JointVelocityController ( )

Definition at line 49 of file joint_velocity_controller.cpp.

Member Function Documentation

void controller::JointVelocityController::getCommand ( double &  cmd)

Get latest position command to the joint: revolute (angle) and prismatic (position).

Definition at line 128 of file joint_velocity_controller.cpp.

void controller::JointVelocityController::getGains ( double &  p,
double &  i,
double &  d,
double &  i_max,
double &  i_min 

Definition at line 111 of file joint_velocity_controller.cpp.

std::string controller::JointVelocityController::getJointName ( )

Definition at line 116 of file joint_velocity_controller.cpp.

bool controller::JointVelocityController::init ( pr2_mechanism_model::RobotState robot,
const std::string &  joint_name,
const control_toolbox::Pid pid 

Definition at line 54 of file joint_velocity_controller.cpp.

bool controller::JointVelocityController::init ( pr2_mechanism_model::RobotState robot,
ros::NodeHandle n 
void controller::JointVelocityController::setCommand ( double  cmd)

Give set position of the joint for next update: revolute (angle) and prismatic (position)

doublepos Velocity command to issue

Definition at line 122 of file joint_velocity_controller.cpp.

void controller::JointVelocityController::setCommandCB ( const std_msgs::Float64ConstPtr &  msg)

Definition at line 168 of file joint_velocity_controller.cpp.

void controller::JointVelocityController::setGains ( const double &  p,
const double &  i,
const double &  d,
const double &  i_max,
const double &  i_min 

Definition at line 105 of file joint_velocity_controller.cpp.

virtual void controller::JointVelocityController::starting ( )

Issues commands to the joint. Should be called at regular intervals.

Reimplemented from pr2_controller_interface::Controller.

Definition at line 106 of file joint_velocity_controller.h.

void controller::JointVelocityController::update ( void  )

Friends And Related Function Documentation

friend class JointVelocityControllerNode

Definition at line 127 of file joint_velocity_controller.h.

Member Data Documentation

double controller::JointVelocityController::command_

Last commanded position.

Definition at line 119 of file joint_velocity_controller.h.

boost::scoped_ptr< realtime_tools::RealtimePublisher< pr2_controllers_msgs::JointControllerState> > controller::JointVelocityController::controller_state_publisher_

Definition at line 131 of file joint_velocity_controller.h.

ros::Duration controller::JointVelocityController::dt_

Definition at line 117 of file joint_velocity_controller.h.

pr2_mechanism_model::JointState* controller::JointVelocityController::joint_state_

Joint we're controlling.

Definition at line 116 of file joint_velocity_controller.h.

ros::Time controller::JointVelocityController::last_time_

Last time stamp of update.

Definition at line 124 of file joint_velocity_controller.h.

int controller::JointVelocityController::loop_count_

Definition at line 125 of file joint_velocity_controller.h.

ros::NodeHandle controller::JointVelocityController::node_

Definition at line 121 of file joint_velocity_controller.h.

control_toolbox::Pid controller::JointVelocityController::pid_controller_

Internal PID controller.

Definition at line 123 of file joint_velocity_controller.h.

pr2_mechanism_model::RobotState* controller::JointVelocityController::robot_

Pointer to robot structure.

Definition at line 122 of file joint_velocity_controller.h.

ros::Subscriber controller::JointVelocityController::sub_command_

Definition at line 133 of file joint_velocity_controller.h.

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

Author(s): John Hsu, Melonee Wise, Stuart Glaser
autogenerated on Wed Jun 5 2019 19:34:03