From 9e7ffd3105c31847a215ee991fadeafe9530daff Mon Sep 17 00:00:00 2001
From: fherrero <fherrero@iri.upc.edu>
Date: Thu, 20 May 2021 11:13:39 +0200
Subject: [PATCH] Parameter base_frame_id moved from yaml to launch, to be able
 to use ns argument

---
 config/default_config.yaml | 2 +-
 launch/node.launch         | 2 ++
 launch/nodelet.launch      | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/config/default_config.yaml b/config/default_config.yaml
index f08a43d..bf059a1 100755
--- a/config/default_config.yaml
+++ b/config/default_config.yaml
@@ -1,5 +1,5 @@
 # sensor information
-base_frame_id: "ana/base_footprint"
+#base_frame_id: "ana/base_footprint"
 min_range: 0.1
 max_range: 50.0
 sensor_height: 0.3
diff --git a/launch/node.launch b/launch/node.launch
index b65000d..52a0653 100644
--- a/launch/node.launch
+++ b/launch/node.launch
@@ -7,6 +7,7 @@
   <arg name="output" default="screen"/>
   <arg name="launch_prefix" default=""/>
   <arg name="cloud_in" default="~pointcloud_in"/>
+  <arg name="base_frame_id" default="$(arg ns)/base_footprint"/>
 
   <group ns="$(arg ns)">
 
@@ -17,6 +18,7 @@
           launch-prefix="$(arg launch_prefix)">
       <remap from="~pointcloud_in" to="$(arg cloud_in)"/>
       <rosparam file="$(arg config_file)" command="load"/>
+      <param name="base_frame_id" value="$(arg base_frame_id)"/>
     </node>
 
   </group>
diff --git a/launch/nodelet.launch b/launch/nodelet.launch
index 9926783..dbdc16d 100644
--- a/launch/nodelet.launch
+++ b/launch/nodelet.launch
@@ -8,6 +8,7 @@
   <arg name="output" default="screen"/>
   <arg name="launch_prefix" default=""/>
   <arg name="cloud_in" default="~pointcloud_in"/>
+  <arg name="base_frame_id" default="$(arg ns)/base_footprint"/>
 
   <group ns="$(arg ns)">
 
@@ -18,6 +19,7 @@
           output="$(arg output)">
       <remap from="~pointcloud_in" to="$(arg cloud_in)"/>
       <rosparam file="$(arg config_file)" command="load"/>
+      <param name="base_frame_id" value="$(arg base_frame_id)"/>
     </node>
 
   </group>
-- 
GitLab