I have a /scan topic coming from a 2D lidar scanner.

The task is to receive a mapping of the dynamic environment. It is assumed that the position of the scanner is always known, so localization is not required. Another simplification is that the scanner only moves along the straight line. The laser is suspended and moves to scan the surface under it in 2D plane, then the 2D plane is converted to 1D array of object heights.

I successfully used SLAM packages like gmapping and slam_toolbox to receive /map topic. But the functionality they provide appears to be superfluous for this application. In fact, the main problem it solves to localize robot and build a map is absolutely redundant in this application. Plus, gmapping provides a static map, and slam_toolbox life-long mapping is in experimental stage. Another solution was to create a map from point cloud of the raw scan, but I don't want to reinvent the wheel and deal with potential complications like noise, etc.

I'm looking for any ideas for algorithms, or ready to go packages. The final result should be a 2D array or /map topic (if there is an implementation in ROS).

Any ideas, concepts or references are very welcome!


2 Answers 2


It sounds like you are just looking to aggregate the laser scans into point clouds and then run your analysis on that. There are tools such as laser_assembler that do this exact sort of thing.

You have tagged this for ROS 2 so you may need to port it forward. I'm sure the maintainers would appreciate some help.

  • $\begingroup$ Thank you for the advice. I researched the repo. It seems like where was an attempt by vandanamandlik to port it to ROS2. I saw your comments there. But nothing was committed though - the ros2 branch has all old files. I wonder why? $\endgroup$
    – nigeno
    Mar 28, 2022 at 20:37


See the main OGM concepts here : (Wurm et al., 2010; Moravec, 1996) It is to obtain consistent maps, even in environmental changes. The map’s ability to adapt to dynamics is achieved through the occupancy update procedure: As new measurement samples become available, the inconsistent parts of the model are updated and corrected, as demonstrated in the figure below. The occupancy the map is not, however, a model of dynamic environments as understood in dynamic mapping literature in two dimensions (Arbuckle et al., 2002; Biber and Duckett, 2005; Wolf and Sukhatme, 2005; Mitsou and Tzafestas, 2007; Meyer-Delius Di Vasto, 2011; Saarinen et al., 2012),

Ref. [Here][1]

Practically, My suggestion is to check the Gmapping code; It is a simplified way to implement the Logg-Odds Inverse model for mapping.

Or Check this Repo

Please, Let me know if that would be useful.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.