Skip to content

Commit 4f76aaa

Browse files
fix (maybe) depth encoding again
1 parent a51c544 commit 4f76aaa

File tree

5 files changed

+37
-24
lines changed

5 files changed

+37
-24
lines changed

config/eod_example.rviz

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Panels:
2121
Name: Views
2222
Splitter Ratio: 0.5
2323
- Class: rviz/Time
24-
Experimental: false
2524
Name: Time
2625
SyncMode: 0
2726
SyncSource: Detected Image
@@ -55,6 +54,10 @@ Visualization Manager:
5554
Frame Timeout: 15
5655
Frames:
5756
All Enabled: true
57+
CnnPerson_0:
58+
Value: true
59+
dai_rgb_camera_optical_frame:
60+
Value: true
5861
oak-d-base-frame:
5962
Value: true
6063
oak-d_frame:
@@ -82,6 +85,9 @@ Visualization Manager:
8285
Show Axes: true
8386
Show Names: true
8487
Tree:
88+
dai_rgb_camera_optical_frame:
89+
CnnPerson_0:
90+
{}
8591
oak-d-base-frame:
8692
oak-d_frame:
8793
oak_imu_frame:
@@ -132,7 +138,9 @@ Visualization Manager:
132138
Marker Topic: /extended_object_detection/simple_objects_markers
133139
Name: SimpleObjects
134140
Namespaces:
135-
{}
141+
CnnPerson_arrow: true
142+
CnnPerson_frame: true
143+
CnnPerson_text: true
136144
Queue Size: 100
137145
Value: true
138146
- Class: rviz/MarkerArray
@@ -145,7 +153,7 @@ Visualization Manager:
145153
Value: true
146154
- Class: rviz/Image
147155
Enabled: true
148-
Image Topic: /extended_object_detection/detected_image
156+
Image Topic: /extended_object_detection/detected_image_0
149157
Max Value: 1
150158
Median window: 5
151159
Min Value: 0
@@ -157,7 +165,7 @@ Visualization Manager:
157165
Value: true
158166
- Class: rviz/Image
159167
Enabled: true
160-
Image Topic: /oak/stereo/depth
168+
Image Topic: /rgb_stereo_publisher/stereo/depth
161169
Max Value: 1
162170
Median window: 5
163171
Min Value: 0
@@ -199,7 +207,7 @@ Visualization Manager:
199207
Global Options:
200208
Background Color: 48; 48; 48
201209
Default Light: true
202-
Fixed Frame: oak-d-base-frame
210+
Fixed Frame: dai_rgb_camera_optical_frame
203211
Frame Rate: 30
204212
Name: root
205213
Tools:
@@ -223,25 +231,25 @@ Visualization Manager:
223231
Views:
224232
Current:
225233
Class: rviz/Orbit
226-
Distance: 5.629319667816162
234+
Distance: 34.50994873046875
227235
Enable Stereo Rendering:
228236
Stereo Eye Separation: 0.05999999865889549
229237
Stereo Focal Distance: 1
230238
Swap Stereo Eyes: false
231239
Value: false
232240
Field of View: 0.7853981852531433
233241
Focal Point:
234-
X: 1.152783751487732
235-
Y: -0.16227556765079498
236-
Z: -0.4943612217903137
242+
X: 4.361662864685059
243+
Y: 0.03402687981724739
244+
Z: 7.5114288330078125
237245
Focal Shape Fixed Size: true
238246
Focal Shape Size: 0.05000000074505806
239247
Invert Z Axis: false
240248
Name: Current View
241249
Near Clip Distance: 0.009999999776482582
242-
Pitch: 0.7097955346107483
250+
Pitch: 0.19979584217071533
243251
Target Frame: <Fixed Frame>
244-
Yaw: 2.1604249477386475
252+
Yaw: 2.160426139831543
245253
Saved: ~
246254
Window Geometry:
247255
DepthImage:
@@ -253,7 +261,7 @@ Window Geometry:
253261
Height: 1015
254262
Hide Left Dock: false
255263
Hide Right Dock: false
256-
QMainWindow State: 000000ff00000000fd00000004000000000000016a00000341fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000007901000003fb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c00610079007301000000420000020d000000fd01000003fb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb00000014004400650070007400680049006d0061006700650100000250000001330000002201000003000000010000031100000341fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fc0000004200000341000000ef0100001bfa000000000100000002fb0000001c0044006500740065006300740065006400200049006d0061006700650100000000ffffffff000000a201000003fb0000000a005600690065007700730100000670000001100000011001000003fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000780000001e8fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000004efc0100000002fb0000000800540069006d0065010000000000000780000002ad01000003fb0000000800540069006d00650100000000000004500000000000000000000003030000034100000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
264+
QMainWindow State: 000000ff00000000fd00000004000000000000016a00000341fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000007901000003fb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c00610079007301000000420000020d000000fd01000003fb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb00000014004400650070007400680049006d0061006700650100000250000001330000002201000003000000010000031100000341fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fc0000004200000341000000ef0100001bfa000000000100000002fb0000001c0044006500740065006300740065006400200049006d0061006700650100000000ffffffff000000a201000003fb0000000a005600690065007700730100000670000001100000011001000003fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000780000001e8fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000004efc0100000002fb0000000800540069006d00650100000000000007800000037a01000003fb0000000800540069006d00650100000000000004500000000000000000000003030000034100000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
257265
Selection:
258266
collapsed: false
259267
Time:

config/object_base_example/ObjectBaseExample.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

8585
<Attribute Name="DepthKinect" Type="Depth" depthScale="0.001"/>
8686

87-
<Attribute Name="DepthCenter" Type="Depth" depthScale="0.001" mode="2"/>
87+
<Attribute Name="DepthCenter" Type="Depth" depthScale="0.001" mode="0"/>
8888

8989
<Attribute Name="DlibFace" Type="FaceDlib" Probability="0.4" base_file_path="face_recognition/base_faces.db" base_dir_path="face_recognition/base_faces/" sp_path="face_recognition/shape_predictor_5_face_landmarks.dat" net_path="face_recognition/dlib_face_recognition_resnet_model_v1.dat"/>
9090

launch/extended_object_detection_oakd_example.launch

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,34 @@
66
77
</include>-->
88

9-
<include file="$(find ritrover-oakd)/launch/rgb_stereo_publisher.launch">
10-
<arg name="point_cloud_mono" value="true"/>
11-
<arg name="urdf" value="true"/>
9+
<include file="$(find depthai_examples)/launch/rgb_stereo_node.launch">
10+
<!--<arg name="point_cloud_mono" value="true"/>
11+
<arg name="urdf" value="true"/>-->
1212
</include>
1313

1414
<node name="extended_object_detection" pkg="extended_object_detection" type="extended_object_detection_node" output="screen" >
1515

1616
<param name="object_base" value="$(arg objectBasePath)"/>
1717

18-
<param name="subscribe_depth" value="true"/>
1918
<param name="rate_limit_sec" value="0.1"/>
2019
<param name="allowed_lag_sec" value="1"/>
2120
<param name="publish_image_output" value="true"/>
2221
<param name="publish_markers" value="true"/>
2322
<param name="broadcast_tf" value="true"/>
2423

2524

26-
<remap from="camera/image_raw" to="/oak/rgb/image"/>
25+
<!--<remap from="camera/image_raw" to="/oak/rgb/image"/>
2726
<remap from="camera/info" to="/oak/rgb/camera_info"/>
2827
<remap from="depth/image_raw" to="/oak/stereo/depth"/>
29-
<remap from="depth/info" to="/oak/stereo/camera_info"/>
28+
<remap from="depth/info" to="/oak/stereo/camera_info"/>-->
3029

31-
<rosparam param="selected_on_start_simple_objects">[-1]</rosparam>
32-
<rosparam param="selected_on_start_complex_objects">[10]</rosparam>
30+
<rosparam param="rgb_image_topics">[/rgb_stereo_publisher/color/image]</rosparam>
31+
<rosparam param="rgb_info_topics">[/rgb_stereo_publisher/color/camera_info]</rosparam>
32+
<rosparam param="depth_image_topics">[/rgb_stereo_publisher/stereo/depth]</rosparam>
33+
<rosparam param="depth_info_topics">[/rgb_stereo_publisher/stereo/camera_info]</rosparam>
34+
35+
<rosparam param="selected_on_start_simple_objects">[67]</rosparam>
36+
<rosparam param="selected_on_start_complex_objects">[-1]</rosparam>
3337

3438
</node>
3539

src/extended_object_detection_node/eod_node.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,9 @@ void EOD_ROS::rgbd_info_cb(const sensor_msgs::ImageConstPtr& rgb_image, const se
269269
cv::Mat depth;
270270
if (depth_image->encoding == sensor_msgs::image_encodings::TYPE_16UC1){
271271
depth = cv_bridge::toCvCopy(depth_image, sensor_msgs::image_encodings::TYPE_16UC1)->image;
272-
depth.convertTo(depth, CV_32F);
273-
depth *= 0.001f;
272+
//depth.convertTo(depth, CV_32F);
273+
depth.convertTo(depth, CV_16UC1);
274+
//depth *= 0.001f;
274275
}
275276
else if(depth_image->encoding == sensor_msgs::image_encodings::TYPE_32FC1){
276277
depth = cv_bridge::toCvCopy(depth_image, sensor_msgs::image_encodings::TYPE_32FC1)->image;

0 commit comments

Comments
 (0)