Ekumen-OS / beluga

A general implementation of Monte Carlo Localization (MCL) algorithms written in C++17, and a ROS package that can be used in ROS 1 and ROS 2.
https://ekumen-os.github.io/beluga/
Apache License 2.0
170 stars 10 forks source link

Write tutorial on using Beluga #305

Closed hidmic closed 4 days ago

hidmic commented 5 months ago

Feature description

Precisely what the title says. While Beluga's API is well documented, the only reference on how to make use of the library is a ROS node and some tests. That works against adoption. We need a golden example that builds up in complexity, showcasing Beluga's features. We need to guide newcomers on reproducing that example, one step at a time.

nahueespinosa commented 4 months ago

Following up on the conversation on how to implement the golden example, the idea is to implement the one-dimensional hallway example for Monte Carlo Localization presented in Chapter 8.3 in Thrun et. al. using the Beluga core library without ROS dependencies.

Image

Here is a list of milestones that can be used as reference:

  1. Implement the program skeleton, focusing on the creation of a particle set (states and weights) structure and basic visualization capabilities.
    • This can be serializing to a file and then post-processing in Python, or simply writing the output to the terminal in a way that resembles the example in the book.
    • It is key to represent both the position (state) of the particle and the weight (could be a line's height, a circle's diameter, or something else).
  2. Develop the initialization function for the particle set to sample uniformly from a specified interval.
  3. Implement the sensor model capable of reweighting particles based on the map landmarks (doors) and the current position.
  4. Develop the motion model to update the positions of the particles, including a routine for moving particles at a constant rate in a given direction.
  5. Implement a basic resampling step that allows for the selection of particles based on their weights (no need to make it adaptive at this stage, so taking samples up to a fixed size is perfectly fine).

FYI @Alondruck @hidmic @gonzodepedro

hidmic commented 4 days ago

Addressed as of #365 and #387. @Alondruck are the scripts on #387 used for our tutorial?