ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

transform laser data to pointcloud usig tf transform without static transformation

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

RSA_kustar gravatar image


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 ;
                        scan_in->header.stamp +  ros::Duration().fromSec(scan_in->ranges.size()*scan_in->time_increment),
        std::cout << "RETURN" << std::endl ;
    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

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

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


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 -0600 )edit

Question Tools

1 follower


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

Seen: 729 times

Last updated: Apr 27 '15