Skip to content

Commit d904659

Browse files
size relation added
1 parent a28b393 commit d904659

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ add_compile_options(-std=c++11)
88
set(opencv_contrib OFF)
99
set(zbar_lib OFF)
1010
set(TensorFlow OFF)
11-
set(DLib OFF)
12-
set(igraph OFF)
11+
set(DLib ON)
12+
set(igraph ON)
1313

1414
## Find catkin macros and libraries
1515
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
@@ -125,6 +125,7 @@ add_executable(
125125
src/lib/relations/LogicRelations.cpp
126126
src/lib/relations/ThreeDimRangeRelation.cpp
127127
src/lib/relations/SpaceRelations.cpp
128+
src/lib/relations/SizeRelations.cpp
128129
)
129130

130131
if(TensorFlow)
@@ -312,6 +313,7 @@ add_executable(
312313
src/lib/relations/LogicRelations.cpp
313314
src/lib/relations/ThreeDimRangeRelation.cpp
314315
src/lib/relations/SpaceRelations.cpp
316+
src/lib/relations/SizeRelations.cpp
315317
)
316318

317319
#offline image processor
@@ -363,6 +365,7 @@ add_executable(
363365
src/lib/relations/LogicRelations.cpp
364366
src/lib/relations/ThreeDimRangeRelation.cpp
365367
src/lib/relations/SpaceRelations.cpp
368+
src/lib/relations/SizeRelations.cpp
366369
)
367370

368371
if(TensorFlow)

src/extended_object_detection_node/extended_object_detection_node.cpp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ void video_process_cb(const ros::TimerEvent&){
767767
array_objects.objects.push_back(current_object);
768768
}
769769
}
770-
#ifdef IGRAPH
770+
#ifdef USE_IGRAPH
771771
// COMPLEX OBJECTS
772772
extended_object_detection::ComplexObjectArray array_co_msg;
773773
for( size_t i = 0 ; i < selected_to_detect_complex_objects.size(); i++){
@@ -798,9 +798,23 @@ void video_process_cb(const ros::TimerEvent&){
798798
vector<ExtendedObjectInfo> DetectedComplexObjects;
799799

800800
DetectedComplexObjects = selected_to_detect_complex_objects.at(i)->Identify(last_image, last_depth, seq);
801+
vector<ExtendedObjectInfo> DetectedObjects;
802+
803+
for(size_t j = 0; j < DetectedComplexObjects.size(); j++){
804+
extended_object_detection::ComplexObject co_msg;
805+
806+
co_msg = ros_msg_from_complex(&DetectedComplexObjects[j], DetectedObjects);
807+
808+
co_msg.type_id = selected_to_detect_complex_objects[i]->ID;
809+
co_msg.type_name = selected_to_detect_complex_objects[i]->name;
810+
811+
array_co_msg.complex_objects.push_back(co_msg);
812+
}
801813

802814
if( screenOutputFlag || publishImage)
803815
selected_to_detect_complex_objects.at(i)->drawAll(image2draw, Scalar(255, 255, 0), 2);
816+
817+
804818
}
805819
#endif
806820
seq++;
@@ -821,7 +835,7 @@ void video_process_cb(const ros::TimerEvent&){
821835
}
822836
array_objects.objects.clear();
823837
}
824-
#ifdef IGRAPH
838+
#ifdef USE_IGRAPH
825839
if( array_co_msg.complex_objects.size() > 0){
826840
array_co_msg.header.stamp = ros::Time::now();
827841
array_co_msg.header.frame_id = image_frame_id;

0 commit comments

Comments
 (0)