geometric_simu_context.launch 2.39 KB
Newer Older
1
2
3
4
<!-- -*-xml-*-
     Handle ROS simulation of the SoT.
  -->
<launch>
5
  <arg name="end_effector" doc="one of false, pal-gripper, pal-hey5, schunk-wsg"/>
6
  <arg name="use_mobile_base" doc="Whether SoT should control the mobile base"/>
7
8

   <!-- Load robot model. -->
9
10
11
12
  <!--
  <param name="robot_description"
    textfile="$(find tiago_data)/robots/tiago_steel.urdf" />
  -->
13
  <param name="robot_description"
14
15
    command="$(find xacro)/xacro.py '$(find tiago_description)/robots/tiago.urdf.xacro' end_effector:=$(arg end_effector)"/>

16
17
18
19
20
21
22
23
24
25
26
27
28
29
  <arg     if="$(arg use_mobile_base) " name="mobile_base_joint_names" value="'wheel_left_joint', 'wheel_right_joint', " />
  <arg unless="$(arg use_mobile_base) " name="mobile_base_joint_names" value="" />
  <arg if="$(eval arg('end_effector') == 'schunk-wsg')" name="gripper_joint_names" value="'gripper_finger_joint', " />
  <arg if="$(eval arg('end_effector') == 'pal-hey5'  )" name="gripper_joint_names" value="'hand_index_joint', 'hand_mrl_joint', 'hand_thumb_joint', " />

  <!-- Load robot sot params. -->
  <group ns="sot">
    <rosparam param="tf_base_link">base_footprint</rosparam>
    <rosparam param="state_vector_map" subst_value="True">[ $(arg mobile_base_joint_names) "torso_lift_joint", "arm_1_joint", "arm_2_joint", "arm_3_joint", "arm_4_joint", "arm_5_joint", "arm_6_joint", "arm_7_joint", $(arg gripper_joint_names) "head_1_joint", "head_2_joint" ]</rosparam>
  </group>
  <group ns="sot_controller">
    <rosparam param="joint_names" subst_value="True">[ $(arg mobile_base_joint_names) "torso_lift_joint", "arm_1_joint", "arm_2_joint", "arm_3_joint", "arm_4_joint", "arm_5_joint", "arm_6_joint", "arm_7_joint", $(arg gripper_joint_names) "head_1_joint", "head_2_joint" ]</rosparam>
    <rosparam param="dt">0.01</rosparam>
  </group>
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  
  <machine name="geometric_simu_machine"
    address="localhost" />

  <!--
     Read joint_states topic and publish link positions to tf.

     openhrp_bridge publishes encoder values to the joint_states topic
     therefore, this provide the most reliable way of identifying link
     relative position on HRP-2.
    -->
  <node name="robot_state_publisher"
	pkg="robot_state_publisher"
	type="state_publisher"
	respawn="true">
    <param name="tf_prefix" value="" />
  </node>


  <!-- Buffer Server -->
  <node pkg="tf2_ros" type="buffer_server"
	name="tf2_buffer_server" respawn="true">
    <param name="buffer_size" value="120.0"/>
  </node>
</launch>