Home | Tutorials | Wiki | Issues
Ask Your Question
0

What did I miss from my model?

asked 2017-02-08 01:56:02 -0600

ThangNguyen gravatar image

updated 2017-02-08 02:05:06 -0600

Hi, I am trying to create a different drive mobile robot model. Could you please tell me what did I miss from my model which make the wheel go though the ground?

Beside that I need help to verify if the way I use origin correct or not.

C:\fakepath\Screenshot from 2017-02-08 03-04-20.png

Thank you very much for your help.

Below is my file

<?xml version="1.0"?>

<!-- Add Mass + Inertia-->
<robot name="differential_drive_robot">
    <material name="Black">
            <color rgba="0.0 0.0 0.0 1.0"/>
    </material>
    <material name="Red">
            <color rgba="0.8 0.0 0.0 1.0"/>
    </material>
    <material name="White">
            <color rgba="1.0 1.0 1.0 1.0"/>
    </material>
    <material name="Blue">
            <color rgba="0.0 0.0 0.8 1.0"/>
    </material>

    <link name="base_link">
        <visual>
            <origin xyz="0.0 0.0 0.04"/>
            <geometry>
                <cylinder length="0.02" radius="0.15"/>
            </geometry>
            <material name="White"/>
        </visual>
        <collision>
            <origin xyz="0.0 0.0 0.04"/>
            <geometry>
                <cylinder length="0.02" radius="0.15"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="5"/>
            <inertia ixx="0.0282916666667" ixy="0" ixz="0" iyy="0.0282916666667" iyz="0" izz="0.05625"/>
        </inertial>
    </link>

    <gazebo reference="base_link">
        <material>Gazebo/Gray</material>
    </gazebo>

    <joint name="right_wheel_joint" type="continuous">
        <origin xyz="0.15 0.0 0.04"/>
        <parent link="base_link"/>
        <child link="right_wheel"/>
        <axis xyz="1 0 0" />
    </joint>

    <link name="right_wheel">
        <visual>
            <origin xyz="0.0 0.0 0.0" rpy="0 1.57075 0"/>
            <geometry>
                <cylinder length="0.02" radius="0.04"/>
            </geometry>
        </visual>
        <collision>
            <geometry>
                <cylinder length="0.02" radius="0.04"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="2.5"/>
            <inertia ixx="0.002" ixy="0" ixz="0" iyy="0.001083" iyz="0" izz="0.001083"/>
        </inertial>
    </link>

    <gazebo reference="right_wheel">
        <material>Gazebo/Orange</material>
    </gazebo>

    <joint name="left_wheel_joint" type="continuous">
        <origin xyz="-0.15 0.0 0.04"/>
        <parent link="base_link"/>
        <child link="left_wheel"/>
        <axis xyz="1 0 0" />
    </joint>

    <link name="left_wheel">
        <visual>
            <origin xyz="0.0 0.0 0.0" rpy="0 1.57075 0"/>
            <geometry>
                <cylinder length="0.02" radius="0.04"/>
            </geometry>
        </visual>
        <collision>
            <geometry>
                <cylinder length="0.02" radius="0.04"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="2.5"/>
            <inertia ixx="0.002" ixy="0" ixz="0" iyy="0.001083" iyz="0" izz="0.001083"/>
        </inertial>
    </link>

    <gazebo reference="left_wheel">
        <material>Gazebo/Orange</material>
    </gazebo>

    <joint name="front_caster_joint" type="fixed">
        <origin xyz="0.0 0.12 0.016"/>
        <parent link="base_link"/>
        <child link="front_caster"/>
    </joint>

    <link name="front_caster">
        <visual>
            <geometry>
                <sphere radius="0.014"/>
            </geometry>
            <material name="Blue"/>
        </visual>
        <collision>
            <geometry>
                <sphere radius="0.014"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="2.5"/>
            <inertia ixx="0.000125" ixy="0" ixz="0" iyy="0.000125" iyz="0" izz="0.000125"/>
        </inertial>
    </link>

    <joint name="rear_caster_joint" type="fixed">
        <origin xyz="0.0 -0.12 0.016"/>
        <parent link="base_link"/>
        <child link="rear_caster"/>
    </joint>

    <link name="rear_caster">
        <visual>
            <geometry>
                <sphere radius="0.014"/>
            </geometry>
            <material name="Blue"/>
        </visual>
        <collision>
            <geometry>
                <sphere radius="0.014"/>
            </geometry ...
(more)
edit retag flag offensive close merge delete

Comments

Please give me advice on if I use origin correct or not, since I am learning. Thank you.

ThangNguyen gravatar imageThangNguyen ( 2017-02-08 11:26:18 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-02-14 06:08:20 -0600

TTDM gravatar image

Can you try adding your origin bloc to the collision too ? At the moment, you are indeed seing verticals wheels (cylinders) but the collision block is not checking thoses verticals cylinder but some horizontal ones.

edit flag offensive delete link more

Comments

Try visualizing collisions, inertia, and contacts in the Gazebo GUI. These visual should debug a model problem.

nkoenig gravatar imagenkoenig ( 2017-02-14 09:11:56 -0600 )edit

Thank you very much for your answer.

ThangNguyen gravatar imageThangNguyen ( 2017-02-14 23:10:58 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-02-08 01:56:02 -0600

Seen: 80 times

Last updated: Feb 14