47 GripperCalibrationController::GripperCalibrationController()
48 : last_publish_time_(0), joint_(NULL)
75 for (
int i = 0; i < other_joint_names.
size(); ++i)
78 std::string name = (std::string)other_joint_names[i];
83 ROS_ERROR(
"Could not find joint \"%s\" (namespace: %s)",
97 std::string joint_name;
105 ROS_ERROR(
"Could not find joint \"%s\" (namespace: %s)",
110 std::string actuator_name;
118 ROS_ERROR(
"Could not find actuator \"%s\" (namespace: %s)",
123 bool force_calibration =
false;
129 if (force_calibration)
131 ROS_INFO(
"Joint %s will be recalibrated, but was already calibrated at offset %f",
144 ROS_INFO(
"Joint %s is not yet calibrated", joint_name.c_str());
169 pr2_controllers_msgs::QueryCalibrationState::Response& resp)
PLUGINLIB_EXPORT_CLASS(my_controller_ns::MyControllerClass, pr2_controller_interface::Controller)
pr2_mechanism_model::JointState * joint_
controller::JointVelocityController vc_
pr2_mechanism_model::RobotState * robot_
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
Type const & getType() const
virtual bool init(pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
ros::ServiceServer is_calibrated_srv_
void setCommand(double cmd)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
boost::scoped_ptr< realtime_tools::RealtimePublisher< std_msgs::Empty > > pub_calibrated_
const std::string & getNamespace() const
~GripperCalibrationController()
bool isCalibrated(pr2_controllers_msgs::QueryCalibrationState::Request &req, pr2_controllers_msgs::QueryCalibrationState::Response &resp)
JointState * getJointState(const std::string &name)
double stopped_velocity_tolerance_
ros::Time last_publish_time_
bool getParam(const std::string &key, std::string &s) const
pr2_hardware_interface::Actuator * getActuator(const std::string &name) const
pr2_hardware_interface::Actuator * actuator_
std::vector< pr2_mechanism_model::JointState * > other_joints_
bool init(pr2_mechanism_model::RobotState *robot, const std::string &joint_name, const control_toolbox::Pid &pid)