44 lines
1.3 KiB
XML
Executable File
44 lines
1.3 KiB
XML
Executable File
<?xml version="1.0"?>
|
|
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
|
|
<xacro:macro name="sphere_wheel" params="name parent radius *origin">
|
|
<link name="${name}_link">
|
|
<inertial>
|
|
<origin xyz="0 0 0" rpy="0 0 0"/>
|
|
<mass value="1"/>
|
|
<inertia ixx="0.2" ixy="0" ixz="0" iyy="0.2" iyz="0" izz="0.2"/>
|
|
</inertial>
|
|
<visual>
|
|
<origin xyz="0 0 0" rpy="0 0 0"/>
|
|
<geometry>
|
|
<sphere radius="${wheel_radius}"/>
|
|
</geometry>
|
|
</visual>
|
|
<collision>
|
|
<origin xyz="0 0 0" rpy="0 0 0"/>
|
|
<geometry>
|
|
<sphere radius="${wheel_radius}"/>
|
|
</geometry>
|
|
</collision>
|
|
</link>
|
|
|
|
<joint name="${name}_joint" type="continuous">
|
|
<parent link="${parent}_link"/>
|
|
<child link="${name}_link"/>
|
|
<xacro:insert_block name="origin"/>
|
|
<axis xyz="0 0 1"/>
|
|
</joint>
|
|
|
|
<!-- Transmission is important to link the joints and the controller -->
|
|
<transmission name="${name}_joint_trans" type="SimpleTransmission">
|
|
<actuator name="${name}_joint_motor"/>
|
|
<joint name="${name}_joint"/>
|
|
<mechanicalReduction>1</mechanicalReduction>
|
|
<motorTorqueConstant>1</motorTorqueConstant>
|
|
</transmission>
|
|
|
|
<gazebo reference="${name}_link">
|
|
<material>Gazebo/Red</material>
|
|
</gazebo>
|
|
</xacro:macro>
|
|
</robot>
|