Skip to content

Commit d774e9f

Browse files
committed
ed to catkin, changed name virtual cam targets
git-svn-id: https://roboticssrv.wtb.tue.nl/svn/ros/trunk/ed@26432 3a3c2cfb-d3b9-409e-9e75-db8fcdbcaac6
0 parents  commit d774e9f

File tree

103 files changed

+15723
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+15723
-0
lines changed

CMakeLists.txt

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(ed)
3+
4+
## Find catkin macros and libraries
5+
find_package(catkin REQUIRED COMPONENTS
6+
class_loader
7+
cv_bridge
8+
ed_object_models
9+
geolib2
10+
geometry_msgs
11+
# libsiftfast
12+
rgbd
13+
pcl
14+
roscpp
15+
roslib
16+
std_srvs
17+
tue_config
18+
tue_filesystem
19+
tue_serialization
20+
vocabulary_tree
21+
message_generation
22+
)
23+
24+
# Generate messages in the 'msg' folder
25+
add_message_files(
26+
FILES
27+
EntityInfo.msg
28+
)
29+
30+
# Generate services in the 'srv' folder
31+
add_service_files(
32+
FILES
33+
GetGUICommand.srv
34+
GetMeasurements.srv
35+
RaiseEvent.srv
36+
SetClick.srv
37+
SetLabel.srv
38+
SimpleQuery.srv
39+
)
40+
41+
# Generate added messages and services with any dependencies listed here
42+
generate_messages(
43+
DEPENDENCIES
44+
geometry_msgs
45+
tue_serialization
46+
)
47+
48+
###################################
49+
## catkin specific configuration ##
50+
###################################
51+
catkin_package()
52+
53+
###########
54+
## Build ##
55+
###########
56+
57+
include_directories(
58+
include
59+
${catkin_INCLUDE_DIRS}
60+
)
61+
62+
# ------------------------------------------------------------------------------------------------
63+
# ED CORE
64+
# ------------------------------------------------------------------------------------------------
65+
66+
# Get all the headers
67+
file(GLOB_RECURSE HEADER_FILES include/*.h)
68+
69+
# Declare a cpp library
70+
add_library(ed_core
71+
src/entity.cpp
72+
src/measurement.cpp
73+
74+
# DDP is used by measurement.cpp, so put here
75+
src/helpers/depth_data_processing.cpp
76+
src/helpers/clipper/clipper.cpp
77+
${HEADER_FILES}
78+
)
79+
target_link_libraries(ed_core ${catkin_LIBRARIES})
80+
add_dependencies(ed_core ${PROJECT_NAME}_gencpp)
81+
82+
add_library(ed_perception
83+
src/perception_modules/perception_module.cpp
84+
src/perception.cpp
85+
src/perception_worker.cpp
86+
src/perception/aggregator.cpp
87+
src/perception/model_fitter.cpp
88+
)
89+
target_link_libraries(ed_perception ed_core)
90+
add_dependencies(ed_perception ${PROJECT_NAME}_gencpp)
91+
92+
add_library(ed_io
93+
src/serialization/serialization.cpp
94+
src/io/filesystem/read.cpp
95+
src/io/filesystem/write.cpp
96+
)
97+
add_dependencies(ed_io ${PROJECT_NAME}_gencpp)
98+
99+
add_library(ed_association
100+
src/association_localization_modules/point_normal_alm.cpp
101+
src/association_localization_modules/polygon_height_alm.cpp
102+
src/association_localization_modules/world_model_renderer.cpp
103+
)
104+
add_dependencies(ed_association ${PROJECT_NAME}_gencpp)
105+
106+
add_library(ed_segmentation
107+
src/segmentation_modules/euclidean_clustering_sm.cpp
108+
src/segmentation_modules/floodfill_sm.cpp
109+
)
110+
add_dependencies(ed_segmentation ${PROJECT_NAME}_gencpp)
111+
112+
add_library(ed_kinect
113+
src/sensor_modules/kinect.cpp
114+
)
115+
target_link_libraries(ed_kinect ed_segmentation ed_association)
116+
add_dependencies(ed_kinect ${PROJECT_NAME}_gencpp)
117+
118+
add_library(ed_visualization
119+
src/helpers/visualization.cpp
120+
)
121+
add_dependencies(ed_visualization ${PROJECT_NAME}_gencpp)
122+
123+
add_library(ed_gui
124+
src/perception/label_gui_server.cpp
125+
)
126+
add_dependencies(ed_gui ${PROJECT_NAME}_gencpp)
127+
128+
# ------------------------------------------------------------------------------------------------
129+
# PERCEPTION MODULES
130+
# ------------------------------------------------------------------------------------------------
131+
132+
add_library(size_matcher
133+
perception/size_matcher.cpp
134+
perception/size_matcher.h
135+
)
136+
target_link_libraries(size_matcher ed_perception)
137+
138+
add_library(human_contour_matcher
139+
perception/human_contour_matcher.cpp
140+
perception/human_contour_matcher.h
141+
perception/human_classifier.cpp
142+
perception/human_classifier.h
143+
perception/human_classifier_structs.h
144+
# perception/opencl_toolbox.cpp
145+
# perception/opencl_toolbox.h
146+
)
147+
target_link_libraries(human_contour_matcher ed_perception)
148+
149+
#add_library(odu_finder
150+
# perception/odu_finder/odu_finder_module.cpp
151+
# perception/odu_finder/odu_finder_module.h
152+
# perception/odu_finder/odu_finder.cpp
153+
# perception/odu_finder/odu_finder.h
154+
#)
155+
#target_link_libraries(odu_finder ed_perception)
156+
157+
add_library(qr_detector
158+
perception/qr_detector.cpp
159+
perception/qr_detector.h
160+
perception/qr_detector_zbar/qr_detector_zbar.cpp
161+
perception/qr_detector_zbar/qr_detector_zbar.h
162+
)
163+
target_link_libraries(qr_detector ed_perception)
164+
target_link_libraries(qr_detector /usr/lib/libzbar.so)
165+
166+
#rosbuild_add_library(model_fitter
167+
# perception/model_fitter.cpp
168+
# perception/model_fitter.h
169+
#)
170+
#target_link_libraries(model_fitter ed)
171+
172+
# ------------------------------------------------------------------------------------------------
173+
# SERVER
174+
# ------------------------------------------------------------------------------------------------
175+
176+
# Create executable
177+
add_executable(ed_server
178+
src/ed.cpp
179+
src/server.cpp
180+
src/plugin_container.cpp
181+
)
182+
target_link_libraries(ed_server ed_core ed_perception ed_association ed_segmentation ed_io ed_kinect ed_gui ed_visualization map_publisher)
183+
add_dependencies(ed_server ${PROJECT_NAME}_gencpp)
184+
185+
# ------------------------------------------------------------------------------------------------
186+
# PLUGINS
187+
# ------------------------------------------------------------------------------------------------
188+
189+
add_library(map_publisher
190+
src/plugins/map_publisher.cpp
191+
)
192+
target_link_libraries(map_publisher ed_core)
193+
194+
# ------------------------------------------------------------------------------------------------
195+
# TOOLS
196+
# ------------------------------------------------------------------------------------------------
197+
198+
add_executable(view-measurement tools/view_measurement.cpp)
199+
target_link_libraries(view-measurement ed_core ed_io)
200+
add_dependencies(view-measurement ${PROJECT_NAME}_gencpp)
201+
202+
add_executable(test-perception tools/test_perception.cpp)
203+
target_link_libraries(test-perception ed_core ed_perception ed_io)
204+
add_dependencies(test-perception ${PROJECT_NAME}_gencpp)
205+
206+
add_executable(create-rgbd-measurement tools/create_rgbd_measurement.cpp)
207+
target_link_libraries(create-rgbd-measurement ed_core ed_io)
208+
add_dependencies(create-rgbd-measurement ${PROJECT_NAME}_gencpp)
209+
210+
# ------------------------------------------------------------------------------------------------
211+
# TESTS
212+
# ------------------------------------------------------------------------------------------------
213+
214+
add_executable(test_mask test/test_mask.cpp)
215+
target_link_libraries(test_mask ed_core)
216+
add_dependencies(test_mask ${PROJECT_NAME}_gencpp)
217+
218+
add_executable(test_sampling test/test_sampling.cpp)
219+
target_link_libraries(test_sampling ed_core ed_visualization)
220+
add_dependencies(test_sampling ${PROJECT_NAME}_gencpp)
221+
222+
add_executable(test_human_classifier test/test_human_classifier.cpp)
223+
target_link_libraries(test_human_classifier human_contour_matcher)
224+
add_dependencies(test_human_classifier ${PROJECT_NAME}_gencpp)
225+
226+
add_executable(test_label_gui_server test/test_label_gui_server.cpp)
227+
target_link_libraries(test_label_gui_server ed_core ed_gui)
228+
add_dependencies(test_label_gui_server ${PROJECT_NAME}_gencpp)
229+
230+
add_executable(test_service_speed test/test_service_speed.cpp)
231+
target_link_libraries(test_service_speed ed_core)
232+
add_dependencies(test_service_speed ${PROJECT_NAME}_gencpp)
233+
234+
add_executable(show_gui test/show_gui.cpp)
235+
target_link_libraries(show_gui ed_core)
236+
add_dependencies(show_gui ${PROJECT_NAME}_gencpp)
237+

bugs.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- indent error in config gives yaml error
2+
- 3 to real is parsed as 0.03

config/config.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
sensors:
2+
- name: top_kinect
3+
type: kinect
4+
source: /amigo/top_kinect/rgbd
5+
frame_id: /amigo/top_kinect/openni_rgb_optical_frame
6+
association_modules:
7+
- type: PointNormal
8+
parameters:
9+
association_correspondence_distance: 0.1
10+
position_weight: 1.0
11+
curvature_weight: 2.0
12+
visualize: 1
13+
- type: PolygonHeight
14+
parameters:
15+
cell_size: 0.03
16+
max_range: 3.0
17+
tolerance: 0.05
18+
min_cluster_size: 20
19+
visualize: 1
20+
segmentation_modules:
21+
- type: EuclideanClustering
22+
parameters:
23+
tolerance: 0.05
24+
min_cluster_size: 20
25+
visualize: 1
26+
27+
visualize: 1
28+
29+
perception:
30+
fit_shapes: 1
31+
modules:
32+
# - lib: libsize_matcher.so
33+
# - lib: libodu_finder.so
34+
- lib: libhuman_contour_matcher.so
35+
36+
gui:
37+
enabled: 1
38+
srv_get_measurements: /ed/gui/get_measurements
39+
srv_set_label: /ed/gui/set_label
40+
srv_raise_event: /ed/gui/raise_event
41+
srv_get_command: /ed/gui/get_gui_command
42+
map_image_topic: /ed/gui/map_image
43+
map_image_width: 500
44+
map_image_height: 500
45+
world_width: 11.0
46+
world_height: 11.0
47+
cam_x: 4.5
48+
cam_y: 4.4
49+
cam_z: 10.0
50+
51+
map_publisher:
52+
frequency: 10
53+
size_x: 20.0
54+
size_y: 20.8
55+
resolution: 0.05
56+
origin_x: -6.5
57+
origin_y: -6.5
58+
topic: /ed_map
59+
frame_id: /map
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#ifndef point_normal_alm_h_
2+
#define point_normal_alm_h_
3+
4+
#include "ed/association_localization_modules/rgbd_al_module.h"
5+
6+
#include <ros/publisher.h>
7+
#include <pcl/point_representation.h>
8+
#include <pcl/kdtree/kdtree_flann.h>
9+
10+
namespace ed
11+
{
12+
13+
// Define a new point representation for the association
14+
class AssociationPR : public pcl::PointRepresentation <pcl::PointNormal>
15+
{
16+
using pcl::PointRepresentation<pcl::PointNormal>::nr_dimensions_;
17+
18+
public:
19+
AssociationPR ()
20+
{
21+
// Define the number of dimensions
22+
nr_dimensions_ = 4;
23+
}
24+
25+
// Override the copyToFloatArray method to define our feature vector
26+
virtual void copyToFloatArray (const pcl::PointNormal &p, float * out) const
27+
{
28+
// < x, y, z, curvature >
29+
out[0] = p.x;
30+
out[1] = p.y;
31+
out[2] = p.z;
32+
out[3] = p.curvature;
33+
}
34+
};
35+
36+
class PointNormalALM : public RGBDALModule
37+
{
38+
39+
public:
40+
41+
PointNormalALM();
42+
43+
void process(const RGBDData& rgbd_data,
44+
PointCloudMaskPtr& not_associated_mask,
45+
std::map<UUID, EntityConstPtr>& entities);
46+
47+
void configure(tue::Configuration config);
48+
49+
protected:
50+
51+
pcl::KdTreeFLANN<pcl::PointNormal>::Ptr tree_;
52+
AssociationPR point_representation_;
53+
float position_weight_; // tunable param
54+
float curvature_weight_; // tunable param
55+
float association_correspondence_distance_; // tunable param
56+
57+
};
58+
59+
}
60+
61+
#endif
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#ifndef polygon_height_alm_h_
2+
#define polygon_height_alm_h_
3+
4+
#include "ed/association_localization_modules/rgbd_al_module.h"
5+
6+
#include <ros/publisher.h>
7+
8+
namespace ed
9+
{
10+
11+
class PolygonHeightALM : public RGBDALModule
12+
{
13+
14+
public:
15+
16+
PolygonHeightALM();
17+
18+
void process(const RGBDData& rgbd_data,
19+
PointCloudMaskPtr& not_associated_mask,
20+
std::map<UUID, EntityConstPtr>& entities);
21+
22+
void configure(tue::Configuration config);
23+
24+
protected:
25+
26+
/// Tunable params
27+
double cell_size_;
28+
double max_range_;
29+
double tolerance_;
30+
int min_cluster_size_;
31+
32+
};
33+
34+
}
35+
36+
#endif

0 commit comments

Comments
 (0)