bot_mini_description/urdf/diffbot_description.urdf.xacro

244 lines
9.8 KiB
Plaintext
Raw Normal View History

2023-06-12 07:52:34 +00:00
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="diffbot" params="prefix">
2023-06-13 08:02:56 +00:00
<!-- Constants for robot dimensions -->
<xacro:property name="PI" value="3.1415926535897931"/>
<xacro:property name="base_mass" value="0.3" />
<!-- arbitrary value for base mass -->
2023-06-13 09:04:47 +00:00
<xacro:property name="base_width" value="0.26" />
2023-06-13 08:02:56 +00:00
<!-- Updated wheel spacing to 25cm -->
<xacro:property name="base_length" value="0.34" />
2023-06-13 09:04:47 +00:00
<xacro:property name="base_height" value="0.123" />
2023-06-13 08:02:56 +00:00
<xacro:property name="wheel_mass" value="0.3" />
<!-- arbitrary value for wheel mass -->
<xacro:property name="wheel_len" value="0.020" />
<xacro:property name="wheel_radius" value="0.0625" />
<xacro:property name="caster_wheel_mass" value="0.1" />
<!-- arbitrary value for caster wheel mass -->
<xacro:property name="caster_wheel_radius" value="0.04" />
<xacro:property name="z_offset" value="-${base_height/2}" />
2023-06-13 09:21:04 +00:00
<!-- Offset of main Axis to center of base body (Axis of rotation for steering) -->
<xacro:property name="base_offset" value="0.11" />
2023-06-13 08:02:56 +00:00
<!-- dummy link - used for ros2 control so it stops complaining?
<link name="${prefix}dummy_link">
2023-06-12 07:52:34 +00:00
</link>
2023-06-13 08:02:56 +00:00
<joint name="${prefix}dummy_joint" type="fixed">
<parent link="${prefix}dummy_link" />
<child link="${prefix}base_link" />
</joint> -->
2023-06-16 10:23:38 +00:00
<!-- needed for replacement to find mesh dir: package://bot_mini_description/mesh/ -->
2023-06-13 08:02:56 +00:00
<!-- Base Link -->
<link name="${prefix}base_link">
<visual>
2023-06-13 09:04:47 +00:00
<origin xyz="0 0 0" rpy="0 0 0" />
2023-06-13 08:02:56 +00:00
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/base_link_visual.stl"/>
2023-06-13 08:02:56 +00:00
</geometry>
<material name="base_link_material">
<color rgba="0.80032179626883115375 0.81301836741632160788 0.83346199892499306383 1.0"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 -0 0" />
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/base_link_collision.stl"/>
2023-06-13 08:02:56 +00:00
</geometry>
</collision>
<inertial>
2023-06-13 09:21:04 +00:00
<origin xyz="0 0 0" rpy="0 0 0"/>
2023-06-13 08:02:56 +00:00
<mass value="8.4123950268139715547" />
<inertia ixx="0.090166990291185383777" ixy="4.7429179749238352248e-18" ixz="1.4209310488728267579e-18" iyy="0.055481261106946747064" iyz="-0.01112159061226025876" izz="0.13051099377067149065" />
</inertial>
</link>
2023-06-13 07:25:34 +00:00
2023-06-12 09:14:49 +00:00
<!-- Adding base_footprint for mapping (Needed by slam toolbox) -->
<link name="${prefix}base_footprint">
</link>
<joint name="${prefix}base_footprint_joint" type="fixed">
<parent link="${prefix}base_link" />
<child link="${prefix}base_footprint" />
2023-06-13 09:04:47 +00:00
<origin xyz="0 0 ${z_offset}" rpy="0 0 0" />
2023-06-12 09:14:49 +00:00
</joint>
2023-06-13 08:02:56 +00:00
<!-- right wheel joint -->
<!-- fixed wheel joint for testing, type was continuous -->
<joint name="${prefix}right_wheel_joint" type="continuous">
2023-06-13 09:36:16 +00:00
<origin xyz="0 -0.125 ${z_offset}" rpy="${PI / 2} 0 0" />
2023-06-13 08:02:56 +00:00
<parent link="${prefix}base_link" />
<child link="${prefix}right_wheel" />
2023-06-13 09:38:26 +00:00
<axis xyz="0 0 1"/>
2023-06-13 08:02:56 +00:00
<limit effort="1" velocity="20" />
<joint_properties friction="0.0"/>
</joint>
2023-06-12 07:52:34 +00:00
2023-06-13 08:02:56 +00:00
<!-- right wheel Link -->
<link name="${prefix}right_wheel">
2023-06-12 08:57:49 +00:00
<visual>
2023-06-13 08:02:56 +00:00
<origin xyz="0 0 0" rpy="0 -0 0" />
2023-06-12 08:57:49 +00:00
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/wheel_link_visual.stl"/>
2023-06-12 08:57:49 +00:00
</geometry>
2023-06-13 08:02:56 +00:00
<material name="wheel_link_material">
<color rgba="0.50196078431372548323 0.50196078431372548323 0.50196078431372548323 1.0"/>
</material>
2023-06-12 08:57:49 +00:00
</visual>
2023-06-13 08:02:56 +00:00
<collision>
<origin xyz="0 0 0" rpy="0 -0 0" />
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/wheel_link_collision.stl"/>
2023-06-13 08:02:56 +00:00
</geometry>
</collision>
2023-06-13 07:25:34 +00:00
<inertial>
2023-06-13 08:02:56 +00:00
<origin xyz="-1.3877787807814456755e-17 -6.9388939039072283776e-18 -0.017500000000000029421" rpy="0 0 0"/>
<mass value="0.43298678305638949038" />
<inertia ixx="0.00043196650576949035269" ixy="0" ixz="1.8666117243005040269e-36" iyy="0.00043196650576949029848" iyz="0" izz="0.00078373880522818965139" />
</inertial>
</link>
2023-06-13 07:25:34 +00:00
2023-06-13 08:02:56 +00:00
<!-- fixed wheel joint for testing, type was continuous -->
<!-- left wheel joint -->
<joint name="${prefix}left_wheel_joint" type="continuous">
2023-06-13 09:36:16 +00:00
<origin xyz="0 0.125 ${z_offset}" rpy="${PI / 2} 0 0" />
2023-06-13 08:02:56 +00:00
<parent link="${prefix}base_link" />
<child link="${prefix}left_wheel" />
2023-06-13 08:04:56 +00:00
<axis xyz="0 0 -1" />
2023-06-13 08:02:56 +00:00
<limit effort="1" velocity="20" />
<joint_properties friction="0.0" />
2023-06-13 07:25:34 +00:00
</joint>
2023-06-13 08:02:56 +00:00
<!-- left wheel Link -->
<link name="${prefix}left_wheel">
<visual>
<origin xyz="0 0 0" rpy="0 -0 0" />
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/wheel_link_2_visual.stl"/>
2023-06-13 08:02:56 +00:00
</geometry>
<material name="wheel_link_2_material">
<color rgba="0.50196078431372548323 0.50196078431372548323 0.50196078431372548323 1.0"/>
</material>
</visual>
2023-06-12 08:57:49 +00:00
<collision>
2023-06-13 08:02:56 +00:00
<origin xyz="0 0 0" rpy="0 -0 0" />
2023-06-12 08:57:49 +00:00
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/wheel_link_2_collision.stl"/>
2023-06-12 08:57:49 +00:00
</geometry>
</collision>
2023-06-13 08:02:56 +00:00
<inertial>
<origin xyz="-2.7755575615628913511e-17 0 -0.017500000000000015543" rpy="0 0 0"/>
<mass value="0.43298678305638949038" />
<inertia ixx="0.00043196650576949035269" ixy="1.4778173856800390343e-52" ixz="-4.8081924471597460774e-36" iyy="0.00043196650576949029848" iyz="0" izz="0.00078373880522818965139" />
</inertial>
</link>
<!-- caster wheel joint -->
<joint name="${prefix}caster_wheel_joint" type="fixed">
2023-06-13 09:21:04 +00:00
<origin xyz="-${base_length / 2 + base_offset} 0 -0.02" rpy="0 0 ${PI}" />
2023-06-13 08:02:56 +00:00
<parent link="${prefix}base_link" />
<child link="${prefix}caster_wheel" />
<axis xyz="0 0 1"/>
<limit effort="1" velocity="20" />
<joint_properties friction="0.0"/>
</joint>
2023-06-12 07:52:34 +00:00
2023-06-13 08:02:56 +00:00
<!-- caster wheel Link -->
<link name="${prefix}caster_wheel">
2023-06-12 08:57:49 +00:00
<visual>
2023-06-13 08:02:56 +00:00
<origin xyz="0 0 0" rpy="0 -0 0" />
2023-06-12 08:57:49 +00:00
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/caster_link_visual.stl"/>
2023-06-12 08:57:49 +00:00
</geometry>
2023-06-13 08:02:56 +00:00
<material name="caster_link_material">
<color rgba="0.69513764518117548974 0.69513764518117548974 0.69513764518117548974 1.0"/>
</material>
2023-06-12 08:57:49 +00:00
</visual>
<collision>
2023-06-13 08:02:56 +00:00
<origin xyz="0 0 0" rpy="0 -0 0" />
2023-06-12 08:57:49 +00:00
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/caster_link_collision.stl"/>
2023-06-12 08:57:49 +00:00
</geometry>
</collision>
2023-06-13 08:02:56 +00:00
<inertial>
<origin xyz="-0.0043392325658342043027 -0.026018163063004008662 -0.040087257391101506487" rpy="0 0 0"/>
<mass value="0.4365196214157913146" />
<inertia ixx="0.00065232223366267665706" ixy="-2.2812456870885095374e-05" ixz="-2.819328031928647945e-05" iyy="0.00051934268155350092177" iyz="-0.00016904771834628737077" izz="0.00028021186492738437085" />
</inertial>
</link>
2023-06-12 07:52:34 +00:00
2023-06-13 08:02:56 +00:00
<!-- laser_link -->
<link name="${prefix}laser_link">
2023-06-12 08:57:49 +00:00
<visual>
2023-06-13 08:02:56 +00:00
<origin xyz="0 0 0" rpy="0 -0 0" />
2023-06-12 08:57:49 +00:00
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/laser_link_visual.stl"/>
2023-06-12 08:57:49 +00:00
</geometry>
2023-06-13 08:02:56 +00:00
<material name="laser_link_material">
<color rgba="0.49803921568627451677 0.49803921568627451677 0.49803921568627451677 1.0"/>
</material>
2023-06-12 08:57:49 +00:00
</visual>
<collision>
2023-06-13 08:02:56 +00:00
<origin xyz="0 0 0" rpy="0 -0 0" />
2023-06-12 08:57:49 +00:00
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/laser_link_collision.stl"/>
2023-06-12 08:57:49 +00:00
</geometry>
</collision>
2023-06-13 08:02:56 +00:00
<inertial>
<origin xyz="8.0502568807622093404e-21 2.7755575615628913511e-17 -0.01526549883836261258" rpy="0 0 0"/>
<mass value="0.065307030550339775776" />
<inertia ixx="1.578111853789072904e-05" ixy="-4.8590457654361857326e-53" ixz="1.0816309858643350309e-52" iyy="1.5781118537890654501e-05" iyz="9.8088682514084147142e-38" izz="1.9760068210357054465e-05" />
</inertial>
</link>
2023-06-12 08:12:38 +00:00
2023-06-13 08:02:56 +00:00
<!-- laser_joint -->
<joint name="${prefix}laser_joint" type="fixed">
2023-06-22 07:57:56 +00:00
<origin xyz="${base_length /2 -0.015 - base_offset} 0 0" rpy="0 0 0"/>
2023-06-13 08:02:56 +00:00
<parent link="${prefix}base_link" />
<child link="${prefix}laser_link" />
<axis xyz="0 0 1"/>
<limit effort="1" velocity="20" />
<joint_properties friction="0.0"/>
</joint>
<!-- camera_link -->
<link name="${prefix}camera_link">
2023-06-12 08:57:49 +00:00
<visual>
2023-06-13 08:02:56 +00:00
<origin xyz="0 0 0" rpy="0 -0 0" />
2023-06-12 08:57:49 +00:00
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/camera_link_visual.stl"/>
2023-06-12 08:57:49 +00:00
</geometry>
2023-06-13 08:02:56 +00:00
<material name="camera_link_material">
<color rgba="0.26274509803921569651 0.28235294117647058432 0.30196078431372547213 1.0"/>
</material>
2023-06-12 08:57:49 +00:00
</visual>
2023-06-13 08:02:56 +00:00
<collision>
<origin xyz="0 0 0" rpy="0 -0 0" />
<geometry>
2023-06-16 10:23:38 +00:00
<mesh filename="package://bot_mini_description/mesh/camera_link_collision.stl"/>
2023-06-13 08:02:56 +00:00
</geometry>
</collision>
2023-06-12 08:57:49 +00:00
<inertial>
2023-06-13 08:02:56 +00:00
<origin xyz="5.3378961738576549005e-07 0.0016484827975361887251 -0.020840554768345870285" rpy="0 0 0"/>
<mass value="0.064008494238512375629" />
<inertia ixx="1.7394518695567356026e-05" ixy="-4.87317899857206066e-10" ixz="-1.7982620680900958214e-11" iyy="3.2074360900148983727e-05" iyz="2.0892555595878115295e-06" izz="2.8321439372619354409e-05" />
</inertial>
</link>
2023-06-12 08:12:38 +00:00
2023-06-12 07:52:34 +00:00
2023-06-13 08:02:56 +00:00
<!-- Camera Joint -->
<joint name="${prefix}camera_joint" type="fixed">
2023-06-13 09:21:04 +00:00
<origin xyz="${base_length / 2 - base_offset} 0 0" rpy="0 0 ${PI}" />
2023-06-13 08:02:56 +00:00
<parent link="${prefix}base_link" />
<child link="${prefix}camera_link" />
<axis xyz="0 0 1"/>
<limit effort="1" velocity="20" />
<joint_properties friction="0.0"/>
</joint>
2023-06-01 08:30:59 +00:00
2023-06-01 09:08:40 +00:00
</xacro:macro>
2023-06-13 08:02:56 +00:00
</robot>