Change Gazebo launch file in wam_bringup and bhand_bringup to support both Classic... humble
authorWalter Fetter Lages <w.fetter@ieee.org>
Mon, 20 Mar 2023 05:48:41 +0000 (02:48 -0300)
committerWalter Fetter Lages <w.fetter@ieee.org>
Mon, 20 Mar 2023 05:48:41 +0000 (02:48 -0300)
bhand_bringup/launch/gazebo.launch.xml
bhand_bringup/launch/ignition.launch.xml [deleted file]
wam_bringup/launch/gazebo.launch.xml
wam_bringup/launch/ignition.launch.xml [deleted file]

index 07dda4d..fe89bf5 100644 (file)
@@ -1,7 +1,7 @@
 <!--******************************************************************************
                            Barret Hand Bringup
                             Gazebo Launch File
-          Copyright (C) 2018, 2021 Walter Fetter Lages <w.fetter@ieee.org>
+          Copyright (C) 2018..2023 Walter Fetter Lages <w.fetter@ieee.org>
 
         This program is free software: you can redistribute it and/or modify
         it under the terms of the GNU General Public License as published by
        <arg name="pause" default="true"/>
        <arg name="gui" default="true"/>
        <arg name="use_sim_time" default="true"/>
+       <arg name="ignition" default="false"/>
 
        <arg name="controller" default="bhand_controller"/>
        <arg name="config" default="$(find-pkg-share bhand_bringup)/config/$(var controller).yaml"/>
        
-       <include file="$(find-pkg-share bhand_description)/launch/gazebo.launch.xml" >
+       <include unless="$(var ignition)" file="$(find-pkg-share bhand_description)/launch/gazebo.launch.xml" >
+               <arg name="pause" value="$(var pause)"/>
+               <arg name="gui" value="$(var gui)"/>
+               <arg name="use_sim_time" value="$(var use_sim_time)"/>
+       </include>
+       
+       <include if="$(var ignition)" file="$(find-pkg-share bhand_description)/launch/ignition.launch.xml" >
                <arg name="pause" value="$(var pause)"/>
                <arg name="gui" value="$(var gui)"/>
                <arg name="use_sim_time" value="$(var use_sim_time)"/>
diff --git a/bhand_bringup/launch/ignition.launch.xml b/bhand_bringup/launch/ignition.launch.xml
deleted file mode 100644 (file)
index a88bf87..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--******************************************************************************
-                           Barret Hand Bringup
-                            Ignition Launch File
-          Copyright (C) 2023 Walter Fetter Lages <w.fetter@ieee.org>
-
-        This program is free software: you can redistribute it and/or modify
-        it under the terms of the GNU General Public License as published by
-        the Free Software Foundation, either version 3 of the License, or
-        (at your option) any later version.
-
-        This program is distributed in the hope that it will be useful, but
-        WITHOUT ANY WARRANTY; without even the implied warranty of
-        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-        Geneal Public License for more details.
-
-        You should have received a copy of the GNU General Public License
-        along with this program.  If not, see
-        <http://www.gnu.org/licenses/>.
-        
-*******************************************************************************-->
-
-<launch>
-       <arg name="pause" default="true"/>
-       <arg name="gui" default="true"/>
-       <arg name="use_sim_time" default="true"/>
-
-       <arg name="controller" default="bhand_controller"/>
-       <arg name="config" default="$(find-pkg-share bhand_bringup)/config/$(var controller).yaml"/>
-       
-       <include file="$(find-pkg-share bhand_description)/launch/ignition.launch.xml" >
-               <arg name="pause" value="$(var pause)"/>
-               <arg name="gui" value="$(var gui)"/>
-               <arg name="use_sim_time" value="$(var use_sim_time)"/>
-       </include>
-
-       <include file="$(find-pkg-share bhand_bringup)/launch/$(var controller).launch.xml" >
-               <arg name="config" value="$(var config)"/>
-               <arg name="use_sim_time" value="$(var use_sim_time)"/>
-       </include>
-</launch>
index 6bbedeb..454d592 100644 (file)
@@ -1,7 +1,7 @@
 <!--******************************************************************************
                             Barrett WAM Bringup
                             Gazebo Launch File
-          Copyright (C) 2018, 2021 Walter Fetter Lages <w.fetter@ieee.org>
+          Copyright (C) 2018..2023 Walter Fetter Lages <w.fetter@ieee.org>
 
         This program is free software: you can redistribute it and/or modify
         it under the terms of the GNU General Public License as published by
        <arg name="use_sim_time" default="true"/>
        <arg name="table" default="true"/>
        <arg name="bhand" default="true"/>
+       <arg name="ignition" default="false"/>
 
        <!-- This is the default Barrett WAM Controller, used by libbarrett -->
        <arg name="controller" default="pid_plus_gravity_controller"/>
        <arg name="config" default="$(find-pkg-share wam_bringup)/config/$(var controller).yaml"/>
        
-       <include file="$(find-pkg-share wam_description)/launch/gazebo.launch.xml" >
+       <include unless="$(var ignition)" file="$(find-pkg-share wam_description)/launch/gazebo.launch.xml" >
+               <arg name="pause" value="$(var pause)"/>
+               <arg name="gui" value="$(var gui)"/>
+               <arg name="use_sim_time" value="$(var use_sim_time)"/>
+               <arg name="table" value="$(var table)"/>
+               <arg name="bhand" value="$(var bhand)"/>
+       </include>
+       
+       <include if="$(var ignition)" file="$(find-pkg-share wam_description)/launch/ignition.launch.xml" >
                <arg name="pause" value="$(var pause)"/>
                <arg name="gui" value="$(var gui)"/>
                <arg name="use_sim_time" value="$(var use_sim_time)"/>
diff --git a/wam_bringup/launch/ignition.launch.xml b/wam_bringup/launch/ignition.launch.xml
deleted file mode 100644 (file)
index b0dbf9d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--******************************************************************************
-                            Barrett WAM Bringup
-                            Ignition Launch File
-          Copyright (C) 2023 Walter Fetter Lages <w.fetter@ieee.org>
-
-        This program is free software: you can redistribute it and/or modify
-        it under the terms of the GNU General Public License as published by
-        the Free Software Foundation, either version 3 of the License, or
-        (at your option) any later version.
-
-        This program is distributed in the hope that it will be useful, but
-        WITHOUT ANY WARRANTY; without even the implied warranty of
-        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-        Geneal Public License for more details.
-
-        You should have received a copy of the GNU General Public License
-        along with this program.  If not, see
-        <http://www.gnu.org/licenses/>.
-        
-*******************************************************************************-->
-
-<launch>
-       <arg name="pause" default="true"/>
-       <arg name="gui" default="true"/>
-       <arg name="use_sim_time" default="true"/>
-       <arg name="table" default="true"/>
-       <arg name="bhand" default="true"/>
-
-       <!-- This is the default Barrett WAM Controller, used by libbarrett -->
-       <arg name="controller" default="pid_plus_gravity_controller"/>
-       <arg name="config" default="$(find-pkg-share wam_bringup)/config/$(var controller).yaml"/>
-       
-       <include file="$(find-pkg-share wam_description)/launch/ignition.launch.xml" >
-               <arg name="pause" value="$(var pause)"/>
-               <arg name="gui" value="$(var gui)"/>
-               <arg name="use_sim_time" value="$(var use_sim_time)"/>
-               <arg name="table" value="$(var table)"/>
-               <arg name="bhand" value="$(var bhand)"/>
-       </include>
-       
-       <include file="$(find-pkg-share wam_bringup)/launch/$(var controller).launch.xml" >
-               <arg name="config" value="$(var config)"/>
-               <arg name="use_sim_time" value="$(var use_sim_time)"/>
-       </include>
-
-       <group if="$(var bhand)">
-               <arg name="bhand_config" default="$(find-pkg-share bhand_bringup)/config/bhand_controller.yaml"/>
-       
-               <node name="bhand_controller_spawner" pkg="controller_manager" exec="spawner"
-                       args="-t position_controllers/JointGroupPositionController -p $(var bhand_config) bhand_controller"/>
-       </group>
-</launch>