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

Got map inefficient when using cairo #1957

Open kokeliang opened 3 months ago

kokeliang commented 3 months ago

When using cairo to generate global map from submaps, the following code costed a lot of time. Would someone know how to get the global map more efficiently?

  CairoPaintSubmapSlices(1. / resolution, submaps, cr.get(),
                         [&cr](const SubmapSlice& submap_slice) {
                           cairo_set_source_surface(
                               cr.get(), submap_slice.surface.get(), 0., 0.);
                           cairo_paint(cr.get());
                         });