29 buffer_frequency_(buffer_frequency),
39 if (!img->header.stamp.isZero()) {
45 if (!camera_info.header.stamp.isZero()) {
55 boost::mutex::scoped_lock lock_write_buffer(
mutex_ );
56 boost::circular_buffer< std::pair<sensor_msgs::ImagePtr, sensor_msgs::CameraInfo> >::iterator it;
59 if (it->first != NULL)
61 write(it->first, it->second);
78 boost::mutex::scoped_lock lock_bufferize(
mutex_ );
86 buffer_.push_back(std::make_pair(img, camera_info));
92 boost::mutex::scoped_lock lock_bufferize(
mutex_ );
CameraRecorder(const std::string &topic, float buffer_frequency)
void setBufferDuration(float duration)
void writeDump(const ros::Time &time)
void bufferize(const sensor_msgs::ImagePtr &img, const sensor_msgs::CameraInfo &camera_info)
void write(const sensor_msgs::ImagePtr &img, const sensor_msgs::CameraInfo &camera_info)
boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr_
static const float bufferDefaultDuration
void reset(boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr, float conv_frequency)
boost::circular_buffer< std::pair< sensor_msgs::ImagePtr, sensor_msgs::CameraInfo > > buffer_