OpenCV Robot Relocalization: This project utilizes OpenCV and IMU data to address the 'kidnapped robot' problem. It features two key components:
- Kidnapping Detection, which uses IMU data to identify unexpected movements suggesting the robot has been moved
- Relocalization, employing OpenCV for template matching to reorient the robot in its new environment using lidar costmaps. The approach combines threshold-based
- IMU analysis with feature detection and mapping, offering a robust solution for autonomous reorientation after displacement.
-
cd catkin_ws/src #wherever your main is
-
cd ~catkin_ws
-
rosdep install --from-paths src --ignore-src -r
-
catkin_make
- Use the correct imu topic.
- Change your map.yaml's origin to [0,0,0].
- The global costmap and local cost map should be in the same directory
- First enter the The_kidnapper_Algorithm.py and change image path and template path to your respective position
- From map class change the global cost map topic with its name and after work the system 2 times.
- After you have initial costmaps change back to local costmaps.
- You can add the kidnapper.launch to your main launch file for it to work continously.
- As long as it does not detect kidnapping, the main program will not work so CPU usage is respectively low
The real world position
Rviz initial condition
The localition finder
relocalized position