48 #ifndef vpROSGrabber_h
49 #define vpROSGrabber_h
51 #include <visp/vpConfig.h>
53 #if defined(VISP_HAVE_OPENCV)
56 #include <visp/vpImage.h>
57 #include <visp/vpFrameGrabber.h>
58 #include <visp/vpRGBa.h>
60 #include <sensor_msgs/CompressedImage.h>
61 #include <sensor_msgs/Image.h>
62 #include <visp_bridge/camera.h>
63 #include <image_geometry/pinhole_camera_model.h>
65 #if VISP_HAVE_OPENCV_VERSION >= 0x020101
66 # include <opencv2/highgui/highgui.hpp>
114 image_geometry::PinholeCameraModel
p;
119 void imageCallbackRaw(
const sensor_msgs::Image::ConstPtr& msg);
120 void imageCallback(
const sensor_msgs::CompressedImage::ConstPtr& msg);
121 void paramCallback(
const sensor_msgs::CameraInfo::ConstPtr& msg);
135 void open(
int argc,
char **argv);
137 void open(vpImage<unsigned char> &I);
138 void open(vpImage<vpRGBa> &I);
140 void acquire(vpImage<unsigned char> &I);
141 void acquire(vpImage<vpRGBa> &I);
143 bool acquireNoWait(vpImage<unsigned char> &I);
144 bool acquireNoWait(vpImage<vpRGBa> &I);
147 void acquire(vpImage<unsigned char> &I,
struct timespec ×tamp);
148 void acquire(vpImage<vpRGBa> &I,
struct timespec ×tamp);
149 cv::Mat acquire(
struct timespec ×tamp);
150 bool acquireNoWait(vpImage<unsigned char> &I,
struct timespec ×tamp);
151 bool acquireNoWait(vpImage<vpRGBa> &I,
struct timespec ×tamp);
155 void setCameraInfoTopic(std::string topic_name);
156 void setImageTopic(std::string topic_name);
157 void setMasterURI(std::string master_uri);
158 void setNodespace(std::string nodespace);
160 void setFlip(
bool flipType);
161 void setRectify(
bool rectify);
163 bool getCameraInfo(vpCameraParameters &cam);
164 void getWidth(
unsigned short &width)
const;
165 void getHeight(
unsigned short &height)
const;
166 unsigned short getWidth()
const;
167 unsigned short getHeight()
const;
volatile unsigned short usWidth
Class for cameras video capture for ROS cameras.
volatile bool mutex_param
volatile unsigned short usHeight
volatile bool isInitialized
std::string _image_transport
ros::Subscriber image_data
ros::AsyncSpinner * spinner
ros::Subscriber image_info
void setImageTransport(std::string image_transport)
volatile bool first_param_received
image_geometry::PinholeCameraModel p