00001 /* 00002 * jaco_tf_updater.h 00003 * 00004 * Created on: Apr 16, 2013 00005 * Author: mdedonato 00006 */ 00007 00008 #ifndef JACO_TF_UPDATER_H_ 00009 #define JACO_TF_UPDATER_H_ 00010 00011 #include <ros/ros.h> 00012 #include <std_msgs/String.h> 00013 #include <tf/tf.h> 00014 #include <tf/transform_broadcaster.h> 00015 #include <tf/transform_listener.h> 00016 #include "jaco_driver/JointAngles.h" 00017 #include <jaco_driver/jaco_arm_kinematics.h> 00018 #include <time.h> 00019 00020 namespace jaco { 00021 00022 00023 class JacoTFTree { 00024 public: 00025 JacoTFTree(ros::NodeHandle nh, ros::NodeHandle param_nh); 00026 00027 private: 00028 void JointAnglesMSG(const jaco_driver::JointAnglesConstPtr& joint_angles); 00029 void CalculatePostion(void); 00030 void TFUpdateTimer(const ros::TimerEvent&); 00031 00032 00033 jaco::JacoKinematics kinematics; 00034 jaco_driver::JointAngles current_angles; 00035 ros::Time last_angle_update; 00036 ros::Subscriber joint_angles_sub; 00037 ros::Timer tf_update_timer; 00038 00039 00040 }; 00041 00042 } 00043 00044 #endif /* JACO_TF_UPDATER_H_ */