Skip to content

Commit 50a9a9a

Browse files
committed
Object detection service workinggs!
1 parent c1131b0 commit 50a9a9a

15 files changed

+17611
-221
lines changed

object_detection/CMakeLists.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ include_directories(${OpenCV_INCLUDE_DIRS})
6565
# )
6666

6767
## Generate services in the 'srv' folder
68-
# add_service_files(
69-
# FILES
70-
# Service1.srv
71-
# Service2.srv
72-
# )
68+
add_service_files(
69+
FILES
70+
ObjectDetection.srv
71+
)
7372

7473
## Generate actions in the 'action' folder
7574
# add_action_files(
@@ -145,8 +144,7 @@ include
145144
## Declare a C++ executable
146145
## With catkin_make all packages are built within a single CMake context
147146
## The recommended prefix ensures that target names across packages don't collide
148-
add_executable(ground_plane_segmentation src/ground_plane_segmentation.cpp)
149-
add_executable(iterative_closest_point src/iterative_closest_point.cpp)
147+
add_executable(object_pose_detection src/object_pose_detection.cpp)
150148

151149
## Rename C++ executable without prefix
152150
## The above recommended prefix causes long target names, the following renames the
@@ -159,5 +157,4 @@ add_executable(iterative_closest_point src/iterative_closest_point.cpp)
159157
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
160158

161159
## Specify libraries to link a library or executable target against
162-
target_link_libraries(ground_plane_segmentation ${catkin_LIBRARIES})
163-
target_link_libraries(iterative_closest_point ${catkin_LIBRARIES})
160+
target_link_libraries(object_pose_detection ${catkin_LIBRARIES})

object_detection/launch/ground_plane_segmentation.launch

Lines changed: 0 additions & 26 deletions
This file was deleted.

object_detection/launch/object_detection.launch

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,36 @@
22
<launch>
33

44
<!-- Play rosbag file -->
5-
<include file="$(find object_detection)/launch/play_rosbag.launch">
5+
<!-- <include file="$(find object_detection)/launch/play_rosbag.launch">
66
<arg name="filename" value="all-01.bag" />
7-
</include>
7+
</include> -->
88

99
<!-- Launch the depth camera -->
1010
<!-- <include file="$(find realsense2_camera)/launch/rs_camera.launch">
1111
<arg name="enable_pointcloud" value="true"/>
1212
</include> -->
1313

14-
<!-- Launch Bounding Box Filter -->
15-
<!-- <include file="$(find object_detection)/launch/bbox_filter.launch"/> -->
16-
17-
<!-- Launch surface normal estimation -->
18-
<!-- <include file="$(find object_detection)/launch/surface_normal_estimation.launch"/> -->
19-
20-
<!-- Launch ground plane segmentation -->
21-
<include file="$(find object_detection)/launch/ground_plane_segmentation.launch"/>
14+
<!-- Launch object pose detection -->
15+
<node
16+
pkg="object_detection"
17+
type="object_pose_detection"
18+
name="object_pose_detection"
19+
output="screen">
2220

23-
<!-- Launch ICP -->
24-
<!-- <include file="$(find object_detection)/launch/iterative_closest_point.launch"/> -->
21+
<!-- Set topics and params -->
22+
<rosparam>
23+
<!-- invert (default: true): True > Box; False > Ground Plane -->
24+
invert: true
25+
<!-- voxel_size (default: 0.01): Lower the value, denser the point cloud, more CPU -->
26+
voxel_size: 0.001
27+
<!-- distance_threshold (default: 0.01): Lower the value, more of box + table noise -->
28+
distance_threshold: 0.01
29+
<!-- Topics -->
30+
input: "/camera/depth/color/points"
31+
output: "/object_pose_detection/points"
32+
icp_fitness_score: 0.0004
33+
</rosparam>
34+
</node>
2535

2636
<!-- Display the 3D bounding box -->
2737
<!-- <node
@@ -40,11 +50,11 @@
4050
</node> -->
4151

4252
<!-- Run RVIZ -->
43-
<node
53+
<!-- <node
4454
type="rviz"
4555
name="rviz"
4656
pkg="rviz"
4757
args="-d $(find object_detection)/perception.rviz">
48-
</node>
58+
</node> -->
4959

5060
</launch>

object_detection/perception.rviz

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Panels:
33
Help Height: 75
44
Name: Displays
55
Property Tree Widget:
6-
Expanded: ~
6+
Expanded:
7+
- /Axes1
78
Splitter Ratio: 0.5
89
Tree Height: 371
910
- Class: rviz/Selection
@@ -24,7 +25,7 @@ Panels:
2425
Experimental: false
2526
Name: Time
2627
SyncMode: 0
27-
SyncSource: Raw Input PCL
28+
SyncSource: Ground Truth
2829
Visualization Manager:
2930
Class: ""
3031
Displays:
@@ -51,7 +52,7 @@ Visualization Manager:
5152
Length: 0.5
5253
Name: Axes
5354
Radius: 0.00999999978
54-
Reference Frame: <Fixed Frame>
55+
Reference Frame: camera_depth_optical_frame
5556
Value: true
5657
- Class: rviz/Image
5758
Enabled: true
@@ -77,7 +78,7 @@ Visualization Manager:
7778
Color: 255; 0; 0
7879
Color Transformer: FlatColor
7980
Decay Time: 0
80-
Enabled: false
81+
Enabled: true
8182
Invert Rainbow: false
8283
Max Color: 255; 255; 255
8384
Max Intensity: 4096
@@ -94,7 +95,7 @@ Visualization Manager:
9495
Unreliable: false
9596
Use Fixed Frame: true
9697
Use rainbow: true
97-
Value: false
98+
Value: true
9899
- Alpha: 1
99100
Autocompute Intensity Bounds: true
100101
Autocompute Value Bounds:
@@ -107,7 +108,7 @@ Visualization Manager:
107108
Color: 0; 255; 0
108109
Color Transformer: FlatColor
109110
Decay Time: 0
110-
Enabled: false
111+
Enabled: true
111112
Invert Rainbow: false
112113
Max Color: 255; 255; 255
113114
Max Intensity: 4096
@@ -120,11 +121,11 @@ Visualization Manager:
120121
Size (Pixels): 3
121122
Size (m): 0.00999999978
122123
Style: Points
123-
Topic: /icp/aligned_points
124+
Topic: /icp/registered_pcl
124125
Unreliable: false
125126
Use Fixed Frame: true
126127
Use rainbow: true
127-
Value: false
128+
Value: true
128129
- Alpha: 1
129130
Autocompute Intensity Bounds: true
130131
Autocompute Value Bounds:
@@ -137,7 +138,7 @@ Visualization Manager:
137138
Color: 0; 255; 0
138139
Color Transformer: FlatColor
139140
Decay Time: 0
140-
Enabled: true
141+
Enabled: false
141142
Invert Rainbow: false
142143
Max Color: 255; 255; 255
143144
Max Intensity: 4096
@@ -154,7 +155,7 @@ Visualization Manager:
154155
Unreliable: false
155156
Use Fixed Frame: true
156157
Use rainbow: true
157-
Value: true
158+
Value: false
158159
- Alpha: 1
159160
Autocompute Intensity Bounds: true
160161
Autocompute Value Bounds:
@@ -240,25 +241,25 @@ Visualization Manager:
240241
Views:
241242
Current:
242243
Class: rviz/Orbit
243-
Distance: 0.469594628
244+
Distance: 1.57199478
244245
Enable Stereo Rendering:
245246
Stereo Eye Separation: 0.0599999987
246247
Stereo Focal Distance: 1
247248
Swap Stereo Eyes: false
248249
Value: false
249250
Focal Point:
250-
X: 0.33194834
251-
Y: 0.230934247
252-
Z: -0.0767720714
251+
X: 0.380761057
252+
Y: 0.105236754
253+
Z: 0.0502308793
253254
Focal Shape Fixed Size: true
254255
Focal Shape Size: 0.0500000007
255256
Invert Z Axis: false
256257
Name: Current View
257258
Near Clip Distance: 0.00999999978
258-
Pitch: 0.320203245
259+
Pitch: 0.725203395
259260
Target Frame: <Fixed Frame>
260261
Value: Orbit (rviz)
261-
Yaw: 2.77925992
262+
Yaw: 2.5242579
262263
Saved: ~
263264
Window Geometry:
264265
3D Bounding Box Image:

0 commit comments

Comments
 (0)