-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathros-noetic-face-detector.patch
45 lines (42 loc) · 1.41 KB
/
ros-noetic-face-detector.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e865b87..94b2d79 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,8 @@ find_package(catkin REQUIRED COMPONENTS
tf
)
+find_package(yaml-cpp REQUIRED)
+
find_package(Boost REQUIRED COMPONENTS system thread)
find_package(OpenCV)
@@ -57,6 +59,7 @@ include_directories(
${Boost_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
+ ${YAML_INCLUDE_DIRS}
)
add_executable(face_detector
@@ -64,7 +67,7 @@ add_executable(face_detector
src/faces.cpp)
add_dependencies(face_detector ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
target_link_libraries(face_detector
- yaml-cpp
+ ${YAML_CPP_LIBRARIES}
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${OpenCV_LIBRARIES})
diff --git a/src/face_detection.cpp b/src/face_detection.cpp
index 7cf7f3c0..a2132a72 100644
--- a/src/face_detection.cpp
+++ b/src/face_detection.cpp
@@ -716,7 +716,9 @@ class FaceDetector
else
{
max_id_++;
- pos.object_id = static_cast<std::ostringstream*>(&(std::ostringstream() << max_id_))->str();
+ std::ostringstream oss;
+ oss << max_id_;
+ pos.object_id = oss.str();
ROS_INFO_STREAM_NAMED("face_detector", "Didn't find face to match, starting new ID " << pos.object_id);
}
result_.face_positions.push_back(pos);