18 #ifndef SONAR_RECORDER_HPP
19 #define SONAR_RECORDER_HPP
24 #include <boost/circular_buffer.hpp>
30 #include "../helpers/recorder_helpers.hpp"
35 #include <sensor_msgs/Range.h>
46 SonarRecorder(
const std::vector<std::string>& topics,
float buffer_frequency = 0 );
48 void write(
const std::vector<sensor_msgs::Range>& sonar_msgs );
50 void reset( boost::shared_ptr<naoqi::recorder::GlobalRecorder> gr,
float conv_frequency );
52 void bufferize(
const std::vector<sensor_msgs::Range>& sonar_msgs );
58 inline std::string
topic()
const
81 boost::circular_buffer< std::vector<sensor_msgs::Range> >
buffer_;
90 boost::shared_ptr<naoqi::recorder::GlobalRecorder>
gr_;
bool isInitialized() const
Definition: sonar.hpp:63
void bufferize(const std::vector< sensor_msgs::Range > &sonar_msgs)
Definition: sonar.cpp:82
int max_counter_
Definition: sonar.hpp:96
void subscribe(bool state)
Definition: sonar.hpp:68
bool isSubscribed() const
Definition: sonar.hpp:73
float buffer_frequency_
Definition: sonar.hpp:93
void reset(boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr, float conv_frequency)
Definition: sonar.cpp:64
float buffer_duration_
Definition: sonar.hpp:83
boost::circular_buffer< std::vector< sensor_msgs::Range > > buffer_
Definition: sonar.hpp:81
void setBufferDuration(float duration)
Definition: sonar.cpp:96
bool is_initialized_
Definition: sonar.hpp:87
size_t buffer_size_
Definition: sonar.hpp:82
bool is_subscribed_
Definition: sonar.hpp:88
boost::mutex mutex_
Definition: sonar.hpp:85
std::vector< std::string > topics_
Definition: sonar.hpp:91
float conv_frequency_
Definition: sonar.hpp:94
boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr_
Definition: sonar.hpp:90
SonarRecorder(const std::vector< std::string > &topics, float buffer_frequency=0)
Definition: sonar.cpp:28
void writeDump(const ros::Time &time)
Definition: sonar.cpp:54
void write(const std::vector< sensor_msgs::Range > &sonar_msgs)
Definition: sonar.cpp:35
std::string topic() const
Definition: sonar.hpp:58
int counter_
Definition: sonar.hpp:95
std::string topic_
Definition: sonar.hpp:79