rgbd
|
Client which subscribes to RGBD topic. More...
#include <client_rgbd.h>
Public Member Functions | |
ClientRGBD () | |
Constructor. More... | |
bool | deinitialize () |
Clears the subscriber. initialized will now return false. More... | |
bool | initialize (const std::string &server_name) |
Initialize the client. More... | |
bool | initialized () |
Check if the client is initialized. nextImage will not return an image if client is not initialized. More... | |
ImagePtr | nextImage () |
Get a new Image. If no new image has been received since the last call, The ImagePtr will be a nullptr. More... | |
bool | nextImage (Image &image) |
Get a new Image. If no new image has been received since the last call, no image will be written and false will be returned. More... | |
virtual | ~ClientRGBD () |
Destructor. More... | |
Protected Member Functions | |
void | rgbdImageCallback (const rgbd_msgs::RGBD::ConstPtr &msg) |
Protected Attributes | |
ros::CallbackQueue | cb_queue_ |
Image * | image_ptr_ |
Pointer to the Image being written in the NextImage calls. Either set to the address of the provided reference. Or being wrapped into a shared pointer. Ownership therefore belongs to the caller of nextImage, which provides the references or receives the SharedPtr. image_ptr_ should only be accessed inside a NextImage call. Outside it, the image_ptr_ might be invalid/ This is used since you can not pass additional arguments to the callback. A raw pointer is prefered to avoid unnecessary copy operations. More... | |
bool | new_image_ |
Track if image is updated in a callback. More... | |
ros::Subscriber | sub_image_ |
Client which subscribes to RGBD topic.
Definition at line 22 of file client_rgbd.h.
rgbd::ClientRGBD::ClientRGBD | ( | ) |
Constructor.
Definition at line 10 of file client_rgbd.cpp.
|
virtual |
Destructor.
image_ptr_ is not deleted as the client never owns the image pointer
Definition at line 16 of file client_rgbd.cpp.
bool rgbd::ClientRGBD::deinitialize | ( | ) |
Clears the subscriber. initialized will now return false.
Definition at line 36 of file client_rgbd.cpp.
bool rgbd::ClientRGBD::initialize | ( | const std::string & | server_name | ) |
Initialize the client.
server_name | Fully resolved server name |
Definition at line 22 of file client_rgbd.cpp.
|
inline |
Check if the client is initialized. nextImage will not return an image if client is not initialized.
Definition at line 55 of file client_rgbd.h.
ImagePtr rgbd::ClientRGBD::nextImage | ( | ) |
Get a new Image. If no new image has been received since the last call, The ImagePtr will be a nullptr.
Definition at line 54 of file client_rgbd.cpp.
bool rgbd::ClientRGBD::nextImage | ( | Image & | image | ) |
Get a new Image. If no new image has been received since the last call, no image will be written and false will be returned.
image | Image reference which will be written. |
Definition at line 44 of file client_rgbd.cpp.
|
protected |
Definition at line 69 of file client_rgbd.cpp.
|
protected |
Definition at line 75 of file client_rgbd.h.
|
protected |
Pointer to the Image being written in the NextImage calls. Either set to the address of the provided reference. Or being wrapped into a shared pointer. Ownership therefore belongs to the caller of nextImage, which provides the references or receives the SharedPtr. image_ptr_ should only be accessed inside a NextImage call. Outside it, the image_ptr_ might be invalid/ This is used since you can not pass additional arguments to the callback. A raw pointer is prefered to avoid unnecessary copy operations.
Definition at line 87 of file client_rgbd.h.
|
protected |
Track if image is updated in a callback.
Definition at line 80 of file client_rgbd.h.
|
protected |
Definition at line 74 of file client_rgbd.h.