@小伊 <?xml version="1.0"?>
<robot xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://ros.org/wiki/xacro"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find kr5_description)/urdf/kr.transmission.xacro" />
<xacro:include filename="$(find kr5_description)/urdf/kr.gazebo.xacro" />
<!-- effort values can be found here: https://github.com/ros-industrial/universal_robot/issues/32-->
<!-- plate Properties -->
<!-- a plate with 40x40x1 (cm) -->
<xacro:property name="plate_mass" value="0.5175" />
<xacro:property name="plate_width" value="0.4" />
<!-- Kinematic model -->
<xacro:macro name="kr5_robot" params="prefix">
<!-- tool link -->
<!-- This frame corresponds to the $FLANGE coordinate system in KUKA KRC controllers. -->
<!-- -.368 is 0 visual offset -->
<xacro:kr_arm_transmission prefix="${prefix}" /> <xacro:kr_arm_gazebo prefix="${prefix}" /> <!-- ROS base_link to UR 'Base' Coordinates transform --> <!-- NOTE: this rotation is only needed as long as base_link itself is not corrected wrt the real robot (ie: rotated over 180 degrees) --> <!-- <link name="${prefix}base"/> <joint name="${prefix}base_link-base_fixed_joint" type="fixed"> <origin xyz="0 0 0" rpy="0 0 ${-pi}"/> <parent link="${prefix}base_link"/> <child link="${prefix}base"/> </joint> --> <!-- Frame coincident with all-zeros TCP on UR controller --> <!-- <link name="${prefix}tool0"/> <joint name="${prefix}wrist_3_link-tool0_fixed_joint" type="fixed"> <origin xyz="0 0.115 0" rpy="${pi/-2.0} 0 0"/> <parent link="${prefix}link_6"/> <child link="${prefix}tool0"/> </joint> --></xacro:macro>
</robot>
这个是xacro文件