예제 #1
0
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_);
}
예제 #2
0
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_);
}
예제 #3
0
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_);
}
예제 #4
0
  virtual void bufferize(const T& msg)
  {
    boost::mutex::scoped_lock lock_bufferize( mutex_ );
    typename std::list<T>::iterator it;
    removeOld();
    buffer_.push_back(msg);

  }
예제 #5
0
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);
  }
}
예제 #6
0
 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);
   }
 }
예제 #7
0
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);
  }
}
예제 #8
0
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);
  }
}
예제 #9
0
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);
  }
}
예제 #10
0
 virtual void setBufferDuration(float duration)
 {
   boost::mutex::scoped_lock lock_bufferize( mutex_ );
   buffer_duration_ = duration;
 }