tkkim-robot / SLAM_Wiki

Just some private study notes for SLAM
8 stars 1 forks source link

occurred issue of hdl_graph_slam #1

Closed tkkim-robot closed 5 years ago

tkkim-robot commented 5 years ago

Issue : road is flipped

I had succeeded to perform localization using "first.pcd". It works pretty well.

But I met a problem on "third.pcd". I could not perform localization no matter how I tune the parameters. So I checked the pcd map, and found the road is 180 degree flipped.

When I use my custom rosbag file to run hdl_graph_slam with enabling GPS and linear_acc, the map is flipped just after few seconds. The trees and the buildings are registered below the ground plane. When only enable GPS, it works well. When enable both sensors, it happens. Watch the map on the top, the entire shape is correct, only the road is flipped.

You can see the video here: https://youtu.be/UVNYSuga61Y

I think it is related to the registration process. Because the fitness_score is lower than the threshold, even it is flipped, so the registration is happen. It is just my pure guess.

Open issue on hdl_graph_slam github

I open an issue to earn solutions. The link : https://github.com/koide3/hdl_graph_slam/issues/66

tkkim-robot commented 5 years ago

road-flipped issue solved

Road-flipped issue is solved by changed the source code a little bit, and I request a merge to the master repository, and the owner merged it.

Link : https://github.com/koide3/hdl_graph_slam/pull/69

After that, when running hdl_graph_slam, there are no road-flipped issue anymore. I could make a correct pcd file now. I will run localization later.

tkkim-robot commented 5 years ago

Localization failed on third.bag

I ran hdl_localization using the normal pcd file, "third.bag" also seems to be no problem anymore. But, in the middle of the rosbag file, always fail to localize on a same spot.

You can see the video of hdl_localization on "third.bag". It fails to localize around 3:00. Link : https://www.youtube.com/watch?v=pI-KB9ZZ8tA

(Note : this is the route of "third.bag" )

스크린샷 2019-08-12 오전 10 05 59
tkkim-robot commented 5 years ago

sparsity of the map causes the failure

It is found that the sparsity of the map causes the localization failure. So I will create a more dense pcd map using hdl_graph_slam.

This is the answer of the repository owner : https://github.com/koide3/hdl_localization/issues/21

I will adjust "min_edge_interval" and "map_cloud_resolution" smaller in the launch file, so that could create a dense map. Then see localization is ok or not.

tkkim-robot commented 5 years ago

Another localization failure using dense map

I created a denser pcd map to localization. But, I found another localization failure on "first_imu.pcd". It was working well using the sparse map.

You can see the video: https://www.youtube.com/watch?v=Oz5kcGG6y3U

tkkim-robot commented 5 years ago

localization failure solved

I had solved localization failure above by setting "invert_imu" as false. After checking imu data, it is found that gyro data is matching the real world well, and do not need to invert.

third.bag is not proper for SLAM!!

After careful consideration, "third.bag" is found to be not proper for SLAM. The closed-loop path is too large, so the drift error is accumulated a lot. It is true that it could be forcedly perform loop close by increasing loop closure threshold, but the map will get weird. The loop path must be as small as possible for accurate mapping. I had wrote every basic concepts and information of this issue on the separate wiki page.

If someone is going to continue GraphSLAM using rosbag or online, PLEASE READ IT !!!!!!!