From 33fad8cc70ea2e6b95a681f61bda7ea91ce90c04 Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Tue, 10 Jul 2018 09:56:54 +0200
Subject: [PATCH] Added a launch file for each of the robot types.

---
 ...ol.launch => darwin_ceabot_control.launch} |  0
 .../launch/darwin_cpp_control.launch          | 22 +++++++++++++++++++
 .../launch/darwin_sc_control.launch           | 22 +++++++++++++++++++
 3 files changed, 44 insertions(+)
 rename darwin_control/launch/{darwin_control.launch => darwin_ceabot_control.launch} (100%)
 create mode 100644 darwin_control/launch/darwin_cpp_control.launch
 create mode 100644 darwin_control/launch/darwin_sc_control.launch

diff --git a/darwin_control/launch/darwin_control.launch b/darwin_control/launch/darwin_ceabot_control.launch
similarity index 100%
rename from darwin_control/launch/darwin_control.launch
rename to darwin_control/launch/darwin_ceabot_control.launch
diff --git a/darwin_control/launch/darwin_cpp_control.launch b/darwin_control/launch/darwin_cpp_control.launch
new file mode 100644
index 0000000..1481ebd
--- /dev/null
+++ b/darwin_control/launch/darwin_cpp_control.launch
@@ -0,0 +1,22 @@
+<launch>
+
+  <arg name="config_file" default="darwin_config.xml"/>
+  <arg name="robot" default="darwin"/>
+
+  <!-- Load joint controller configurations from YAML file to parameter server -->
+  <rosparam file="$(find darwin_control)/config/$(arg robot).yaml" command="load"/>
+
+  <param name="motion_file" value="$(find darwin_controller_cpp)/config/motion_1024.bin"/>
+  <param name="config_file" value="$(find darwin_controller_cpp)/src/xml/$(arg config_file)"/>
+
+  <!-- load the controllers -->
+  <node name="controller_spawner" 
+        pkg="controller_manager" 
+        type="spawner" 
+        respawn="false"
+        output="screen"
+        ns="/darwin"  
+        args="darwin_controller_cpp joint_state_controller">
+  </node>
+</launch>
+
diff --git a/darwin_control/launch/darwin_sc_control.launch b/darwin_control/launch/darwin_sc_control.launch
new file mode 100644
index 0000000..dbc31ed
--- /dev/null
+++ b/darwin_control/launch/darwin_sc_control.launch
@@ -0,0 +1,22 @@
+<launch>
+
+  <arg name="config_file" default="darwin_config.xml"/>
+  <arg name="robot" default="darwin"/>
+
+  <!-- Load joint controller configurations from YAML file to parameter server -->
+  <rosparam file="$(find darwin_control)/config/$(arg robot).yaml" command="load"/>
+
+  <param name="motion_file" value="$(find darwin_controller)/config/motion_1024.bin"/>
+  <param name="config_file" value="$(find darwin_controller)/src/xml/$(arg config_file)"/>
+
+  <!-- load the controllers -->
+  <node name="controller_spawner" 
+        pkg="controller_manager" 
+        type="spawner" 
+        respawn="false"
+        output="screen"
+        ns="/darwin"  
+        args="darwin_controller joint_state_controller">
+  </node>
+</launch>
+
-- 
GitLab