#include <joint_gravity_controller.h>
Public Member Functions | |
void | getCommand (double &cmd) |
Get latest position command to the joint: revolute (angle) and prismatic (position). | |
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) |
JointGravityController () | |
void | setCommand (double cmd) |
Give set position of the joint for next update: revolute (angle) and prismatic (position) | |
void | setGains (const double &p, const double &i, const double &d, const double &i_max, const double &i_min) |
virtual void | starting () |
virtual void | update () |
Issues commands to the joint. Should be called at regular intervals. | |
~JointGravityController () | |
Public Attributes | |
double | command_ |
ros::Duration | dt_ |
pr2_mechanism_model::JointState * | joint_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_ |
bool | initialized_ |
ros::Time | last_time_ |
int | loop_count_ |
ros::NodeHandle | node_ |
control_toolbox::Pid | pid_controller_ |
pr2_mechanism_model::RobotState * | robot_ |
ros::Subscriber | sub_command_ |
Definition at line 75 of file joint_gravity_controller.h.
Definition at line 45 of file joint_gravity_controller.cpp.
Definition at line 51 of file joint_gravity_controller.cpp.
void controller::JointGravityController::getCommand | ( | double & | cmd | ) |
Get latest position command to the joint: revolute (angle) and prismatic (position).
Definition at line 128 of file joint_gravity_controller.cpp.
void controller::JointGravityController::getGains | ( | double & | p, |
double & | i, | ||
double & | d, | ||
double & | i_max, | ||
double & | i_min | ||
) |
Definition at line 111 of file joint_gravity_controller.cpp.
std::string controller::JointGravityController::getJointName | ( | ) |
Definition at line 116 of file joint_gravity_controller.cpp.
bool controller::JointGravityController::init | ( | pr2_mechanism_model::RobotState * | robot, |
const std::string & | joint_name, | ||
const control_toolbox::Pid & | pid | ||
) |
Definition at line 56 of file joint_gravity_controller.cpp.
bool controller::JointGravityController::init | ( | pr2_mechanism_model::RobotState * | robot, |
ros::NodeHandle & | n | ||
) | [virtual] |
Implements pr2_controller_interface::Controller.
Definition at line 81 of file joint_gravity_controller.cpp.
void controller::JointGravityController::setCommand | ( | double | cmd | ) |
Give set position of the joint for next update: revolute (angle) and prismatic (position)
command |
Definition at line 122 of file joint_gravity_controller.cpp.
void controller::JointGravityController::setCommandCB | ( | const std_msgs::Float64ConstPtr & | msg | ) | [private] |
Definition at line 204 of file joint_gravity_controller.cpp.
void controller::JointGravityController::setGains | ( | const double & | p, |
const double & | i, | ||
const double & | d, | ||
const double & | i_max, | ||
const double & | i_min | ||
) |
Definition at line 106 of file joint_gravity_controller.cpp.
virtual void controller::JointGravityController::starting | ( | ) | [inline, virtual] |
Reimplemented from pr2_controller_interface::Controller.
Definition at line 97 of file joint_gravity_controller.h.
void controller::JointGravityController::update | ( | void | ) | [virtual] |
Issues commands to the joint. Should be called at regular intervals.
Implements pr2_controller_interface::Controller.
Definition at line 133 of file joint_gravity_controller.cpp.
Last commanded position.
Definition at line 112 of file joint_gravity_controller.h.
boost::scoped_ptr< realtime_tools::RealtimePublisher< pr2_controllers_msgs::JointControllerState> > controller::JointGravityController::controller_state_publisher_ [private] |
Definition at line 126 of file joint_gravity_controller.h.
Definition at line 111 of file joint_gravity_controller.h.
bool controller::JointGravityController::initialized_ [private] |
Definition at line 116 of file joint_gravity_controller.h.
Joint we're controlling.
Definition at line 110 of file joint_gravity_controller.h.
Last time stamp of update.
Definition at line 119 of file joint_gravity_controller.h.
int controller::JointGravityController::loop_count_ [private] |
Definition at line 115 of file joint_gravity_controller.h.
Definition at line 122 of file joint_gravity_controller.h.
Internal PID controller.
Definition at line 118 of file joint_gravity_controller.h.
Pointer to robot structure.
Definition at line 117 of file joint_gravity_controller.h.
Definition at line 128 of file joint_gravity_controller.h.