koide3 / hdl_localization

Real-time 3D localization using a (velodyne) 3D LIDAR
BSD 2-Clause "Simplified" License
775 stars 310 forks source link

Using wheel odometry data #81

Open kunnalparihar opened 2 years ago

kunnalparihar commented 2 years ago

Hello, I want to use wheel odometry data in this package. Can you please guide me how to add wheel odometry data (x,y,yaw)?

Thanks in advance

koide3 commented 2 years ago

To use wheel odometry data, you need to publish the transformation between odom and sensor frames on TF. Then, set enable_robot_odometry_prediction to true.

https://github.com/koide3/hdl_localization/blob/master/launch/hdl_localization.launch

kunnalparihar commented 2 years ago

Thanks. It worked for me. The overall trajectory looks good when compared with the GPS trajectory, but at some places, the localization trajectory is not smooth (Has some zig zag). How can improve the smoothness of my trajectory? Which parameter needs to be tweaked? Screenshot from 2021-07-12 07-40-48

nyxrobotics commented 1 year ago

~I set enable_robot_odometry_prediction to true but /aligned_points does not follow odom. How can I check if it works?~ I made these covariance values to Eigen::Matrix3f::Identity() * 1e-12 and got the behavior I was expecting. I want to reduce the covariance referring to tf. Can you tell me the basis for this calculation? https://github.com/koide3/hdl_localization/blob/d0716af0aebda7bc1c35caaeb25a8da49b9a3a62/src/hdl_localization/pose_estimator.cpp#L101-L102 https://github.com/koide3/hdl_localization/blob/d0716af0aebda7bc1c35caaeb25a8da49b9a3a62/src/hdl_localization/pose_estimator.cpp#L107 https://github.com/koide3/hdl_localization/blob/d0716af0aebda7bc1c35caaeb25a8da49b9a3a62/src/hdl_localization/pose_estimator.cpp#L123-L125