[ros-users] tf and most recent transform error

Dejan Pangercic dejan.pangercic at gmail.com
Mon May 3 23:26:11 UTC 2010


Dear ROS-itas,
I am giving tf a try to rotate some PointCloud msgs. In my node's
constructor I initialize the transform and broadcast it:
transform1_.setOrigin(tf::Vector3(0.0, 0.0, 0.0));
transform1_.setRotation(tf::Quaternion(tf::Vector3(1, 0, 0),
angles::from_degrees(-30)));
br_.sendTransform(tf::StampedTransform(transform1_, ros::Time::now(),
child_, interim_));

In the cloudCallback function I then renew the broadcast and use
TransformListener's transformPointCloud for actual rotation:
void cloud_cb (const sensor_msgs::PointCloudConstPtr& pc)
    {
       br_.sendTransform(tf::StampedTransform(transform1_,
ros::Time::now(), child_, interim_));
      try
      {
        tf_listener_.transformPointCloud(origin_, *pc, cloud_in_);
      }
      catch (tf::TransformException ex)
      {
        ROS_ERROR("%s",ex.what());
      }
      cluster_pub_.publish(cloud_in_);
    }

The transform however fails with the following error msg:
"""
[ERROR] [1272928509.572624390]: You requested a transform at time
1272928509.567,
 but the tf buffer only contains a single transform at time 1272928509.122.
 When trying to transform between /base_link and /RightEyeCalc.

[ERROR] [1272928514.572514949]: You requested a transform that is
4.317 miliseconds in the past,
but the most recent transform in the tf buffer is 5000.070 miliseconds old.
 When trying to transform between /base_link and /RightEyeCalc.
"""
It seems that tf is not buffering my transforms, so do I have to do
this explicitly?

thx and cheers, D.
-- 
MSc. Dejan Pangercic
PhD Student/Researcher
Computer Science IX
Technische Universität München
Telephone: +49 (89) 289-17780
E-Mail: dejan.pangercic at in.tum.de
WWW: http://ias.cs.tum.edu/people/pangercic



More information about the ros-users mailing list