Skip to content

Commit 2e35bdd

Browse files
committed
Modeler integration (NO GUI)
* Implement Color filtering in CIELAB space, works good! * Add gicp optional alignment * Much better behaviour with clustering, however you might get deformations * Update BaseNode with more filters - Color Filtering - Outlier Removal Filtering * Integrate the invert color filter functionality * Add save pcd file as binary compressed after conversion to RGBA This avoids color corruption on saved file * Add cropbox reference frame parameter, NO GUI
1 parent 71a3646 commit 2e35bdd

File tree

20 files changed

+2726
-318
lines changed

20 files changed

+2726
-318
lines changed

CMakeLists.txt

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ project(pacman_vision)
4040
## This will build estimator and tracker modules
4141
set (PACV_BUILD_RECOGNITION 0 )
4242
## This will build vito listener module
43-
set (PACV_BUILD_LISTENER 1 )
43+
set (PACV_BUILD_LISTENER 0 )
4444
## This will build in hand modeler module
4545
set (PACV_BUILD_MODELER 0 )
4646
## This will build Kinect2 Processor
@@ -75,7 +75,7 @@ find_package(Boost REQUIRED
7575
find_package(HDF5 REQUIRED)
7676
#Find PCL
7777
find_package(PCL 1.7.2 COMPONENTS common filters io registration
78-
segmentation sample_consensus search REQUIRED)
78+
segmentation sample_consensus search octree REQUIRED)
7979
add_definitions(${PCL_DEFINITIONS})
8080
link_directories(${PCL_LIBRARY_DIRS})
8181
##Eigen
@@ -94,32 +94,6 @@ find_package(catkin REQUIRED COMPONENTS
9494
visualization_msgs
9595
cmake_modules
9696
)
97-
##Catkin specific configuration:
98-
## The catkin_package macro generates cmake config files for your package
99-
## Declare things to be passed to dependent projects
100-
## INCLUDE_DIRS: uncomment this if you package contains header files
101-
## LIBRARIES: libraries you create in this project that dependent projects also need
102-
## CATKIN_DEPENDS: catkin_packages dependent projects also need
103-
## DEPENDS: system dependencies of this project that dependent projects also need
104-
catkin_package(
105-
INCLUDE_DIRS
106-
include
107-
# ${EIGEN_INCLUDE_DIRS}
108-
${PCL_INCLUDE_DIRS}
109-
LIBRARIES
110-
pacv_libcommon
111-
CATKIN_DEPENDS
112-
geometry_msgs
113-
pcl_conversions
114-
roscpp
115-
roslib
116-
sensor_msgs
117-
tf
118-
pacman_vision_comm
119-
visualization_msgs
120-
message_runtime
121-
# DEPENDS ${EXT_DEPS}
122-
)
12397
#include a bunch of dirs to search path
12498
include_directories(include src/pacman_vision src/basic_node/gui)
12599
include_directories(${catkin_INCLUDE_DIRS})
@@ -195,6 +169,8 @@ ENDIF(PACV_BUILD_LISTENER)
195169

196170
IF(PACV_BUILD_MODELER)
197171
add_subdirectory(src/modeler)
172+
LIST(APPEND LIBRARIES
173+
${PACV_MODELER_LIB})
198174
ENDIF(PACV_BUILD_MODELER)
199175

200176
include_directories(${MORE_INCLUDE_DIRS})
@@ -208,6 +184,34 @@ configure_file("${PROJECT_SOURCE_DIR}/cmake/config_h.cmake.in"
208184
"${CATKIN_DEVEL_PREFIX}/include/pacv_config.h")
209185
include_directories(${CATKIN_DEVEL_PREFIX}/include)
210186

187+
################################################################################
188+
#### Export project and libraries through catkin ###############################
189+
################################################################################
190+
##Catkin specific configuration:
191+
## The catkin_package macro generates cmake config files for your package
192+
## Declare things to be passed to dependent projects
193+
## INCLUDE_DIRS: uncomment this if you package contains header files
194+
## LIBRARIES: libraries you create in this project that dependent projects also need
195+
## CATKIN_DEPENDS: catkin_packages dependent projects also need
196+
## DEPENDS: system dependencies of this project that dependent projects also need
197+
catkin_package(
198+
INCLUDE_DIRS
199+
include
200+
LIBRARIES
201+
${LIBRARIES}
202+
CATKIN_DEPENDS
203+
geometry_msgs
204+
pcl_conversions
205+
roscpp
206+
roslib
207+
sensor_msgs
208+
tf
209+
pacman_vision_comm
210+
visualization_msgs
211+
message_runtime
212+
DEPENDS
213+
${MORE_LIBRARIES}
214+
)
211215
################################################################################
212216
####################### Now Build the project ##################################
213217
################################################################################

config/default.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
cropping: true
2+
color_dist_thresh: 20.0
3+
color_filter: false
4+
invert_color_filter: false
25
downsampling: false
36
downsampling_leaf_size: 0.01
47
keep_organized: false
@@ -8,9 +11,13 @@ limit_ymax: 0.5
811
limit_ymin: -0.5
912
limit_zmax: 1.5
1013
limit_zmin: 0.3
14+
cropping_ref_frame: "/camera_rgb_optical_frame"
1115
publish_limits: true
1216
segmenting: false
1317
plane_tolerance: 0.005
18+
outliers_filter: false
19+
outliers_mean_k: 50
20+
outliers_std_mul: 2.0
1421
estimator: {
1522
spawn: false,
1623
cluster_tol: 0.05,
@@ -47,3 +54,9 @@ tracker: {
4754
publish_markers: true,
4855
broadcast_tf: true
4956
}
57+
in_hand_modeler: {
58+
spawn: false,
59+
model_ds_leaf: 0.003,
60+
normals_ang_thresh: 10.0,
61+
use_gicp: false
62+
}

config/delta.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
color_dist_thresh: 20.0
2+
color_filter: false
3+
cropping: true
4+
cropping_ref_frame: /qb_delta_base
5+
downsampling: false
6+
downsampling_leaf_size: 0.01
7+
estimator: {always_success: true, broadcast_tf: true, cluster_tol: 0.05, iterations: 5,
8+
neighbors: 20, object_calibration: false, publish_markers: true, rmse_thresh: 0.005,
9+
spawn: false}
10+
in_hand_modeler: {model_ds_leaf: 0.003, normals_ang_thresh: 10.0, spawn: false, use_gicp: false}
11+
invert_color_filter: false
12+
keep_organized: false
13+
limit_xmax: 0.27
14+
limit_xmin: -0.27
15+
limit_ymax: 0.35
16+
limit_ymin: -0.02
17+
limit_zmax: 0.762
18+
limit_zmin: 0.6
19+
listener: {geometry_scale: 1.1, listen_left_arm: false, listen_left_hand: false, listen_right_arm: false,
20+
listen_right_hand: false, publish_markers: true, remove_left_arm: false, remove_left_hand: false,
21+
remove_right_arm: false, remove_right_hand: false, spawn: false}
22+
outliers_filter: false
23+
outliers_mean_k: 50
24+
outliers_std_mul: 2.0
25+
plane_tolerance: 0.025
26+
publish_limits: true
27+
segmenting: false
28+
sensor: {broadcast_identity_tf: false, internal: false, name: kinect2_optical_frame,
29+
topic: /camera/depth_registered/points}
30+
tracker: {broadcast_tf: true, publish_bounding_box: true, publish_markers: true, spawn: false}

config/modeler.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
color_dist_thresh: 20.0
2+
color_filter: false
3+
cropping: true
4+
downsampling: true
5+
downsampling_leaf_size: 0.001
6+
estimator: {always_success: true, broadcast_tf: true, cluster_tol: 0.05, iterations: 5,
7+
neighbors: 20, object_calibration: false, publish_markers: true, rmse_thresh: 0.005,
8+
spawn: false}
9+
in_hand_modeler: {curvature_thresh: 0.005, model_ds_leaf: 0.001, normals_ang_thresh: 7.0,
10+
spawn: true, use_gicp: false}
11+
keep_organized: false
12+
limit_xmax: 0.25
13+
limit_xmin: -0.12
14+
limit_ymax: 0.3
15+
limit_ymin: -0.28
16+
limit_zmax: 0.95
17+
limit_zmin: 0.3
18+
listener: {geometry_scale: 1.1, listen_left_arm: false, listen_left_hand: false, listen_right_arm: false,
19+
listen_right_hand: false, publish_markers: true, remove_left_arm: false, remove_left_hand: false,
20+
remove_right_arm: false, remove_right_hand: false, spawn: false}
21+
outliers_filter: true
22+
outliers_mean_k: 50
23+
outliers_std_mul: 2.0
24+
plane_tolerance: 0.015
25+
publish_limits: true
26+
segmenting: true
27+
sensor: {broadcast_identity_tf: false, internal: false, name: kinect2_optical_frame,
28+
topic: /camera/depth_registered/points}
29+
tracker: {broadcast_tf: true, publish_bounding_box: true, publish_markers: true, spawn: false}

config/pacmanvision.rviz

Lines changed: 58 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ Panels:
66
Expanded:
77
- /Global Options1
88
- /Status1
9-
- /Processed Scene1
10-
- /Original Scene1
9+
- /Transformations1
1110
- /Transformations1/Frames1
12-
Splitter Ratio: 0.5
13-
Tree Height: 812
11+
Splitter Ratio: 0.403315
12+
Tree Height: 666
1413
- Class: rviz/Selection
1514
Name: Selection
1615
- Class: rviz/Tool Properties
@@ -58,44 +57,33 @@ Visualization Manager:
5857
Size (Pixels): 2
5958
Size (m): 0.003
6059
Style: Points
61-
Topic: /pacman_vision/scene_processed
60+
Topic: /pacman_vision/processed_scene
6261
Use Fixed Frame: true
6362
Use rainbow: true
6463
Value: true
65-
- Alpha: 0.3
66-
Autocompute Intensity Bounds: true
67-
Autocompute Value Bounds:
68-
Max Value: 10
69-
Min Value: -10
70-
Value: true
71-
Axis: Z
72-
Channel Name: intensity
73-
Class: rviz/PointCloud2
74-
Color: 255; 255; 255
75-
Color Transformer: RGB8
76-
Decay Time: 0.2
77-
Enabled: false
78-
Invert Rainbow: false
79-
Max Color: 255; 255; 255
80-
Max Intensity: 4096
81-
Min Color: 0; 0; 0
82-
Min Intensity: 0
83-
Name: Original Scene
84-
Position Transformer: XYZ
85-
Queue Size: 1
86-
Selectable: true
87-
Size (Pixels): 1
88-
Size (m): 0.01
89-
Style: Points
90-
Topic: /camera/depth_registered/points
91-
Use Fixed Frame: true
92-
Use rainbow: true
93-
Value: false
9464
- Class: rviz/TF
9565
Enabled: true
9666
Frame Timeout: 1
9767
Frames:
98-
All Enabled: true
68+
All Enabled: false
69+
Fruit_0:
70+
Value: true
71+
Fruit_1:
72+
Value: true
73+
Fruit_2:
74+
Value: true
75+
Fruit_3:
76+
Value: true
77+
Fruit_4:
78+
Value: true
79+
Fruit_5:
80+
Value: true
81+
Fruit_6:
82+
Value: true
83+
Fruit_7:
84+
Value: true
85+
Fruit_8:
86+
Value: true
9987
camera_depth_frame:
10088
Value: true
10189
camera_depth_optical_frame:
@@ -106,7 +94,9 @@ Visualization Manager:
10694
Value: true
10795
camera_rgb_optical_frame:
10896
Value: true
109-
Marker Scale: 0.5
97+
qb_delta_base:
98+
Value: true
99+
Marker Scale: 0.2
110100
Name: Transformations
111101
Show Arrows: false
112102
Show Axes: true
@@ -118,38 +108,27 @@ Visualization Manager:
118108
{}
119109
camera_rgb_frame:
120110
camera_rgb_optical_frame:
121-
{}
111+
qb_delta_base:
112+
Fruit_0:
113+
{}
114+
Fruit_1:
115+
{}
116+
Fruit_2:
117+
{}
118+
Fruit_3:
119+
{}
120+
Fruit_4:
121+
{}
122+
Fruit_5:
123+
{}
124+
Fruit_6:
125+
{}
126+
Fruit_7:
127+
{}
128+
Fruit_8:
129+
{}
122130
Update Interval: 0
123131
Value: true
124-
- Alpha: 0.7
125-
Autocompute Intensity Bounds: true
126-
Autocompute Value Bounds:
127-
Max Value: 10
128-
Min Value: -10
129-
Value: true
130-
Axis: Z
131-
Channel Name: intensity
132-
Class: rviz/PointCloud2
133-
Color: 0; 0; 255
134-
Color Transformer: RGB8
135-
Decay Time: 0
136-
Enabled: false
137-
Invert Rainbow: false
138-
Max Color: 255; 255; 255
139-
Max Intensity: 4096
140-
Min Color: 0; 0; 0
141-
Min Intensity: 0
142-
Name: Modeler Model
143-
Position Transformer: XYZ
144-
Queue Size: 10
145-
Selectable: true
146-
Size (Pixels): 3
147-
Size (m): 0.01
148-
Style: Points
149-
Topic: /pacman_vision/in_hand_modeler/in_hand_model
150-
Use Fixed Frame: true
151-
Use rainbow: true
152-
Value: false
153132
- Class: rviz/MarkerArray
154133
Enabled: true
155134
Marker Topic: /pacman_vision/markers
@@ -161,7 +140,7 @@ Visualization Manager:
161140
Enabled: true
162141
Global Options:
163142
Background Color: 48; 48; 48
164-
Fixed Frame: camera_rgb_optical_frame
143+
Fixed Frame: qb_delta_base
165144
Frame Rate: 100
166145
Name: root
167146
Tools:
@@ -182,30 +161,30 @@ Visualization Manager:
182161
Views:
183162
Current:
184163
Class: rviz/Orbit
185-
Distance: 1.24365
164+
Distance: 0.566729
186165
Enable Stereo Rendering:
187166
Stereo Eye Separation: 0.06
188167
Stereo Focal Distance: 1
189168
Swap Stereo Eyes: false
190169
Value: false
191170
Focal Point:
192-
X: 0.0448089
193-
Y: -0.01465
194-
Z: 0.0197674
171+
X: 0.0205334
172+
Y: 0.16461
173+
Z: 0.67885
195174
Name: Current View
196175
Near Clip Distance: 0.01
197-
Pitch: -0.979209
176+
Pitch: -1.5698
198177
Target Frame: <Fixed Frame>
199178
Value: Orbit (rviz)
200-
Yaw: 4.67646
179+
Yaw: 4.71592
201180
Saved: ~
202181
Window Geometry:
203182
Displays:
204-
collapsed: false
205-
Height: 1145
206-
Hide Left Dock: false
183+
collapsed: true
184+
Height: 1047
185+
Hide Left Dock: true
207186
Hide Right Dock: false
208-
QMainWindow State: 000000ff00000000fd000000040000000000000186000003c8fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006a00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000043000003c8000000ec00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000002acfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003f000002ac000000c200fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000078000000044fc0100000002fb0000000800540069006d00650100000000000007800000027100fffffffb0000000800540069006d00650100000000000004500000000000000000000005f4000003c800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
187+
QMainWindow State: 000000ff00000000fd00000004000000000000022100000333fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006900fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073000000004100000333000000e900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000002acfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003f000002ac000000bd00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000078000000044fc0100000002fb0000000800540069006d00650100000000000007800000025e00fffffffb0000000800540069006d00650100000000000004500000000000000000000007800000036a00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
209188
Selection:
210189
collapsed: false
211190
Time:
@@ -215,5 +194,5 @@ Window Geometry:
215194
Views:
216195
collapsed: false
217196
Width: 1920
218-
X: 0
219-
Y: 27
197+
X: 1920
198+
Y: 0

0 commit comments

Comments
 (0)