pose_broadcaster.h
Go to the documentation of this file.
00001 
00008 #ifndef pose_broadcaster_h___
00009 #define pose_broadcaster_h___
00010 
00011 #include "ros/ros.h"
00012 #include <boost/thread/mutex.hpp>
00013 #include <string>
00014 #include <pcl/point_cloud.h>
00015 #include <pcl/point_types.h>
00016 #include <tf/transform_broadcaster.h>
00017 #include <tf/transform_listener.h>
00018 
00019 namespace ICR
00020 {
00021 
00026   class PoseBroadcaster
00027   {
00028   public:
00029 
00030     //for some reason not defining this macro can crash the pose broadcaster on some systems,
00031     //although the class does not contain fixed sized Eigen members ...?
00032     EIGEN_MAKE_ALIGNED_OPERATOR_NEW 
00033 
00034     PoseBroadcaster();
00035     ~PoseBroadcaster(){};
00036 
00041     void setObject(pcl::PointCloud<pcl::PointNormal> const & obj_cloud, std::string const & obj_name);
00046     void broadcastPose();
00047 
00050     bool isPoseSourceUC3M() {return (strcmp(pose_source_.c_str(),"uc3m_objtrack") == 0);}
00051 
00057     bool getPoseUC3MObjtrack();
00058 
00059   private:
00060 
00061     ros::NodeHandle nh_, nh_private_;
00062     boost::mutex lock_;
00063     tf::TransformBroadcaster tf_brc_;
00064 
00067     tf::Transform object_pose_;
00068 
00073     pcl::PointCloud<pcl::PointNormal> obj_cloud_;
00074     std::string obj_name_;
00079     std::string pose_source_;
00084     std::string ref_frame_id_;
00085     std::string camera_frame_id_;
00086     ros::ServiceClient gazebo_get_ms_clt_;
00087     ros::ServiceClient get_tracked_obj_;
00088 
00089     tf::TransformListener tf_list_;
00094     bool getPoseGazebo();
00095 
00096 
00098     //  CALLBACKS  //
00100 
00101   };
00102 }//end namespace
00103 
00104 #endif


icr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:36:10