Go to the documentation of this file.
5 #include <cv_bridge/cv_bridge.h>
6 #include <message_filters/synchronizer.h>
7 #include <message_filters/subscriber.h>
8 #include <message_filters/sync_policies/approximate_time.h>
9 #include <sensor_msgs/Image.h>
10 #include <sensor_msgs/image_encodings.h>
11 #include <image_geometry/pinhole_camera_model.h>
std::unique_ptr< message_filters::Synchronizer< RGBDApproxPolicy > > sync_
ImagePtr nextImage()
Get a new Image. If no new image has been received since the last call, The ImagePtr will be a nullpt...
bool initialize(const std::string &rgb_image_topic, const std::string &depth_image_topic, const std::string &cam_info_topic)
Initialize the subscriber.
virtual ~ClientROS()
Destructor.
ros::CallbackQueue cb_queue_
bool imageCallback(const sensor_msgs::ImageConstPtr &rgb_image_msg, const sensor_msgs::ImageConstPtr &depth_image_msg)
Callback for synched rgb and depth image.
std::shared_ptr< Image > ImagePtr
Client which subscribes to regular ROS image topics.
bool new_image_
new_image_ Track if image is updated in a callback.
bool initialize(const std::string &rgb_image_topic, const std::string &depth_image_topic, const std::string &cam_info_topic)
Initialize the subscriber.
Image * image_ptr_
image_ptr_ Pointer to image. Image could be provided by reference or the pointer will be wrapped in a...