A ROS2-based autonomous border monitoring system that tracks objects crossing a defined boundary line.
Border Patrol Bot combines navigation and computer vision to create an autonomous security monitoring system. The robot patrols along a defined border line using SLAM and Nav2, while simultaneously detecting and tracking objects that cross the border using depth cameras, OpenCV, and object detection.
- Autonomous Navigation: Uses slam_toolbox and Nav2 for SLAM and autonomous patrol
- Object Detection: YOLOv8 for real-time object detection and tracking
- Computer Vision: OpenCV for image processing and visualization
- Border Crossing Detection: Identifies objects crossing a configurable boundary line
- Entry/Exit Classification: Categorizes crossings as entries or exits based on robot position
- 3D Positioning: Uses point cloud data to locate objects in 3D space
# Clone the repository
git clone https://github.com/MuhammadBilalKhan267/Border-Patrol-Bot# Build the package
colcon build --symlink-install# Launch default simulation
ros2 launch patrol_bot launch_sim.launch.py# Launch with custom world
ros2 launch patrol_bot launch_sim.launch.py world:=/home/bilal/robotics/ros2/patrol_bot/src/patrol_bot/worlds/obstacles.worldros2 run crossing_detection trackerNode# Launch RViz with predefined configuration
rviz2 -d /home/bilal/robotics/ros2/patrol_bot/src/patrol_bot/config/slam.rviz# Teleoperation using keyboard
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r cmd_vel:=cmd_vel_keyBorder crossing data is published to the following topics:
/border_crossing/counts: Summary statistics of border crossings/border_crossing/status: Detailed information about tracked objects
View the data in real-time:
ros2 topic echo /border_crossing/countsContributions to Border Patrol Bot are welcome! Whether it's bug reports, feature requests, or code contributions, please feel free to reach out and help improve this project.