Skip to content

Commit

Permalink
docs: refer to the localization tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Sep 6, 2024
1 parent 0a466c4 commit 076b143
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion docs/source/localization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,41 @@ Write me!

3. Localization with particle filtering
----------------------------------------
Write me!
To localize with a particle filter (PF) you will need:

1. A metric map (the ``.mm`` file) of the environment. Built as described in: :ref:`building-maps`.
2. To publish that map using `mrpt_map_server <https://github.com/mrpt-ros-pkg/mrpt_navigation/tree/ros2/mrpt_map_server/>`_.
3. Launch `mrpt_pf_localization <https://github.com/mrpt-ros-pkg/mrpt_navigation/tree/ros2/mrpt_pf_localization>`_ and configure it
to read from wheels odometry (if they exist), the input sensors (e.g. LiDAR), GPS (GNSS) if present. This node will subscribe to
the published metric map and use the sensors to publish updates on the robot pose in the `map` frame.

.. note::

Do **NOT** set the raw LiDAR pointcloud as input for the PF. It is just too large and it must be subsampled first.
We can use `mrpt_pointcloud_pipeline <https://github.com/mrpt-ros-pkg/mrpt_navigation/tree/ros2/mrpt_pointcloud_pipeline>`_
for such task, as can be seen in the tutorial below.

3.1. Tutorial
================
A complete demonstration has been put together on: https://github.com/MOLAorg/mola_warehouse_pf_tutorial

.. dropdown:: Run tutorial
:open:

Clone the tutorial package (which already includes a prebuilt ``.mm``), make sure of having all dependencies,
build and run it:

.. code-block:: bash
cd ~/ros2_ws/src
git clone https://github.com/MOLAorg/mola_warehouse_pf_tutorial.git
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
ros2 launch mola_warehouse_pf_tutorial tutorial_launch.py

0 comments on commit 076b143

Please sign in to comment.