This commit is contained in:
trung09122002
2025-09-19 15:11:02 +07:00
parent 6e1103813b
commit c40e7f4ceb

View File

@@ -8,7 +8,7 @@ This ROS package provides a node that combines YOLO v5 object detection with Bag
## ✨ Features ## ✨ Features
- **Real-time landmark detection** using YOLO v5 - **Real-time landmark detection** using YOLO11
- **Bag-of-Visual-Words (BoVW)** for landmark recognition - **Bag-of-Visual-Words (BoVW)** for landmark recognition
- **RGB-D support** with Intel RealSense camera - **RGB-D support** with Intel RealSense camera
- **Custom ROS messages** (`landmark` and `landmark_array`) - **Custom ROS messages** (`landmark` and `landmark_array`)
@@ -41,7 +41,7 @@ pip install joblib
```bash ```bash
cd ~/landmarks_detection_ROS/src cd ~/landmarks_detection_ROS/src
# Clone your repository here # Clone your repository here
cd ~/catkin_ws cd ~/landmarks_detection_ROS
catkin_make catkin_make
source devel/setup.bash source devel/setup.bash
``` ```
@@ -57,22 +57,22 @@ pip install ultralytics opencv-python scikit-learn joblib
```bash ```bash
# Source your workspace # Source your workspace
source ~/catkin_ws/devel/setup.bash source ~/landmarks_detection_ROS/devel/setup.bash
# Launch with RealSense camera # Launch with RealSense camera
roslaunch landmarks_detection_ROS landmark.launch roslaunch landmarks_detection landmark.launch
``` ```
### Launch only the detection node (if camera is already running): ### Launch only the detection node (if camera is already running):
```bash ```bash
rosrun landmarks_detection_ROS landmark.py rosrun landmarks_detection landmark.py
``` ```
### Visualize in RViz: ### Visualize in RViz:
```bash ```bash
rosrun rviz rviz -d $(rospack find landmarks_detection_ROS)/rviz/landmarks.rviz rosrun rviz rviz -d $(rospack find landmarks_detection)/rviz/landmarks.rviz
``` ```
## ⚙️ Configuration ## ⚙️ Configuration
@@ -82,9 +82,9 @@ rosrun rviz rviz -d $(rospack find landmarks_detection_ROS)/rviz/landmarks.rviz
Edit `launch/landmark.launch` to customize: Edit `launch/landmark.launch` to customize:
```xml ```xml
<param name="yolo_model" value="$(find landmarks_detection_ROS)/weights/last.pt"/> <param name="yolo_model" value="$(find landmarks_detection)/weights/last.pt"/>
<param name="codebook" value="$(find landmarks_detection_ROS)/codebook/codebook_kNN.joblib"/> <param name="codebook" value="$(find landmarks_detection)/codebook/codebook_kNN.joblib"/>
<param name="idf" value="$(find landmarks_detection_ROS)/codebook/idf.npy"/> <param name="idf" value="$(find landmarks_detection)/codebook/idf.npy"/>
<param name="conf_thres" value="0.25"/> <!-- YOLO confidence threshold --> <param name="conf_thres" value="0.25"/> <!-- YOLO confidence threshold -->
<param name="sim_thresh" value="0.12"/> <!-- BoVW similarity threshold --> <param name="sim_thresh" value="0.12"/> <!-- BoVW similarity threshold -->
<param name="use_depth" value="true"/> <!-- Enable depth data --> <param name="use_depth" value="true"/> <!-- Enable depth data -->
@@ -209,7 +209,7 @@ landmarks_detection_ROS/
1. **Package not found:** 1. **Package not found:**
```bash ```bash
# Make sure to source the workspace # Make sure to source the workspace
source ~/catkin_ws/devel/setup.bash source ~/landmarks_detection_ROS/devel/setup.bash
# Verify package is found # Verify package is found
rospack find landmarks_detection_ROS rospack find landmarks_detection_ROS
``` ```
@@ -240,7 +240,7 @@ chmod +x src/landmark.py
6. **Message generation errors:** 6. **Message generation errors:**
```bash ```bash
# Rebuild the workspace # Rebuild the workspace
cd ~/catkin_ws cd ~/landmarks_detection_ROS
catkin_make clean catkin_make clean
catkin_make catkin_make
source devel/setup.bash source devel/setup.bash