RozDavid / LOL

LOL: Lidar-only Odometry and Localization in 3D point cloud maps
383 stars 93 forks source link

Local map don't update after first few scan. #12

Closed yutouwd closed 3 years ago

yutouwd commented 3 years ago

Hello @RozDavid,

Now I can run the demo on kitti dataset, and it has a good performance. But when I try to run it on our rosbag, I find the local map don't update after first few scan. Like the following picture:

Screenshot from 2021-02-16 16-14-07

rosrun tf view_frame result is: Screenshot from 2021-02-16 16-17-06

Another question is: in the kitti_loam_segmap.launch there is a line: <node pkg="tf2_ros" type="static_transform_publisher" name="static_broadcaster" args="0 0 0 0.5 0.5 0.5 0.5 world imu_new" />. What is it used for?

RozDavid commented 3 years ago

Hey @yutouwd,

As you can see on the tf output, your transformation tree is not connected. With the odometry nodes we are publihsing from the imu_new to camera frames, while all your bag messages are coming from the map frame. Also, I cant't really tell based on this picture, but your bag also seems to have an odometry topic that publishes to the odom frame. Keep in mind also, that the pointclouds needs to be published under the imu_new frame. Sadly it is not the best architecture design that I hardcoded that parameter, but shouldn't be hard for you to refactor that to a rosparam.

That static transform in the launch file can help connecting static frames and add necessary rotation that might be helpful for your visualization purposes.

Cheers, David

yutouwd commented 3 years ago

Hello @RozDavid,

Our bag do have an odometry topic. So I use this script to remove the odom and I also publish a static transform between world and base_link. In this way, the local map can update normally. But after I test many times, I find that there is no match between local map and target map. Now, our tf view_frame is:

Screenshot from 2021-02-21 11-01-40

In the left is map to base_link.

Am I doing it in a right way? And I do not understand what you say refactor that to a rosparam. Would you please be more specific? Thank you so much.

WilliamWoo45 commented 3 years ago

Hi David @RozDavid,

Hope everything goes fine with you. I'm kind of having a similar issue with @yutouwd. I published a static transform between the world and base_link. However, I also find that there is no match (i.e. no successful localizaztion) between the local map and the target map.

Any possible reason for this?

Thanks and Best Regards, William

RozDavid commented 3 years ago

Hey @WilliamWoo45,

Can you see how the local map around the robot is building up and visualized? If no local map available there, matches cannot be recognized with the target map. If the local map is not updating that should be due to transformation inconsistencies (either with transforms from the past in your rosbag or detached tf tree), or you are not subscribed to the correct lidar pointcloud topic in the right frame.

yutouwd commented 3 years ago

Hello @RozDavid,

Thanks for your response. Actually in my case, the local map is building up and keep updating, as shown in the GIF below:

Peek 2021-03-12 11-30

And I confirm that I subscribed to the correct LiDAR pointcloud topic (/velodyne_points) in the right frame.