url-kaist / patchwork-plusplus

Patchwork++: Fast and robust ground segmentation method for 3D LiDAR scans. @ IROS'22
GNU General Public License v3.0
668 stars 105 forks source link

Confused on update_elevation_ and update_flatness_ #19

Closed faultfactory closed 1 year ago

faultfactory commented 1 year ago

In the header, these variables appear to just be std::vector<double>[4] but in usage it looks like it should be std::vector<std::vector<double>>[4] based on the attached lines. What's correct.

https://github.com/url-kaist/patchwork-plusplus/blob/11c189380b85db7f82f43e993f481aadce39b84f/patchworkpp/src/patchworkpp.cpp#L238-L239

The same pattern holds for the update_flatness_thr_ and update_elevation_thr_ functions. They appear to index into a vector and then call functions on a nested vector.

Am i missing something.

faultfactory commented 1 year ago

Nevermind. looks like you're making a c-style array of vectors.