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

---
 launch/node.launch    | 4 ++++
 launch/nodelet.launch | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/launch/node.launch b/launch/node.launch
index 0242e69..f8194ca 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="obstacles_cloud_out" default="~obstacles_cloud_in"/>
+  <arg name="free_space_cloud_out" default="~free_space_cloud_in"/>
 
   <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="~obstacles" to="$(arg obstacles_cloud_out)"/>
+      <remap from="~free_space" to="$(arg free_space_cloud_out)"/>
       <rosparam file="$(arg config_file)" command="load"/>
     </node>
 
diff --git a/launch/nodelet.launch b/launch/nodelet.launch
index b8c7815..f4635f3 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="obstacles_cloud_out" default="~obstacles_cloud_in"/>
+  <arg name="free_space_cloud_out" default="~free_space_cloud_in"/>
 
   <group ns="$(arg ns)">
 
@@ -17,6 +19,8 @@
           args="load iri_obstacle_detection_normals/ObstacleDetectionNormalsAlgNodelet $(arg camera_nodelet_manager)"
           output="$(arg output)">
       <remap from="~input" to="$(arg cloud_in)"/>
+      <remap from="~obstacles" to="$(arg obstacles_cloud_out)"/>
+      <remap from="~free_space" to="$(arg free_space_cloud_out)"/>
       <rosparam file="$(arg config_file)" command="load"/>
     </node>
 
-- 
GitLab