transform laser data to pointcloud usig tf transform without static transformation
Hello,
I have a laser that I connected it up-side-down with the quadrotor. The quadrotor system gives me the child base_link frame to the parent world frame.
When I run hokyou node, the /scan topic which has a laserScan data that are registered with laser frame as a frame id.
Now when I read the laser data from the topic /scan and I use the following transformation:
void laserCallback (const sensor_msgs::LaserScan::ConstPtr& scan_in)
{
double t1 = ros::Time::now().toSec() ;
//std::cout<<"LASER" << scan_in->header.frame_id << std::endl ;
if(!listener_.waitForTransform(scan_in->header.frame_id,
"/uav/baselink_ENU",
scan_in->header.stamp + ros::Duration().fromSec(scan_in->ranges.size()*scan_in->time_increment),
ros::Duration(1.0)))
{
std::cout << "RETURN" << std::endl ;
return;
}
sensor_msgs::PointCloud msg;
//projector_.projectLaser(*scan_in, msg);
projector_.transformLaserScanToPointCloud("/uav/baselink_ENU",*scan_in, msg,listener_);
}
Does this directly transform the scaned data into xs and ys to the base_link frame or I should use static transformation?