aquanaute_description.urdf.xacro 7.42 KB
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro" name="aquanaute">

    <material name="blue">
        <color rgba="0 0 0.8 1"/>
    </material>
    <material name="red">
        <color rgba="0.8 0 0 1"/>
    </material>
    <material name="green">
        <color rgba="0 0.8 0 0.5"/>
    </material>
    <material name="cyan">
        <color rgba="0 0.6 0.6 1"/>
    </material>
    <material name="yellow">
        <color rgba="0.8 0.8 0 1"/>
    </material>
    <material name="purple">
        <color rgba="0.5 0 0.5 1"/>
    </material>
    <material name="white">
        <color rgba="1 1 1 1"/>
    </material>
    <material name="gray">
        <color rgba="0.35 0.35 0.35 1"/>
    </material>
    <material name="black">
        <color rgba="0 0 0 1"/>
    </material>

    <!-- * * * Link Definitions * * * -->
    <link name="base_link">
        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <sphere radius="0.001"/>
            </geometry>
            <material name="blue"/>
        </visual>
    </link>

    <link name="platform_link">
        <inertial>
            <origin xyz="-0.024 0 -0007" rpy="0 0 0"/>
            <mass value="16"/>
            <inertia ixx="4.206" ixy="0.0" ixz="-0.031" iyy="4.588" iyz="0.0" izz="8.785"/>
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Platform.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Platform.stl"/>
            </geometry>
            <material name="yellow"/>
        </visual>
    </link>

    <link name="right_hull_link">
        <inertial>
            <origin xyz="-0.124 0 -0.168" rpy="0 0 0"/>
            <mass value="10.45"/>
            <inertia ixx="0.244" ixy="3.346" ixz="0.009" iyy="4.974" iyz="-8.274" izz="4.965"/>
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Hull.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Hull.stl"/>
            </geometry>
            <material name="red"/>
        </visual>
    </link>

    <link name="left_hull_link">
        <inertial>
            <origin xyz="-0.124 0 -0.168" rpy="0 0 0"/>
            <mass value="10.45"/>
            <inertia ixx="0.244" ixy="3.346" ixz="0.009" iyy="4.974" iyz="-8.274" izz="4.965"/>
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Hull.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Hull.stl"/>
            </geometry>
            <material name="red"/>
        </visual>
    </link>

    <link name="motor_link">
        <inertial>
            <origin xyz="-0.133 0 -0.391" rpy="0 0 0"/>
            <mass value="6.6"/>
            <inertia ixx="0.072" ixy="3.604" ixz="-0.011" iyy="0.111" iyz="5.484" izz="0.042"/>
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Motor.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Motor.stl"/>
            </geometry>
            <material name="black"/>
        </visual>
    </link>

    <link name="propeller_link">
        <inertial>
            <origin xyz="-0.034 0 0" rpy="0 0 0"/>
            <mass value="0.233"/>
            <inertia ixx="1.441e-04" ixy="4.406e-09" ixz="0.00" iyy="1.760e-04"	iyz="2.373e-06" izz="1.961e-04"/>
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Propeller.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Propeller.stl"/>
            </geometry>
            <material name="blue"/>
        </visual>
    </link>

    <link name="sensor_frame_link">
        <inertial>
            <origin xyz="-0.007 0 0.379" rpy="0 0 0"/>
            <mass value="1.8"/>
            <inertia ixx="0.308" ixy="0.00" ixz="0.007" iyy="0.297" iyz="0.00" izz="0.022"/>
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/sensor_frame.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/sensor_frame.stl"/>
            </geometry>
            <material name="white"/>
        </visual>
    </link>

    <link name="imu_link">
        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <cylinder radius="0.04" length="0.05"/>
            </geometry>
            <material name="cyan"/>
        </visual>
    </link>

    <!-- * * * Joint Definitions * * * -->
    <joint name="platform_base_joint" type="fixed">
        <parent link="base_link"/>
        <child link="platform_link"/>
        <origin xyz="0 0 0.35" rpy="0 0 0"/>
    </joint>

    <joint name="right_hull_platform_joint" type="fixed">
        <parent link="platform_link"/>
        <child link="right_hull_link"/>
        <origin xyz="-0.05 -0.7 -0.036" rpy="0 0 0"/>
    </joint>

    <joint name="left_hull_platform_joint" type="fixed">
        <parent link="platform_link"/>
        <child link="left_hull_link"/>
        <origin xyz="-0.05 0.7 -0.036" rpy="0 0 0"/>
    </joint>

    <joint name="motor_platform_joint" type="revolute">
        <parent link="platform_link"/>
        <child link="motor_link"/>
        <origin xyz="-0.91 0.0 -0.09" rpy="0 0 0"/>
        <axis xyz="0 0 1"/>
        <limit effort="-1" velocity="-1" lower="-0.9" upper="0.9"/>
        <dynamics damping="0.0000001"/>
    </joint>

    <joint name="propeller_motor_joint" type="revolute">
        <parent link="motor_link"/>
        <child link="propeller_link"/>
        <origin xyz="-0.265 0 -0.42" rpy="0 0 0"/>
        <axis xyz="1 0 0"/>
        <limit effort="-1" velocity="-1" lower="-1e+16" upper="1e+16"/>
        <dynamics damping="0.0000001"/>
    </joint>

    <joint name="sensor_frame_platform_joint" type="fixed">
        <parent link="platform_link"/>
        <child link="sensor_frame_link"/>
        <origin xyz="-0.55 0.0 0.0" rpy="0 0 0"/>
    </joint>

    <joint name="imu_platform_joint" type="fixed">
        <parent link="platform_link"/>
        <child link="imu_link"/>
        <origin xyz="0 0 0.02" rpy="0 0 0"/>
    </joint>
</robot>