void SonarRecorder::setBufferDuration(float duration) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); buffer_size_ = ( buffer_size_ / buffer_duration_ ) * duration; buffer_duration_ = duration; buffer_.resize(buffer_size_); }
void LogRecorder::setBufferDuration(float duration) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); buffer_size_ = static_cast<size_t>(duration*(conv_frequency_/max_counter_)); buffer_duration_ = duration; buffer_.set_capacity(buffer_size_); }
void JointStateRecorder::setBufferDuration(float duration) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); buffer_size_ = ( buffer_size_ / buffer_duration_ ) * duration; buffer_duration_ = duration; bufferJoinState_.resize(buffer_size_); bufferTF_.resize(buffer_size_); }
virtual void bufferize(const T& msg) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); typename std::list<T>::iterator it; removeOld(); buffer_.push_back(msg); }
void LogRecorder::bufferize( std::list<rosgraph_msgs::Log>& log_msgs ) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); if (counter_ < max_counter_) { counter_++; } else { counter_ = 1; buffer_.push_back(log_msgs); } }
virtual void bufferize(const T& msg) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); if (counter_ < max_counter_) { counter_++; } else { counter_ = 1; buffer_.push_back(msg); } }
void DiagnosticsRecorder::bufferize(diagnostic_msgs::DiagnosticArray& msg ) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); if (counter_ < max_counter_) { counter_++; } else { counter_ = 1; buffer_.push_back(msg); } }
void SonarRecorder::bufferize(const std::vector<sensor_msgs::Range>& sonar_msgs ) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); if (counter_ < max_counter_) { counter_++; } else { counter_ = 1; buffer_.pop_front(); buffer_.push_back(sonar_msgs); } }
void JointStateRecorder::bufferize( const sensor_msgs::JointState& js_msg, const std::vector<geometry_msgs::TransformStamped>& tf_transforms ) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); if (counter_ < max_counter_) { counter_++; } else { counter_ = 1; bufferJoinState_.pop_front(); bufferTF_.pop_front(); bufferJoinState_.push_back(js_msg); bufferTF_.push_back(tf_transforms); } }
virtual void setBufferDuration(float duration) { boost::mutex::scoped_lock lock_bufferize( mutex_ ); buffer_duration_ = duration; }