[ros-users] transformPointCloud

Dejan Pangercic dejan.pangercic at gmail.com
Mon Apr 4 19:20:44 UTC 2011


Hi David,

to me it seems that you are playing back the bag file right?
For that to work you need to a) set the "use_sim_time" parameter to
true and b) play the bag with the "--clock" argument:
"rosbag play mybag.bag --clock"
See  also:
http://www.ros.org/wiki/image_geometry/Tutorials/ProjectTfFrameToImage#Trying_it_out

cheers, D.
On Mon, Apr 4, 2011 at 9:03 PM, David Fischinger
<david.fischinger at gmail.com> wrote:
> Hallo everyone!
>
> I have a problem transforming PointCloud2 data. Could somebody tell
> me, if I make a fundamental error in using these functions?
>
>
> void transformCallback(const sensor_msgs::PointCloud2::ConstPtr& pcl_in)
> {
>  ROS_INFO("Cloud received");
>  sensor_msgs::PointCloud2 pcl_out;
>  tf::TransformListener tf_listener;
>
>  tf_listener.waitForTransform("/world", (*pcl_in).header.frame_id,
> (*pcl_in).header.stamp, ros::Duration(5.0));  //return value always
> false!
>  pcl_ros::transformPointCloud("/world", *pcl_in, pcl_out, tf_listener);
>  pc2_publisher.publish(pcl_out);
> }
>
>
>
> "rosrun tf tf_echo /target_frame /source_frame" gives me results, but
> transformPointCloud() results in error messages like:
>
> [ERROR] [1301916374.406336425]: You requested a transform that is
> 244270.678 seconds in the past,
> but the tf buffer only has a history of 243913.670 seconds.
>  When trying to transform between /openni_depth_optical_frame and /world.
>
> Thanks for any help.
>
> Regards
> David
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



-- 
MSc. Dejan Pangercic
PhD Student/Researcher
Intelligent Autonomous Systems Group
Technische Universität München
Telephone: +49 (89) 289-26908
E-Mail: dejan.pangercic at cs.tum.edu
WWW: http://ias.cs.tum.edu/people/pangercic



More information about the ros-users mailing list