35 #ifndef JOINT_POSITION_CONTROLLER_H 36 #define JOINT_POSITION_CONTROLLER_H 66 #include <boost/scoped_ptr.hpp> 67 #include <boost/thread/condition.hpp> 69 #include <std_msgs/Float64.h> 70 #include <pr2_controllers_msgs/JointControllerState.h> 107 void getGains(
double &p,
double &i,
double &
d,
double &i_max,
double &i_min);
108 void setGains(
const double &p,
const double &i,
const double &d,
const double &i_max,
const double &i_min);
130 void setCommandCB(
const std_msgs::Float64ConstPtr& msg);
void setCommand(double cmd)
Give set position of the joint for next update: revolute (angle) and prismatic (position) ...
~JointPositionController()
std::string getJointName()
void setGains(const double &p, const double &i, const double &d, const double &i_max, const double &i_min)
ros::Subscriber sub_command_
boost::scoped_ptr< realtime_tools::RealtimePublisher< pr2_controllers_msgs::JointControllerState > > controller_state_publisher_
pr2_mechanism_model::RobotState * robot_
JointPositionController()
pr2_mechanism_model::JointState * joint_state_
control_toolbox::Pid pid_controller_
void setCommandCB(const std_msgs::Float64ConstPtr &msg)
void getCommand(double &cmd)
Get latest position command to the joint: revolute (angle) and prismatic (position).
bool init(pr2_mechanism_model::RobotState *robot, const std::string &joint_name, const control_toolbox::Pid &pid)
void getGains(double &p, double &i, double &d, double &i_max, double &i_min)
virtual void update()
Issues commands to the joint. Should be called at regular intervals.