Skip to content

Commit 73ddd7a

Browse files
committed
(image_buffer) update docstrings
1 parent 96a409b commit 73ddd7a

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

ed_sensor_integration/include/ed/kinect/image_buffer.h

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TransformListener;
2121
}
2222

2323
/**
24-
* @brief The ImageBuffer class, provides a buffer to synchronise rgbd images with sensor positions.
24+
* @brief The ImageBuffer class provides a buffer to synchronise rgbd images with sensor positions.
2525
* Images are stored until they are removed from the buffer or until a
2626
* certain amount of time has passed
2727
*/
@@ -35,28 +35,27 @@ class ImageBuffer
3535
~ImageBuffer();
3636

3737
/**
38-
* @brief initialize, configure the buffer
39-
* @param topic, ros topic on which the rgbd images are published
40-
* @param root_frame, root frame to calculate sensor pose relative to (default: map)
41-
* @param worker_thread_frequency, frequency at which the worker thread updates the most recent image (default: 20)
38+
* @brief Configure the buffer
39+
* @param topic ros topic on which the rgbd images are published
40+
* @param root_frame root frame to calculate sensor pose relative to (default: map)
41+
* @param worker_thread_frequency frequency at which the worker thread updates the most recent image (default: 20)
4242
*/
4343
void initialize(const std::string& topic, const std::string& root_frame="map", const float worker_thread_frequency=20);
4444

4545
/**
46-
* @brief nextImage, Returns the most recent combination of image and transform, provided it is different from the previous time the function was called.
47-
*
48-
* @param[out] image, rgbd image to write the next image to. Iff a next image is found
49-
* @param[out] sensor_pose, will be filled with the sensor pose corresponding to the next image. Iff a next image is found
46+
* @brief Returns the most recent combination of image and transform, provided it is different from the previous time the function was called.
47+
* @param[out] image rgbd image to write the next image to. Iff a next image is found
48+
* @param[out] sensor_pose will be filled with the sensor pose corresponding to the next image. Iff a next image is found
5049
* @return whether or not a novel image is available
5150
*/
5251
bool nextImage(rgbd::ImageConstPtr& image, geo::Pose3D& sensor_pose);
5352

5453
/**
55-
* @brief waitForRecentImage, Blocks until a new image with transform is found. Returns false if no image or tf could be found within 'timeout_sec' seconds
56-
*
57-
* @param[out] image, rgbd image to write the next image to. Iff a next image is found
58-
* @param[out] sensor_pose, will be filled with the sensor pose corresponding to the next image. Iff a next image is found
59-
* @param[in] timeout_sec, maximum duration to block.
54+
* @brief Blocks until a new image with transform is found. Returns false if no image or TF could be found within 'timeout_sec' seconds.
55+
* But will always give it one try, both to get the image and to get TF.
56+
* @param[out] image rgbd image to write the next image to. Iff a next image is found
57+
* @param[out] sensor_pose will be filled with the sensor pose corresponding to the next image. Iff a next image is found
58+
* @param[in] timeout_sec maximum duration to block.
6059
* @return whether or not a next image was available within the timeout duration.
6160
*/
6261
bool waitForRecentImage(rgbd::ImageConstPtr& image, geo::Pose3D& sensor_pose, double timeout_sec);
@@ -77,7 +76,10 @@ class ImageBuffer
7776
ros::CallbackQueue cb_queue_;
7877

7978
std::pair<rgbd::ImageConstPtr, geo::Pose3D> recent_image_;
80-
std::mutex recent_image_mutex_; // For protecting ImageBuffer::recent_image_
79+
/**
80+
* @brief For protecting ImageBuffer::recent_image_
81+
*/
82+
std::mutex recent_image_mutex_;
8183
std::unique_ptr<std::thread> worker_thread_ptr_;
8284
bool shutdown_; // Trigger to kill the worker thread
8385

0 commit comments

Comments
 (0)