Go to the documentation of this file.
45 Pr2GripperController::Pr2GripperController()
47 loop_count_(0), robot_(NULL), last_time_(0)
62 std::string joint_name;
69 ROS_ERROR(
"Could not find joint named \"%s\" (namespace: %s)",
75 ROS_ERROR(
"The joint \"%s\" was not prismatic (namespace: %s)",
82 ROS_ERROR(
"Joint %s is not calibrated (namespace: %s)",
111 pr2_controllers_msgs::Pr2GripperCommandConstPtr
command;
120 if (
command->max_effort >= 0.0)
pr2_mechanism_model::JointState * joint_state_
bool getParam(const std::string &key, bool &b) const
ROSLIB_DECL std::string command(const std::string &cmd)
boost::shared_ptr< const urdf::Joint > joint_
JointState * getJointState(const std::string &name)
realtime_tools::RealtimeBox< pr2_controllers_msgs::Pr2GripperCommandConstPtr > command_box_
PLUGINLIB_EXPORT_CLASS(my_controller_ns::MyControllerClass, pr2_controller_interface::Controller)
boost::scoped_ptr< realtime_tools::RealtimePublisher< pr2_controllers_msgs::JointControllerState > > controller_state_publisher_
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
void commandCB(const pr2_controllers_msgs::Pr2GripperCommandConstPtr &msg)
bool init(pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
pr2_mechanism_model::RobotState * robot_
virtual void update()
Issues commands to the joint. Should be called at regular intervals.
ros::Subscriber sub_command_
const std::string & getNamespace() const
control_toolbox::Pid pid_
def error(*args, **kwargs)