Ask Your Question
0

transform laser data to pointcloud usig tf transform without static transformation

asked 2015-04-27 06:27:11 -0500

RSA_kustar gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-27 11:49:31 -0500

tfoote gravatar image

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.

edit flag offensive delete link more

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

RSA_kustar gravatar image RSA_kustar  ( 2015-04-28 02:42:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-04-27 06:27:11 -0500

Seen: 589 times

Last updated: Apr 27 '15