From 1807dc955c6d859adacf1fce64a0f15480a5a596 Mon Sep 17 00:00:00 2001
From: fherrero <fherrero@iri.upc.edu>
Date: Thu, 20 May 2021 11:12:11 +0200
Subject: [PATCH] add state_pub bool

---
 launch/description.launch | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/launch/description.launch b/launch/description.launch
index 9a5520f..b715195 100644
--- a/launch/description.launch
+++ b/launch/description.launch
@@ -3,6 +3,7 @@
 
   <arg name="ns"    default="helena"/>
   <arg name="model" default="helena"/>
+  <arg name="state_pub"     default="true" />
   <arg name="static_wheels" default="false" />
 
   <group ns="$(arg ns)">
@@ -10,7 +11,10 @@
     <param name="robot_description"
          command="$(find xacro)/xacro --inorder '$(find iri_helena_description)/urdf/$(arg model).xacro' name:=$(arg ns)" />
 
-    <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
+    <node if="$(arg state_pub)"
+          pkg="robot_state_publisher"
+          type="robot_state_publisher"
+          name="robot_state_publisher">
       <param name="tf_prefix" type="string" value="/$(arg ns)"/>
       <param name="publish_frequency" type="double" value="20.0"/>
     </node>
-- 
GitLab