Attention

You are viewing an older version of the documentation. The latest version is 2.2.

Robot Re-localization package for ROS2 Navigation

The Robot Re-localization package empowers ROS2 navigation with the capability to re-localize a robot. In situations where sensor measurements encounter glitches or environment disturbances or scene similarities lead to localization loss, the robot may lose its position. This necessitates a fast and reliable re-localization algorithm to re-establish the robot’s location accurately. To tackle this issue, we developed an innovative re-localization algorithm that excels in both computational efficiency and memory usage, specifically designed for mobile robots.

Getting Started

Robotics SDK provides a ROS 2 Deb package for the application, supported by the following platform:

  • ROS version: humble

Install Deb package

Install the ros-humble-its-relocalization-bringup Deb package from the Intel® Robotics SDK APT repository

sudo apt install ros-humble-its-relocalization-bringup
Copy to clipboard

Run the Re-localization

Run the following script to set environment variables and bring up ROS2 navigation, and Turtlebot3 in Gazebo:

source /opt/ros/humble/setup.bash
export TURTLEBOT3_MODEL=waffle_pi
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/humble/share/turtlebot3_gazebo/models
ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False
Copy to clipboard

Set the robot 2D Pose Estimate in rviz2:

  1. Set the initial robot pose by pressing 2D Pose Estimate in rviz2.

  2. At the robot estimated location, down-click inside the 2D map. For

    reference, use the robot pose as it appears in Gazebo*.

  3. Set the orientation by dragging forward from the down-click. This also

    enables ROS 2 navigation.

../../../_images/2d_pose_estimate.png

Once the ROS2 navigation is running in Gazebo and the initial robot position is set, open a new terminal to bring up the re-localization:

source /opt/ros/humble/setup.bash
ros2 launch relocalization_bringup relocalization.launch.xml
Copy to clipboard

To simulate the re-localization package, we have developed a demo application that replicates a scenario in which the sensor encounters a temporary failure. In this application, the sensor is disabled for a few seconds while the robot is traveling towards its goal. Once the sensor measurements are re-enabled, the robot will automatically re-localize itself and resume its navigation toward the goal. To run this demo application execute:

ros2 launch relocalization_bringup relocalization_demo.launch.xml mode:=demo
Copy to clipboard

Note

Before launching the relocalization package, ensure that the robot initial pose has been set as described above.

Troubleshooting

For general robot issues, go to Troubleshooting for Robot Tutorials.