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?
Asked by RSA_kustar on 2015-04-27 06:27:11 UTC
Answers
projectLaser
will produce a point cloud in the same frame as the laser scan.
transformLaserScanToPointCloud
will produce a point cloud in the frame_id requested /uav/baselink_ENU
This call will require that you have connectivity in the tf tree between the target frame and the source frame.
Asked by tfoote on 2015-04-27 11:49:31 UTC
Comments
I dont have a connectivity because the laser frame has no arent.. So, if I did a static transformation to say for example that the parent for the laser frame is the /uav/baselink_ENU, will this help ?? @tfoote
Asked by RSA_kustar on 2015-04-28 02:42:34 UTC
Comments