Trouble with origins of base_link and Joint in URDF

asked 2019-11-02 06:04:19 -0600

Yash gravatar image

updated 2019-11-02 09:14:05 -0600

gvdhoorn gravatar image

Hello, I am currently making a URDF for my Robot using Mecanum Wheels. The problem I am facing, is that even though I have given an offset to the origin of the wheel, the TF (Visualized in rviz) remains at the Origin of the Base_Link itself. Moreover, the wheel is not touching the ground. It is immersed in the ground plane and I do not why. I looked at previous answers on roswiki and on Gazebo forum too but I did not find any satisfactory solution. I would really appreciate any help I can get.

My URDF:

<?xml version="1.0" encoding="UTF-8"?>
<robot name="Auto_Bot">
    <material name="blue">
        <color rgba="0 0 0.8 1"/>
    </material>

    <material name="white">
        <color rgba="1 1 1 1"/>
    </material>

    <material name="red">
        <color rgba="1 0 0 1"/>
    </material>

    <link name="base_footprint"/>

    <joint name="base_joint" type="fixed">
        <parent link="base_footprint"/>
        <child link="base_link"/>
        <origin xyz="0 0 0.076" rpy="0 0 0"/>
    </joint>

    <link name="base_link">
        <visual>
            <geometry>
                <mesh filename="package://turtlebot3_description/meshes/Autonomous_Vehicle/meshes/V3_body_Assembly.stl" scale="0.02 0.02 0.02"/>
            </geometry>
            <material name="blue"/>
        </visual>
    </link>

    <link name="left_front_wheel">
        <visual>
            <geometry>
                <mesh filename="package://turtlebot3_description/meshes/Autonomous_Vehicle/meshes/V3_Wheel_Assembly.stl" scale="0.02 0.02 0.02"/>
            </geometry>
        </visual>
        <material name="red"/>
        <origin xyz="0.424 -0.5 0.076" rpy="0 0 0"/>
    </link>

    <joint name="base_to_left_rear" type="continuous">
        <parent link="base_link"/>
        <child link="left_front_wheel"/>
        <origin xyz="-0.025 0 0"/>
    </joint>
</robot>

image description

edit retag flag offensive close merge delete

Comments

The robot tag and the material tag is messed up. But I assure you that it is not like this in the file. So, that is not the problem.

Yash gravatar imageYash ( 2019-11-02 06:06:00 -0600 )edit

You have scaled it by 0.02! So maybe just try setting the offset of the wheel accordingly. Let me know, whether it works. For your second problem of body getting immersed. Try to use software like blender and check how the wheels are aligned over there. If it is aligned, then try to play around with the mass, inertia and stiffness values, to avoid the same, else, just try to align the wheel to the floors and then it should solve the problem.

pmuthu2s gravatar imagepmuthu2s ( 2019-11-04 04:33:56 -0600 )edit

Hey, What do you mean by setting the offset of the wheel by the scale 0.02? I did not understand. Sorry.

Yash gravatar imageYash ( 2019-11-05 00:51:58 -0600 )edit