From 1d4e2475c3fb846fedc185c49c1339f2cf8f9d6c Mon Sep 17 00:00:00 2001 From: fherrero <fherrero@iri.upc.edu> Date: Fri, 26 Oct 2018 10:14:18 +0200 Subject: [PATCH] Renamed files and launchs --- config/blue_lab.yaml | 9 +++++ config/{blue.yaml => blue_sim.yaml} | 2 +- config/green_lab.yaml | 9 +++++ config/{green.yaml => green_sim.yaml} | 6 +-- config/red_lab.yaml | 9 +++++ config/{red.yaml => red_sim.yaml} | 4 +- config/{default_params.yaml => sample.yaml} | 2 +- config/yellow_lab.yaml | 9 +++++ config/{yellow.yaml => yellow_sim.yaml} | 8 ++-- launch/blob_detector.launch | 41 --------------------- launch/blob_detector_sim.launch | 17 --------- launch/node.launch | 24 ++++++++++++ 12 files changed, 71 insertions(+), 69 deletions(-) create mode 100644 config/blue_lab.yaml rename config/{blue.yaml => blue_sim.yaml} (89%) create mode 100644 config/green_lab.yaml rename config/{green.yaml => green_sim.yaml} (67%) create mode 100644 config/red_lab.yaml rename config/{red.yaml => red_sim.yaml} (78%) rename config/{default_params.yaml => sample.yaml} (87%) create mode 100644 config/yellow_lab.yaml rename config/{yellow.yaml => yellow_sim.yaml} (57%) delete mode 100644 launch/blob_detector.launch delete mode 100644 launch/blob_detector_sim.launch create mode 100644 launch/node.launch diff --git a/config/blue_lab.yaml b/config/blue_lab.yaml new file mode 100644 index 0000000..e5f517d --- /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 aa0f35c..87d1cd2 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 0000000..00d14fb --- /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 05eee86..175431e 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 0000000..85f4dc9 --- /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 6f10fda..e91af09 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 22d6273..4c57439 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 0000000..3928b14 --- /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 9981fdd..cbe58fc 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 501979e..0000000 --- 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 9b307fd..0000000 --- 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 0000000..1301152 --- /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 -- GitLab