Skip to content

Commit 3dd1c60

Browse files
committed
v2.0
1 parent 75084b8 commit 3dd1c60

File tree

14 files changed

+2944
-24
lines changed

14 files changed

+2944
-24
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ add_definitions(-w)
4040
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)
4141
set(CMAKE_PREFIX_PATH ${PROJECT_SOURCE_DIR}/Thirdparty/libtorch)
4242

43-
find_package(OpenCV 4.4)
43+
find_package(OpenCV 4.2)
4444
if(NOT OpenCV_FOUND)
4545
message(FATAL_ERROR "OpenCV > 4.4 not found.")
4646
endif()

Examples/RGB-D/TUM3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ RGBD.DepthMapFactor: 5000.0
3939
#--------------------------------------------------------------------------------------------
4040

4141
# ORB Extractor: Number of features per image
42-
ORBextractor.nFeatures: 1000
42+
ORBextractor.nFeatures: 2000
4343

4444
# ORB Extractor: Scale factor between levels in the scale pyramid
4545
ORBextractor.scaleFactor: 1.2

Examples/RGB-D/rgbd_tum.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
121121
T = tframe-vTimestamps[ni-1];
122122

123123
if(ttrack<T)
124-
usleep((T-ttrack)*1e6);
124+
usleep((T-ttrack)*10);
125125
}
126126

127127
// Stop all threads
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<launch>
2-
<node pkg="topic_tools" name="topic_1" type="throttle" args="messages camera/rgb/image_raw 15 camera/rgb/image_raw_low"/>
3-
<node pkg="topic_tools" name="topic_2" type="throttle" args="messages camera/depth_registered/image_raw 15 camera/depth_registered/image_raw_low"/>
2+
<node pkg="topic_tools" name="topic_1" type="throttle" args="messages camera/color/image_raw 15 camera/color/image_raw_low"/>
3+
<node pkg="topic_tools" name="topic_2" type="throttle" args="messages camera/aligned_depth_to_color/image_raw 15 camera/aligned_depth_to_color/image_raw_low"/>
44
</launch>
55

Examples/ROS/YOLO_ORB_SLAM3/src/ros_rgbd.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ int main(int argc, char **argv)
6363

6464
ros::NodeHandle nh;
6565

66-
message_filters::Subscriber<sensor_msgs::Image> rgb_sub(nh, "/camera/rgb/image_raw_low", 100);
67-
message_filters::Subscriber<sensor_msgs::Image> depth_sub(nh, "camera/depth_registered/image_raw_low", 100);
66+
message_filters::Subscriber<sensor_msgs::Image> rgb_sub(nh, "/camera/color/image_raw_low", 100);
67+
message_filters::Subscriber<sensor_msgs::Image> depth_sub(nh, "camera/aligned_depth_to_color/image_raw_low", 100);
6868
typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::Image, sensor_msgs::Image> sync_pol;
6969
message_filters::Synchronizer<sync_pol> sync(sync_pol(10), rgb_sub,depth_sub);
7070
sync.registerCallback(boost::bind(&ImageGrabber::GrabRGBD,&igb,_1,_2));

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# YOLO_ORB_SLAM3
2+
Combine YOLOv5 with ORB-SLAM3
3+
- Object Detect
4+
- Dynamic SLAM
5+
6+
![Fig1](/home/yuwenlu/MyCode/Fig1.png)
7+
![Fig2](/home/yuwenlu/MyCode/Fig2.png)
28
## Geting Started
39
### 1. Install libtorch
410
```bash

groundtruth.txt

Lines changed: 2887 additions & 0 deletions
Large diffs are not rendered by default.

include/ORBextractor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class ORBextractor
8181
}
8282

8383
std::vector<cv::Mat> mvImagePyramid;
84-
std::vector<cv::Rect2i> mvPersonArea;
84+
std::vector<cv::Rect2i> mvDynamicArea;
8585

8686
protected:
8787

include/Viewer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ class Viewer
6666
bool both;
6767

6868
std::vector<cv::Rect2i> mvPersonArea;
69+
map<string, vector<cv::Rect2i>> mmDetectMap;
70+
71+
6972
std::mutex mMutexPAFinsh;
7073

7174
private:

include/YoloDetect.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ class YoloDetection
3030
torch::jit::script::Module mModule;
3131
std::vector<std::string> mClassnames;
3232

33+
// 6-28
34+
vector<string> mvDynamicNames;
35+
vector<cv::Rect2i> mvDynamicArea;
36+
map<string, vector<cv::Rect2i>> mmDetectMap;
37+
38+
3339
};
3440

3541

0 commit comments

Comments
 (0)