Skip to content
Snippets Groups Projects
Commit fec11827 authored by Christoph Jähne's avatar Christoph Jähne
Browse files

more general combined launch file

parent a9ba490a
No related branches found
No related tags found
No related merge requests found
......@@ -9,32 +9,39 @@
roslaunch <pkg> <launchfile> robot:=path/to/urdf.xacro args:="foo\:\=bar other\:\=true" -->
<arg name="args" default="" />
<!-- The name of the combined robot, used as control node name -->
<arg name="robot_id" default="combined_panda" />
<arg name="robot_1_ip" default="robot_1.franka.de" />
<arg name="robot_2_ip" default="robot_2.franka.de" />
<!-- The config file containing all parameters for the combined hardware node like the IPs of the robots etc. -->
<arg name="hw_config_file" default="$(find franka_control)/config/franka_combined_control_node.yaml"/>
<!-- The config file containing the parameterization for all controllers to start with this launch file -->
<arg name="controllers_file" default="$(find franka_control)/config/default_combined_controllers.yaml" />
<!-- The space separated list of controllers to start in this launch files. The controllers should be known from the controllers_file -->
<arg name="controllers_to_start" default="panda_1_state_controller panda_2_state_controller"/>
<!-- The list of the joint_states topics of all combined robots to fuse to a complete topic -->
<arg name="joint_states_source_list" default="[panda_1_state_controller/joint_states, panda_2_state_controller/joint_states, panda_1/franka_gripper/joint_states, panda_2/franka_gripper/joint_states]"/>
<node name="$(arg robot_id)" pkg="franka_control" type="franka_combined_control_node" output="screen" required="true" >
<rosparam command="load" file="$(arg hw_config_file)" />
<param name="panda_1/robot_ip" value="$(arg robot_1_ip)" />
<param name="panda_2/robot_ip" value="$(arg robot_2_ip)" />
<param name="robot_description" command="xacro --inorder $(arg robot) $(arg args)" />
</node>
<group ns="$(arg robot_id)">
<rosparam command="load" file="$(find franka_control)/config/default_combined_controllers.yaml" />
<rosparam command="load" file="$(arg controllers_file)" />
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen"
args="(arg controllers_to_start)"/>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" output="screen"/>
<node name="state_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen"
args="panda_1_state_controller panda_2_state_controller"/>
<node name="joint_state_publisher" type="joint_state_publisher" pkg="joint_state_publisher" output="screen">
<param name="robot_description" command="xacro --inorder $(arg robot) $(arg args)" />
<rosparam param="source_list">[panda_1_state_controller/joint_states,
panda_2_state_controller/joint_states,
panda_1/franka_gripper/joint_states,
panda_2/franka_gripper/joint_states]
</rosparam>
<rosparam param="source_list" subst_value="true">$(arg joint_states_source_list)</rosparam>
<param name="rate" value="30"/>
</node>
</group>
</launch>
<?xml version="1.0" ?>
<launch>
<arg name="robot_id" default="panda_dual" />
<arg name="robot_right_ip" default="robot_1.franka.de" />
<arg name="robot_left_ip" default="robot_2.franka.de" />
<arg name="rviz" default="true" />
<arg name="rqt" default="true" />
<include file="$(find franka_control)/launch/franka_combined_control.launch" >
<arg name="robot_id" value="$(arg robot_id)" />
<arg name="robot_1_ip" value="$(arg robot_right_ip)" />
<arg name="robot_2_ip" value="$(arg robot_left_ip)" />
</include>
<group ns="$(arg robot_id)">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment