|
| 1 | +<?xml version="1.0"?> |
| 2 | +<launch> |
| 3 | + <arg name="bag_prefix" default="/mnt/log/d435"/> |
| 4 | + <arg name="depth_width" default="640"/> |
| 5 | + <arg name="depth_height" default="360"/> |
| 6 | + <arg name="frame_rate" default="30"/> |
| 7 | + |
| 8 | + <!-- use small size image to accumulate in CPU --> |
| 9 | + <arg name="output_width" default="160"/> |
| 10 | + <arg name="output_height" default="90"/> |
| 11 | + |
| 12 | + <!-- valid depth range of D435 --> |
| 13 | + <arg name="depth_min" default="0.105"/> |
| 14 | + <arg name="depth_max" default="10"/> |
| 15 | + |
| 16 | + <!-- color extraction parameter --> |
| 17 | + <arg name="threshold_l" default="50"/> |
| 18 | + <arg name="svm_coef_a" default="0.181817179054"/> |
| 19 | + <arg name="svm_coef_b" default="-0.0205828687538"/> |
| 20 | + <arg name="svm_intercept" default="-27.8266303282"/> |
| 21 | + |
| 22 | + <!-- object position extraction parameter --> |
| 23 | + <arg name="target_pixel_count_threshold" default="50"/> <!-- specify accumulated count in input resolution --> |
| 24 | + <arg name="target_pixel_count_max" default="500"/> <!-- restrict the point for DBSCAN to finish the process in a reasonable time --> |
| 25 | + <arg name="dbscan_epsilon" default="0.5"/> |
| 26 | + <arg name="dbscan_min_points" default="5"/> |
| 27 | + <arg name="sigma_coefficient" default="1.0"/> |
| 28 | + <arg name="object_size_min_x" default="0.1"/> |
| 29 | + <arg name="object_size_max_x" default="0.5"/> |
| 30 | + <arg name="object_size_min_y" default="0.1"/> |
| 31 | + <arg name="object_size_max_y" default="0.5"/> |
| 32 | + <arg name="object_candidate_lifetime" default="0.5"/> |
| 33 | + <arg name="object_separation_distance" default="2.0"/> |
| 34 | + |
| 35 | + <arg name="d435" default="false"/> |
| 36 | + <arg name="viewer" default="false"/> |
| 37 | + <arg name="record" default="false"/> |
| 38 | + |
| 39 | + <group ns="d435" if="$(arg d435)"> |
| 40 | + <node pkg="nodelet" type="nodelet" name="realsense2_camera_manager" args="manager" output="screen"/> |
| 41 | + <node pkg="nodelet" type="nodelet" name="realsense2_camera" args="load realsense2_camera/RealSenseNodeFactory realsense2_camera_manager"> |
| 42 | + <param name="enable_pointcloud" type="bool" value="false"/> |
| 43 | + <param name="enable_sync" type="bool" value="false"/> |
| 44 | + <param name="align_depth" type="bool" value="false"/> |
| 45 | + <param name="enable_fisheye" type="bool" value="false"/> |
| 46 | + <param name="enable_imu" type="bool" value="false"/> |
| 47 | + |
| 48 | + <param name="enable_depth" type="bool" value="true"/> |
| 49 | + <param name="enable_infra1" type="bool" value="false"/> |
| 50 | + <param name="enable_infra2" type="bool" value="false"/> |
| 51 | + <param name="enable_color" type="bool" value="true"/> |
| 52 | + |
| 53 | + <param name="depth_width" type="int" value="$(arg depth_width)"/> |
| 54 | + <param name="depth_height" type="int" value="$(arg depth_height)"/> |
| 55 | + <param name="depth_fps" type="int" value="$(arg frame_rate)"/> |
| 56 | + <param name="color_width" type="int" value="$(arg depth_width)"/> |
| 57 | + <param name="color_height" type="int" value="$(arg depth_height)"/> |
| 58 | + <param name="color_fps" type="int" value="$(arg frame_rate)"/> |
| 59 | + <param name="base_frame_id" type="str" value="d435_link"/> |
| 60 | + <param name="depth_frame_id" type="str" value="d435_depth_link"/> |
| 61 | + <param name="depth_optical_frame_id" type="str" value="d435_depth_optical"/> |
| 62 | + </node> |
| 63 | + </group> |
| 64 | + |
| 65 | + <node pkg="opengl_ros" type="object_position_extractor" |
| 66 | + name="object_position_extractor" output="screen"> |
| 67 | + <param name="color_frame_id" value="d435_color_optical"/> |
| 68 | + <param name="depth_frame_id" value="d435_depth_optical"/> |
| 69 | + <param name="fixed_frame_id" value="map"/> |
| 70 | + <param name="tf_wait_duration" value="0.1"/> |
| 71 | + |
| 72 | + <param name="color_width" value="$(arg depth_width)"/> |
| 73 | + <param name="color_height" value="$(arg depth_height)"/> |
| 74 | + <param name="depth_width" value="$(arg depth_width)"/> |
| 75 | + <param name="depth_height" value="$(arg depth_height)"/> |
| 76 | + <param name="output_width" value="$(arg output_width)"/> |
| 77 | + <param name="output_height" value="$(arg output_height)"/> |
| 78 | + |
| 79 | + <param name="min_depth" value="$(arg depth_min)"/> |
| 80 | + <param name="max_depth" value="$(arg depth_max)"/> |
| 81 | + |
| 82 | + <param name="threshold_l" value="$(arg threshold_l)"/> |
| 83 | + <param name="svm_coef_a" value="$(arg svm_coef_a)"/> |
| 84 | + <param name="svm_coef_b" value="$(arg svm_coef_b)"/> |
| 85 | + <param name="svm_intercept" value="$(arg svm_intercept)"/> |
| 86 | + |
| 87 | + <param name="object_separation_distance" value="$(arg object_separation_distance)"/> |
| 88 | + <param name="target_pixel_count_threshold" value="$(arg target_pixel_count_threshold)"/> |
| 89 | + <param name="target_pixel_count_max" value="$(arg target_pixel_count_max)"/> |
| 90 | + <param name="sigma_coefficient" value="$(arg sigma_coefficient)"/> |
| 91 | + <param name="object_size_min_x" value="$(arg object_size_min_x)"/> |
| 92 | + <param name="object_size_max_x" value="$(arg object_size_max_x)"/> |
| 93 | + <param name="object_size_min_y" value="$(arg object_size_min_y)"/> |
| 94 | + <param name="object_size_max_y" value="$(arg object_size_max_y)"/> |
| 95 | + <param name="object_candidate_lifetime" value="$(arg object_candidate_lifetime)"/> |
| 96 | + <param name="dbscan_epsilon" value="$(arg dbscan_epsilon)"/> |
| 97 | + <param name="dbscan_min_points" value="$(arg dbscan_min_points)"/> |
| 98 | + |
| 99 | + <param name="vertex_shader" value="$(find opengl_ros_lib)/shader/vs_object_position_extraction.glsl"/> |
| 100 | + <param name="fragment_shader" value="$(find opengl_ros_lib)/shader/fs_object_position_extraction.glsl"/> |
| 101 | + |
| 102 | + <remap from="color_in" to="/d435/color/image_raw"/> |
| 103 | + <remap from="depth_in" to="/d435/depth/image_rect_raw"/> |
| 104 | + <remap from="image_out" to="/object_extraction"/> |
| 105 | + <remap from="~objects" to="/objects"/> |
| 106 | + </node> |
| 107 | + |
| 108 | + <group ns="viewer" if="$(arg viewer)"> |
| 109 | + <node pkg="image_view" type="image_view" name="viewer_depth"> |
| 110 | + <remap from="image" to="/d435/depth/image_rect_raw"/> |
| 111 | + </node> |
| 112 | + |
| 113 | + <node pkg="image_view" type="image_view" name="viewer_color"> |
| 114 | + <remap from="image" to="/d435/color/image_raw"/> |
| 115 | + </node> |
| 116 | + |
| 117 | + <node pkg="image_view" type="image_view" name="viewer_out"> |
| 118 | + <remap from="image" to="/object_extraction"/> |
| 119 | + </node> |
| 120 | + </group> |
| 121 | + |
| 122 | + <node pkg="rosbag" type="record" name="logger" if="$(arg record)" |
| 123 | + args="-o $(arg bag_prefix) |
| 124 | + --lz4 |
| 125 | + -a |
| 126 | + -x /(d435|object_extraction|viewer_depth|viewer_color|viewer_out)/(.*) |
| 127 | + /d435/color/camera_info |
| 128 | + /d435/color/image_raw |
| 129 | + /d435/depth/camera_info |
| 130 | + /d435/depth/image_rect_raw |
| 131 | + /d435/extrinsics/depth_to_color |
| 132 | + /object_extraction |
| 133 | + "/> |
| 134 | +</launch> |
0 commit comments