|
| 1 | +<?xml version="1.0"?> |
| 2 | +<robot xmlns:xacro="http://www.ros.org/wiki/xacro"> |
| 3 | + <xacro:macro name="panda_transmission" params="robot_name"> |
| 4 | + |
| 5 | + |
| 6 | + <!-- Load Gazebo lib and set the robot namespace --> |
| 7 | + <gazebo> |
| 8 | + <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> |
| 9 | + <!-- <robotNamespace>/${robot_name}</robotNamespace> --> |
| 10 | + </plugin> |
| 11 | + </gazebo> |
| 12 | + |
| 13 | + <transmission name="${robot_name}_tran_1"> |
| 14 | + <type>transmission_interface/SimpleTransmission</type> |
| 15 | + <joint name="${robot_name}_joint1"> |
| 16 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 17 | + </joint> |
| 18 | + <actuator name="${robot_name}_motor_1"> |
| 19 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 20 | + <mechanicalReduction>1</mechanicalReduction> |
| 21 | + </actuator> |
| 22 | + </transmission> |
| 23 | + |
| 24 | + <transmission name="${robot_name}_tran_2"> |
| 25 | + <type>transmission_interface/SimpleTransmission</type> |
| 26 | + <joint name="${robot_name}_joint2"> |
| 27 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 28 | + </joint> |
| 29 | + <actuator name="${robot_name}_motor_2"> |
| 30 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 31 | + <mechanicalReduction>1</mechanicalReduction> |
| 32 | + </actuator> |
| 33 | + </transmission> |
| 34 | + |
| 35 | + <transmission name="${robot_name}_tran_3"> |
| 36 | + <type>transmission_interface/SimpleTransmission</type> |
| 37 | + <joint name="${robot_name}_joint3"> |
| 38 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 39 | + </joint> |
| 40 | + <actuator name="${robot_name}_motor_3"> |
| 41 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 42 | + <mechanicalReduction>1</mechanicalReduction> |
| 43 | + </actuator> |
| 44 | + </transmission> |
| 45 | + |
| 46 | + <transmission name="${robot_name}_tran_4"> |
| 47 | + <type>transmission_interface/SimpleTransmission</type> |
| 48 | + <joint name="${robot_name}_joint4"> |
| 49 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 50 | + </joint> |
| 51 | + <actuator name="${robot_name}_motor_4"> |
| 52 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 53 | + <mechanicalReduction>1</mechanicalReduction> |
| 54 | + </actuator> |
| 55 | + </transmission> |
| 56 | + |
| 57 | + <transmission name="${robot_name}_tran_5"> |
| 58 | + <type>transmission_interface/SimpleTransmission</type> |
| 59 | + <joint name="${robot_name}_joint5"> |
| 60 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 61 | + </joint> |
| 62 | + <actuator name="${robot_name}_motor_5"> |
| 63 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 64 | + <mechanicalReduction>1</mechanicalReduction> |
| 65 | + </actuator> |
| 66 | + </transmission> |
| 67 | + |
| 68 | + <transmission name="${robot_name}_tran_6"> |
| 69 | + <type>transmission_interface/SimpleTransmission</type> |
| 70 | + <joint name="${robot_name}_joint6"> |
| 71 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 72 | + </joint> |
| 73 | + <actuator name="${robot_name}_motor_6"> |
| 74 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 75 | + <mechanicalReduction>1</mechanicalReduction> |
| 76 | + </actuator> |
| 77 | + </transmission> |
| 78 | + |
| 79 | + <transmission name="${robot_name}_tran_7"> |
| 80 | + <type>transmission_interface/SimpleTransmission</type> |
| 81 | + <joint name="${robot_name}_joint7"> |
| 82 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 83 | + </joint> |
| 84 | + <actuator name="${robot_name}_motor_7"> |
| 85 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 86 | + <mechanicalReduction>1</mechanicalReduction> |
| 87 | + </actuator> |
| 88 | + </transmission> |
| 89 | + |
| 90 | + <transmission name="${robot_name}_leftfinger"> |
| 91 | + <type>transmission_interface/SimpleTransmission</type> |
| 92 | + <joint name="${robot_name}_finger_joint1"> |
| 93 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 94 | + </joint> |
| 95 | + <actuator name="${robot_name}_finger_joint1"> |
| 96 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 97 | + <mechanicalReduction>1</mechanicalReduction> |
| 98 | + </actuator> |
| 99 | + </transmission> |
| 100 | + |
| 101 | + <transmission name="${robot_name}_rightfinger"> |
| 102 | + <type>transmission_interface/SimpleTransmission</type> |
| 103 | + <joint name="${robot_name}_finger_joint2"> |
| 104 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 105 | + </joint> |
| 106 | + <actuator name="${robot_name}_finger_joint2"> |
| 107 | + <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> |
| 108 | + <mechanicalReduction>1</mechanicalReduction> |
| 109 | + </actuator> |
| 110 | + </transmission> |
| 111 | + </xacro:macro> |
| 112 | +</robot> |
0 commit comments