diff --git a/franka_description/robots/panda.transmission.xacro b/franka_description/robots/panda.transmission.xacro index 343bd7ad7415c1151f4a39f29436677ae978543a..9b8d7f1eeddfae40d3a31175f88265681c2e0a65 100644 --- a/franka_description/robots/panda.transmission.xacro +++ b/franka_description/robots/panda.transmission.xacro @@ -1,6 +1,6 @@ <?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> - <xacro:macro name="panda_transmission" params="robot_name"> + <xacro:macro name="panda_transmission" params="robot_name load_hand"> <!-- Load Gazebo lib and set the robot namespace --> @@ -87,26 +87,28 @@ </actuator> </transmission> - <transmission name="${robot_name}_leftfinger"> - <type>transmission_interface/SimpleTransmission</type> - <joint name="${robot_name}_finger_joint1"> - <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> - </joint> - <actuator name="${robot_name}_finger_joint1"> - <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> - <mechanicalReduction>1</mechanicalReduction> - </actuator> - </transmission> + <xacro:if value="${load_hand}"> + <transmission name="${robot_name}_leftfinger"> + <type>transmission_interface/SimpleTransmission</type> + <joint name="${robot_name}_finger_joint1"> + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> + </joint> + <actuator name="${robot_name}_finger_joint1"> + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> + <mechanicalReduction>1</mechanicalReduction> + </actuator> + </transmission> - <transmission name="${robot_name}_rightfinger"> - <type>transmission_interface/SimpleTransmission</type> - <joint name="${robot_name}_finger_joint2"> - <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> - </joint> - <actuator name="${robot_name}_finger_joint2"> - <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> - <mechanicalReduction>1</mechanicalReduction> - </actuator> - </transmission> + <transmission name="${robot_name}_rightfinger"> + <type>transmission_interface/SimpleTransmission</type> + <joint name="${robot_name}_finger_joint2"> + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> + </joint> + <actuator name="${robot_name}_finger_joint2"> + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> + <mechanicalReduction>1</mechanicalReduction> + </actuator> + </transmission> + </xacro:if> </xacro:macro> </robot> diff --git a/franka_description/robots/panda_arm.urdf.xacro b/franka_description/robots/panda_arm.urdf.xacro index cfb3c2346656bc8f4cb66918756c2cfebe0f4dac..2b247b62fc62a2375ff05c376b1315bbcd14a96c 100644 --- a/franka_description/robots/panda_arm.urdf.xacro +++ b/franka_description/robots/panda_arm.urdf.xacro @@ -1,5 +1,18 @@ <?xml version='1.0' encoding='utf-8'?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="panda"> <xacro:include filename="$(find franka_description)/robots/panda_arm.xacro" /> + + <!-- for simulation --> + <xacro:include filename="$(find franka_description)/robots/panda.gazebo.xacro"/> + <xacro:include filename="panda.transmission.xacro"/> + <!-- end for simulation --> + <xacro:panda_arm /> + + <!-- for simulation --> + <xacro:arg name="robot_name" default="panda"/> + <xacro:panda_gazebo robot_name="$(arg robot_name)" /> + <xacro:panda_transmission robot_name="$(arg robot_name)" load_hand="false" /> + <!-- end for simulation --> + </robot> diff --git a/franka_description/robots/panda_arm_hand.urdf.xacro b/franka_description/robots/panda_arm_hand.urdf.xacro index e8e72fdce85aa40efa1cf6e9cae28b2fd81d17ca..65ac6b9fa17f55ffe5c22b90f4547293c575757a 100644 --- a/franka_description/robots/panda_arm_hand.urdf.xacro +++ b/franka_description/robots/panda_arm_hand.urdf.xacro @@ -5,7 +5,7 @@ <!-- for simulation --> <xacro:include filename="$(find franka_description)/robots/panda.gazebo.xacro"/> - <xacro:include filename="$(find franka_description)/robots/panda.transmission.xacro"/> + <xacro:include filename="panda.transmission.xacro"/> <!-- end for simulation --> <xacro:panda_arm /> @@ -14,6 +14,6 @@ <!-- for simulation --> <xacro:arg name="robot_name" default="panda"/> <xacro:panda_gazebo robot_name="$(arg robot_name)" /> - <xacro:panda_transmission robot_name="$(arg robot_name)" /> + <xacro:panda_transmission robot_name="$(arg robot_name)" load_hand="true" /> <!-- end for simulation --> </robot>