00001 #ifndef VISP_TRACKER_CONVERSION_HH 00002 # define VISP_TRACKER_CONVERSION_HH 00003 # include <boost/optional.hpp> 00004 00005 # include <ros/ros.h> 00006 00007 # include <geometry_msgs/Transform.h> 00008 # include <sensor_msgs/Image.h> 00009 # include <sensor_msgs/CameraInfo.h> 00010 00011 # include <visp/vpHomogeneousMatrix.h> 00012 # include <visp/vpCameraParameters.h> 00013 # include <visp/vpMbEdgeTracker.h> 00014 # include <visp/vpMe.h> 00015 00016 # include <visp_tracker/Init.h> 00017 # include <visp_tracker/MovingEdgeConfig.h> 00018 00029 void rosImageToVisp(vpImage<unsigned char>& dst, 00030 const sensor_msgs::Image::ConstPtr& src); 00031 00042 void vispImageToRos(sensor_msgs::Image& dst, 00043 const vpImage<unsigned char>& src); 00044 00045 00046 void vpHomogeneousMatrixToTransform(geometry_msgs::Transform& dst, 00047 const vpHomogeneousMatrix& src); 00048 00049 void transformToVpHomogeneousMatrix(vpHomogeneousMatrix& dst, 00050 const geometry_msgs::Transform& src); 00051 00052 void convertMovingEdgeConfigToVpMe(const visp_tracker::MovingEdgeConfig& config, 00053 vpMe& moving_edge, 00054 vpMbEdgeTracker& tracker); 00055 00056 void convertVpMeToMovingEdgeConfig(const vpMe& moving_edge, 00057 const vpMbEdgeTracker& tracker, 00058 visp_tracker::MovingEdgeConfig& config); 00059 00060 void convertVpMeToInitRequest(const vpMe& moving_edge, 00061 const vpMbEdgeTracker& tracker, 00062 visp_tracker::Init& srv); 00063 00064 void convertInitRequestToVpMe(const visp_tracker::Init::Request& req, 00065 vpMbEdgeTracker& tracker, 00066 vpMe& moving_edge); 00067 00068 void initializeVpCameraFromCameraInfo(vpCameraParameters& cam, 00069 sensor_msgs::CameraInfoConstPtr info); 00070 00071 #endif //! VISP_TRACKER_CONVERSION_HH