void PointCloudHandler(const sensor_msgs::PointCloud2ConstPtr& input) { ROS_INFO("received pc"); tr = tf::Transform(btMatrix3x3(1,0,0, 0,1,0, 0,0,1), btVector3(0,0,-5)); pcl::PointCloud::Ptr cloud_in = pcl::PointCloud::Ptr(new pcl::PointCloud); pcl::PointCloud::Ptr cloud_out = pcl::PointCloud::Ptr(new pcl::PointCloud); pcl::fromROSMsg(*input, *cloud_in); pcl_ros::transformPointCloud(*cloud_in, *cloud_out, tr.inverse()); sensor_msgs::PointCloud2 pc_out_msg; pcl::toROSMsg(*cloud_out, pc_out_msg); pub_point_cloud.publish (pc_out_msg); }