<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
    <!-- 通用关节(joint)宏定义 -->
    <xacro:macro name="generic_joint" params="joint_name type parent child 
                                            origin_xyz origin_rpy 
                                            axis_xyz limit_lower limit_upper effort velocity">
        <joint name="${joint_name}" type="${type}">
            <origin xyz="${origin_xyz}" rpy="${origin_rpy}" />
            <parent link="${parent}" />
            <child link="${child}" />
            <axis xyz="${axis_xyz}" />
            <limit lower="${limit_lower}" upper="${limit_upper}" 
                    effort="${effort}" velocity="${velocity}" />
        </joint>
    </xacro:macro>
</robot>