31 is_initialized_( false ),
32 is_subscribed_( false ),
33 buffer_frequency_(buffer_frequency),
38 const std::vector<geometry_msgs::TransformStamped>& tf_transforms )
40 if (!js_msg.header.stamp.isZero()) {
41 gr_->write(
topic_, js_msg, js_msg.header.stamp);
46 gr_->write(
"/tf", tf_transforms);
51 boost::mutex::scoped_lock lock_write_buffer(
mutex_ );
52 boost::circular_buffer< std::vector<geometry_msgs::TransformStamped> >::iterator it_tf;
55 gr_->write(
"/tf", *it_tf);
57 for (boost::circular_buffer<sensor_msgs::JointState>::iterator it_js =
bufferJoinState_.begin();
60 if (!it_js->header.stamp.isZero()) {
61 gr_->write(
topic_, *it_js, it_js->header.stamp);
89 const std::vector<geometry_msgs::TransformStamped>& tf_transforms )
91 boost::mutex::scoped_lock lock_bufferize(
mutex_ );
106 boost::mutex::scoped_lock lock_bufferize(
mutex_ );
void bufferize(const sensor_msgs::JointState &js_msg, const std::vector< geometry_msgs::TransformStamped > &tf_transforms)
void setBufferDuration(float duration)
boost::circular_buffer< sensor_msgs::JointState > bufferJoinState_
JointStateRecorder(const std::string &topic, float buffer_frequency=0)
void reset(boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr, float conv_frequency)
static const float bufferDefaultDuration
boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr_
void write(const sensor_msgs::JointState &js_msg, const std::vector< geometry_msgs::TransformStamped > &tf_transforms)
void writeDump(const ros::Time &time)
boost::circular_buffer< std::vector< geometry_msgs::TransformStamped > > bufferTF_