autowarefoundation / autoware_ai

Apache License 2.0
28 stars 11 forks source link

ndt_matching not working with Hesai lidar point cloud data #725

Closed ajay1606 closed 5 years ago

ajay1606 commented 5 years ago

Hello all, Thanks for Autoware for opensource.

I have been tested Autoware localization (lidar localizer using ndt_matching) with Velodyne (16, 32 and 64) model sensors and Ouster 64 channel sensor. With all the sensor localizer working good. But with the Hesai Pandar64 channel lidar getting an error like this bellow. Above mentioned sensors tested with the same map data and with the frame id modified to "velodyne"

Screenshot from 2019-09-19 16-05-24

For frame [velodyne]: No transform to fixed frame [world]. TF error: [Lookup would require extrapolation into the past. Requested time 946655660.000381000 but the earliest data is at time 1568785504.549147331, when looking up transform from frame [velodyne] to frame [world]]

Working Environment Ubuntu: 16.04 ROS : Kinetic Autoware version: 1.10.0

Appreciate your help

YamatoAndo commented 5 years ago

@ajay1606 It seems that TF has not been converted well, because the sensor time stamp is strange. Please modify the sensor driver.

ajay1606 commented 5 years ago

@YamatoAndo , thanks for your reply, I will test again by modifying the driver and get back to you

duclinhfetel commented 5 years ago

I'm working on Hesai lidar. I had problems building a map with ndt_mapping.

@ajay1606 do you have this problem? @YamatoAndo can you give me a few reasons for this?

images

ajay1606 commented 5 years ago

@duclinhfetel In my case, I have changed frame id to pandar to velodyne and tested with the Autoware. It working well with the ndt mapping, detection nodes, point preprocessing nodes. But i have a problem only with the ndt_matching node. Still, I could not fix the issue.

But you can change frame id, hope ndt_mapping will works fine.

duclinhfetel commented 5 years ago

@duclinhfetel In my case, I have changed frame id to pandar to velodyne and tested with the Autoware. It working well with the ndt mapping, detection nodes, point preprocessing nodes. But i have a problem only with the ndt_matching node. Still, I could not fix the issue.

But you can change frame id, hope ndt_mapping will works fine.

I had a problem when I converted sensor_msgs::pointcloud2 to pcl::PointXYZI. Error messages: "Failed to find match for field 'intensity'". @ajay1606 do you have this problem?

ajay1606 commented 5 years ago

@duclinhfetel Yes i do have the similar message when I converted sensor_msgs::pointcloud2 to pcl::PointXYZI. But that is just a warning message from the PCL library. That should not cause any problem.

duclinhfetel commented 5 years ago

@duclinhfetel Yes i do have the similar message when I converted sensor_msgs::pointcloud2 to pcl::PointXYZI. But that is just a warning message from the PCL library. That should not cause any problem.

@ajay1606 I change line " pcl_conversions::toPCL(ros::Time(timestamp), cld->header.stamp);" in main.cc of hesai lidar to "pclconversions::toPCL(ros::Time(ros::Time::now()), cld->header.stamp);" fixed your problem "For frame [velodyne]: No transform to fixed frame [world]. TF error: [Lookup would require extrapolation into the past. Requested time 946655660.000381000 but the earliest data is at time 1568785504.549147331, when looking up transform from frame [velodyne] to frame [world]]"_. but it don't localize. :)

ajay1606 commented 5 years ago

@duclinhfetel and @YamatoAndo Thanks to both, ndt_matching working now with the following modification pcl_conversions::toPCL(ros::Time(ros::Time::now()), cld->header.stamp) in the main.cc file of hesai ros package.

duclinhfetel commented 5 years ago

@duclinhfetel and @YamatoAndo Thanks to both, ndt_matching working now with the following modification pcl_conversions::toPCL(ros::Time(ros::Time::now()), cld->header.stamp) in the main.cc file of hesai ros package.

@ajay1606 do you change original code ndt_matching? ndt_mapping work well, but ndt_matching don't localize :(

ajay1606 commented 5 years ago

@duclinhfetel I have not modified the original code, by the way could you please post the error message?

duclinhfetel commented 5 years ago

@duclinhfetel I have not modified the original code, by the way could you please post the error message?

Don't have error message. It don't matching when i use 2D pose estimate in rviz.

ajay1606 commented 5 years ago

@duclinhfetel I guess this could be because of 2 reasons.

  1. The initial position is wrong (Please check the initial position again)
  2. High point density (Try to use point down sampling )

Are you able to visualize the point_raw in the RVIZ ? If possible you can check the error message in the generated log file

duclinhfetel commented 5 years ago

@duclinhfetel I guess this could be because of 2 reasons.

  1. The initial position is wrong (Please check the initial position again)
  2. High point density (Try to use point down sampling )

Are you able to visualize the point_raw in the RVIZ ? If possible you can check the error message in the generated log file

I found your problem. It's wrong tf_yaw. thanks for support =))

ajay1606 commented 5 years ago

@duclinhfetel cool, thanks to you as well. Let's close this issue if you have no more question related to posted issue.

duclinhfetel commented 5 years ago

@ajay1606 can you give me your email address. May be we will discuss more information about hesai lidar. Thanks. my email: duclinh.fetel@gmail.com

ajay1606 commented 5 years ago

@duclinhfetel Sounds great, please mail me at ajaygkumar16@gmail.com. Thanks