diff --git a/config/blue_lab.yaml b/config/blue_lab.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e5f517d1e2699569b59287704140b577705612d6 --- /dev/null +++ b/config/blue_lab.yaml @@ -0,0 +1,9 @@ +color_id: blue +H_center: 233 +H_window: 3 +S_center: 215 +S_window: 10 +V_center: 131 +V_window: 33 +max_area: 100000 +min_area: 10 diff --git a/config/blue.yaml b/config/blue_sim.yaml similarity index 89% rename from config/blue.yaml rename to config/blue_sim.yaml index aa0f35c372e31647a7c8fdcd47e79c1447561114..87d1cd2e432de7e35ce18a5bb7bfa4ba5edc9b3f 100644 --- a/config/blue.yaml +++ b/config/blue_sim.yaml @@ -6,4 +6,4 @@ S_window: 10 V_center: 102 V_window: 10 max_area: 100000 -min_area: 10 +min_area: 10 \ No newline at end of file diff --git a/config/green_lab.yaml b/config/green_lab.yaml new file mode 100644 index 0000000000000000000000000000000000000000..00d14fb0fc9e4290abf714f586ddc7747cbd3dc1 --- /dev/null +++ b/config/green_lab.yaml @@ -0,0 +1,9 @@ +color_id: green +H_center: 134 +H_window: 14 +S_center: 122 +S_window: 35 +V_center: 44 +V_window: 9 +max_area: 100000 +min_area: 10 diff --git a/config/green.yaml b/config/green_sim.yaml similarity index 67% rename from config/green.yaml rename to config/green_sim.yaml index 05eee865293e549854c14e1271e1fc9114937611..175431ebd9ecf46686e5dda87b381fee2118c7c5 100644 --- a/config/green.yaml +++ b/config/green_sim.yaml @@ -1,9 +1,9 @@ color_id: green H_center: 120 H_window: 10 -S_center: 255 +S_center: 250 S_window: 10 -V_center: 102 -V_window: 10 +V_center: 108 +V_window: 23 max_area: 100000 min_area: 10 diff --git a/config/red_lab.yaml b/config/red_lab.yaml new file mode 100644 index 0000000000000000000000000000000000000000..85f4dc94764ae2126199f996e13c2749dca08fc6 --- /dev/null +++ b/config/red_lab.yaml @@ -0,0 +1,9 @@ +color_id: red +H_center: 348 +H_window: 6 +S_center: 185 +S_window: 21 +V_center: 90 +V_window: 27 +max_area: 100000 +min_area: 10 diff --git a/config/red.yaml b/config/red_sim.yaml similarity index 78% rename from config/red.yaml rename to config/red_sim.yaml index 6f10fda2bd7b7c732a019f3e1c0ce8aae2523a5d..e91af09942a0327ce3ac113256f8089f49e63ae6 100644 --- a/config/red.yaml +++ b/config/red_sim.yaml @@ -1,9 +1,9 @@ color_id: red H_center: 0 H_window: 10 -S_center: 255 +S_center: 250 S_window: 10 V_center: 102 -V_window: 10 +V_window: 7 max_area: 100000 min_area: 10 diff --git a/config/default_params.yaml b/config/sample.yaml similarity index 87% rename from config/default_params.yaml rename to config/sample.yaml index 22d62737ec015e79ccf8dac66b55c50179b0ef42..4c57439599cb2934c01c928dd5f1a23e2774b4b4 100644 --- a/config/default_params.yaml +++ b/config/sample.yaml @@ -1,4 +1,4 @@ -color_id: none +color_id: color H_center: 180 H_window: 360 S_center: 128 diff --git a/config/yellow_lab.yaml b/config/yellow_lab.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3928b143072c9211bbe60758e495d1df2cdc54de --- /dev/null +++ b/config/yellow_lab.yaml @@ -0,0 +1,9 @@ +color_id: yellow +H_center: 48 +H_window: 6 +S_center: 228 +S_window: 20 +V_center: 132 +V_window: 21 +max_area: 100000 +min_area: 10 diff --git a/config/yellow.yaml b/config/yellow_sim.yaml similarity index 57% rename from config/yellow.yaml rename to config/yellow_sim.yaml index 9981fdd7b325cc364f80c50e3f713d93a23bc5a4..cbe58fc4a5920def85f324bcffb3c4cadc3eb667 100644 --- a/config/yellow.yaml +++ b/config/yellow_sim.yaml @@ -1,9 +1,9 @@ color_id: yellow H_center: 60 H_window: 10 -S_center: 255 -S_window: 10 -V_center: 102 -V_window: 10 +S_center: 251 +S_window: 8 +V_center: 101 +V_window: 7 max_area: 100000 min_area: 10 diff --git a/launch/blob_detector.launch b/launch/blob_detector.launch deleted file mode 100644 index 501979e99bb88e0940aecfe1f25882f66f385827..0000000000000000000000000000000000000000 --- a/launch/blob_detector.launch +++ /dev/null @@ -1,41 +0,0 @@ -<!-- --> -<launch> - - <arg name="config_yaml_file" default="$(find iri_blob_detector)/config/default_params.yaml"/> - - <group ns="usb_cam"> - <node pkg="libuvc_camera" type="camera_node" name="mycam"> - <!-- Parameters used to find the camera --> -<!-- <param name="vendor" value="0x046d"/> - <param name="product" value="0x0802"/> - <param name="serial" value="BEE76360"/>--> - <!-- If the above parameters aren't unique, choose the first match: --> - <param name="index" value="0"/> - - <!-- Image size and type --> - <param name="width" value="640"/> - <param name="height" value="480"/> - <!-- choose whichever uncompressed format the camera supports: --> - <param name="video_mode" value="uncompressed"/> <!-- or yuyv/nv12/mjpeg --> - <param name="frame_rate" value="15"/> - - <param name="timestamp_method" value="start"/> <!-- start of frame --> - <param name="camera_info_url" value="file:///tmp/cam.yaml"/> - <param name="auto_exposure" value="0"/> <!-- use aperture_priority auto exposure --> - <param name="auto_exposure_priority" value="0"/> - <param name="exposure_absolute" value="0.90"/> <!-- use aperture_priority auto exposure --> - </node> - </group> - - <node name="blob" - pkg="iri_blob_detector" - type="iri_blob_detector" - output="screen"> - <remap from="/blob/image_in/camera_info" - to="/usb_cam/camera_info"/> - <remap from="/blob/image_in/image_raw" - to="/usb_cam/image_raw"/> - <rosparam file="$(arg config_yaml_file)" command="load" /> - </node> - -</launch> diff --git a/launch/blob_detector_sim.launch b/launch/blob_detector_sim.launch deleted file mode 100644 index 9b307fd5c53628779dc278f54c9f9e10809b2eae..0000000000000000000000000000000000000000 --- a/launch/blob_detector_sim.launch +++ /dev/null @@ -1,17 +0,0 @@ -<!-- --> -<launch> - - <arg name="config_yaml_file" default="$(find iri_blob_detector)/config/default_params.yaml"/> - - <node name="blob" - pkg="iri_blob_detector" - type="iri_blob_detector" - output="screen"> - <remap from="/blob/image_in/camera_info" - to="/usb_cam/camera_info"/> - <remap from="/blob/image_in/image_raw" - to="/usb_cam/image_raw"/> - <rosparam file="$(arg config_yaml_file)" command="load" /> - </node> - -</launch> diff --git a/launch/node.launch b/launch/node.launch new file mode 100644 index 0000000000000000000000000000000000000000..13011529985ba4d6b1c072042412d07003f6d80a --- /dev/null +++ b/launch/node.launch @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<!-- --> +<launch> + + <arg name="node_name" default="blob_detector"/> + <arg name="param_file" default="sample.yaml"/> + <arg name="param_path" default="$(find iri_blob_detector)/config"/> + <arg name="camera_name" default="usb_cam"/> + <arg name="blobs_topic" default="blobs"/> + + <arg name="camera_info_topic" default="/$(arg camera_name)/camera_info"/> + <arg name="image_topic" default="/$(arg camera_name)/image_raw"/> + + <node name="$(arg node_name)" + pkg ="iri_blob_detector" + type="iri_blob_detector" + output="screen"> + <remap from="~image_in/camera_info" to="/$(arg camera_info_topic)"/> + <remap from="~image_in/image_raw" to="/$(arg image_topic)"/> + <remap from="~blobs" to="/$(arg blobs_topic)"/> + <rosparam file="$(arg param_path)/$(arg param_file)" command="load" /> + </node> + +</launch> \ No newline at end of file