Closed zhengzh closed 7 years ago
How many points are in the point cloud you are transforming? How often are you transforming it? What CPU are you on? What ROS distro are you on?
@jonbinney 640*480 points, ubuntu 16.04, kinect v1 (30fps), thinkpad t440p (i7 cpu) the fps drop down to about 0.6 fps When executing this line of code 30(fps) when i comment it out. I don't know why tf2_->transform is so slow
Tf2 will transform every single point in the cloud. I've found it helpful to run the point cloud through a PCL voxel filter first.
Transforming the point cloud is an expensive operation. If you don't need the transform, don't provide a target frame, or better yet, use depthimage_to_laserscan.
@paulbovbel thanks! I need to transform the point cloud from kinect_link to base_link, i will try pcl library,
tf2_->transform(cloud_msg, cloud, targetframe, ros::Duration(tolerance)); high cpu usage --