18 #ifndef CAMERA_RECORDER_HPP
19 #define CAMERA_RECORDER_HPP
24 #include <boost/circular_buffer.hpp>
30 #include "../helpers/recorder_helpers.hpp"
35 #include <sensor_msgs/CameraInfo.h>
36 #include <sensor_msgs/Image.h>
49 void write(
const sensor_msgs::ImagePtr& img,
const sensor_msgs::CameraInfo& camera_info );
51 void reset(boost::shared_ptr<naoqi::recorder::GlobalRecorder> gr,
float conv_frequency );
53 void bufferize(
const sensor_msgs::ImagePtr& img,
const sensor_msgs::CameraInfo& camera_info );
59 inline std::string
topic()
const
83 boost::circular_buffer< std::pair<sensor_msgs::ImagePtr, sensor_msgs::CameraInfo> >
buffer_;
89 boost::shared_ptr<naoqi::recorder::GlobalRecorder>
gr_;
float buffer_frequency_
Definition: camera.hpp:93
CameraRecorder(const std::string &topic, float buffer_frequency)
Definition: camera.cpp:28
void setBufferDuration(float duration)
Definition: camera.cpp:90
boost::mutex mutex_
Definition: camera.hpp:87
void writeDump(const ros::Time &time)
Definition: camera.cpp:53
float conv_frequency_
Definition: camera.hpp:94
void bufferize(const sensor_msgs::ImagePtr &img, const sensor_msgs::CameraInfo &camera_info)
Definition: camera.cpp:76
void subscribe(bool state)
Definition: camera.hpp:69
std::string topic_info_
Definition: camera.hpp:90
bool is_initialized_
Definition: camera.hpp:80
bool isSubscribed() const
Definition: camera.hpp:74
void write(const sensor_msgs::ImagePtr &img, const sensor_msgs::CameraInfo &camera_info)
Definition: camera.cpp:37
int max_counter_
Definition: camera.hpp:96
boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr_
Definition: camera.hpp:89
bool is_subscribed_
Definition: camera.hpp:81
size_t buffer_size_
Definition: camera.hpp:84
std::string topic() const
Definition: camera.hpp:59
void reset(boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr, float conv_frequency)
Definition: camera.cpp:66
int counter_
Definition: camera.hpp:95
boost::circular_buffer< std::pair< sensor_msgs::ImagePtr, sensor_msgs::CameraInfo > > buffer_
Definition: camera.hpp:83
bool isInitialized() const
Definition: camera.hpp:64
std::string topic_img_
Definition: camera.hpp:91
Definition: camera.hpp:43
float buffer_duration_
Definition: camera.hpp:85