cartographer-project / cartographer

Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Apache License 2.0
7.03k stars 2.24k forks source link

Question about bicubic interpolator #1863

Open Zwangzy opened 2 years ago

Zwangzy commented 2 years ago

Hi, I am recently reading the source code of cartographer. I here have a question in cartographer/mapping/internal/2d/scan_matching/occupied_space_cost_function_2d.cc shown below.

https://github.com/cartographer-project/cartographer/blob/b8228ee6564f5a7ad0d6d0b9a30516521cff2ee9/cartographer/mapping/internal/2d/scan_matching/occupied_space_cost_function_2d.cc#L58-L61

I am wondering why both x and y index need to - 0.5? For anyone who can help to answer, thanks ahead!