From e69e889e4126a7439c34fac5011dc246fe97add4 Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Thu, 3 Mar 2022 13:54:45 +0100
Subject: [PATCH] Added the output topic remapping to the input arguments.

---
 cfg/PointCloudHoleDetection.cfg | 6 +++---
 launch/node.launch              | 4 ++++
 launch/nodelet.launch           | 4 ++++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/cfg/PointCloudHoleDetection.cfg b/cfg/PointCloudHoleDetection.cfg
index 8e9864d..08d2c30 100755
--- a/cfg/PointCloudHoleDetection.cfg
+++ b/cfg/PointCloudHoleDetection.cfg
@@ -41,10 +41,10 @@ gen = ParameterGenerator()
 #gen.add("velocity_scale_factor",  double_t,  0,                               "Maximum velocity scale factor",  0.5,      0.0,  1.0)
 gen.add("hole_min_p",              int_t,     0,                               "No of Points to be hole (less points is a hole)",30,5,200)
 gen.add("num_cells",               int_t,     0,                               "No of cells in the detections zone",3,     1,    10)
-gen.add("box_y",                   double_t,  0,                               "Y distance hole detection zone", 0.6,      0,    1.5)
+gen.add("box_y",                   double_t,  0,                               "Y distance hole detection zone", 0.6,      0,    3)
 gen.add("box_z_ini",               double_t,  0,                               "Initial Z hole detection zone",  0,        -0.5, 0.5)
 gen.add("box_z_end",               double_t,  0,                               "Z distance hole detection zone", 0.1,      -0.5, 0.5)
-gen.add("box_x_ini",               double_t,  0,                               "Initial X hole detection zone",  0.8,      0,    2)
-gen.add("box_x_end",               double_t,  0,                               "X distance hole detection zone", 0.9,      0.5,  2)
+gen.add("box_x_ini",               double_t,  0,                               "Initial X hole detection zone",  0.8,      -4.0,    4.0)
+gen.add("box_x_end",               double_t,  0,                               "X distance hole detection zone", 0.9,      -4.0,  4.0)
 
 exit(gen.generate(PACKAGE, "PointCloudHoleDetectionAlgorithm", "PointCloudHoleDetection"))
diff --git a/launch/node.launch b/launch/node.launch
index 38083f4..3faad30 100644
--- a/launch/node.launch
+++ b/launch/node.launch
@@ -7,6 +7,8 @@
   <arg name="output" default="screen"/>
   <arg name="launch_prefix" default=""/>
   <arg name="cloud_in" default="~pointcloud_in"/>
+  <arg name="hole_zone_cloud_out" default="~hole_zone_cloud_out"/>
+  <arg name="hole_obs_cloud_out" default="~hole_obs_cloud_out"/>
 
   <group ns="$(arg ns)">
 
@@ -16,6 +18,8 @@
           output="$(arg output)"
           launch-prefix="$(arg launch_prefix)">
       <remap from="~input" to="$(arg cloud_in)"/>
+      <remap from="~hole_zone" to="$(arg hole_zone_cloud_out)"/>
+      <remap from="~hole_obstacle" to="$(arg hole_obs_cloud_out)"/>
       <rosparam file="$(arg config_file)" command="load"/>
     </node>
 
diff --git a/launch/nodelet.launch b/launch/nodelet.launch
index 5636ced..4d65c09 100644
--- a/launch/nodelet.launch
+++ b/launch/nodelet.launch
@@ -8,6 +8,8 @@
   <arg name="output" default="screen"/>
   <arg name="launch_prefix" default=""/>
   <arg name="cloud_in" default="~pointcloud_in"/>
+  <arg name="hole_zone_cloud_out" default="~hole_zone_cloud_out"/>
+  <arg name="hole_obs_cloud_out" default="~hole_obs_cloud_out"/>
 
   <group ns="$(arg ns)">
 
@@ -17,6 +19,8 @@
           args="load iri_point_cloud_hole_detection/PointCloudHoleDetectionAlgNodelet $(arg camera_nodelet_manager)"
           output="$(arg output)">
       <remap from="~input" to="$(arg cloud_in)"/>
+      <remap from="~hole_zone" to="$(arg hole_zone_cloud_out)"/>
+      <remap from="~hole_obstacle" to="$(arg hole_obs_cloud_out)"/>
       <rosparam file="$(arg config_file)" command="load"/>
     </node>
 
-- 
GitLab