Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dingo moves bakwards when I mount another model on top of it #4

Open
rafaelrgb opened this issue Sep 24, 2020 · 5 comments
Open

Dingo moves bakwards when I mount another model on top of it #4

rafaelrgb opened this issue Sep 24, 2020 · 5 comments

Comments

@rafaelrgb
Copy link

Hello,

I'm using the Dingo simulation for a project in which I have a metal structure with 2 cameras mounted on top of a rover (right now it is a Jackal, but we will switch to a Dingo when we receive the robot). I created a new URDF file in which I include the dingo-d model and then connect it to the metal structure model through a joint. You can see how it looks like in the attached picture. However, when I launch the simulation, the Dingo slowly moves backwards, even though there is no command being sent to the robot. I tried different payloads on top of the robot and this issue always happens, and it moves faster the biggest the payload's mass. This doesn't happen if I spawn only the Dingo. I hope you may have some idea of why this is happening.

dingo_realsense

@civerachb-cpr
Copy link
Contributor

Can you please provide us with the URDF file you're using so that we can attempt to diagnose the issue on our end?

@rafaelrgb
Copy link
Author

Sure. Below is my URDF. For simplicity, I've omitted the cameras and replaced the mesh in the visual tag for a box. The issue still happens under these conditions.

<?xml version="1.0"?>
<robot name="dingo_realsense" xmlns:xacro="http://www.ros.org/wiki/xacro">

  <!-- URDF definition for the dingo robot -->
  <xacro:include filename="$(find dingo_description)/urdf/dingo-d.urdf.xacro" />

  <joint name="support_joint" type="fixed">
    <parent link="chassis_link" />
    <child link="turret_link" />
    <origin xyz="0 0 0.097" rpy="0 0 0"/>
  </joint>

  <!-- Turret Support model -->
  <xacro:property name="mass" value="3.0" />

    <link name="turret_link">
        <visual>
            <origin xyz="0 0 0.2095" rpy="0 0 0" />
            <geometry>
                <box size="0.385 0.206 0.419" />
            </geometry>
        </visual>
        <collision>
            <origin xyz="0 0 0.2095" rpy="0 0 0" />
            <geometry>
                <box size="0.385 0.206 0.419" />
            </geometry>
        </collision>
        <inertial>
            <origin xyz="0 0 0.2095" rpy="0 0 0" />
            <mass value="${mass}" />
            <inertia ixx="${0.03653 * mass}" ixy="0" ixz="0" iyy="${0.04452 * mass}" iyz="0" izz="${0.02055 * mass}" />
        </inertial>
    </link>

    <gazebo reference="turret_link">
        <material>Gazebo/FlatBlack</material>
    </gazebo>

    <link name="cameras_mount_link" />
    <link name="gen3_mount_link" />

    <joint name="turret_to_cameras_joint" type="fixed">
        <parent link="turret_link"></parent>
        <child link="cameras_mount_link"></child>
        <origin xyz="0.1659 0 0.3828" rpy="0 0 0" />
    </joint>

    <joint name="turret_to_gen3_joint" type="fixed">
        <parent link="turret_link"></parent>
        <child link="gen3_mount_link"></child>
        <origin xyz="0.0125 0 0.3984" rpy="0 0 0" />
    </joint>

</robot>

@civerachb-cpr
Copy link
Contributor

We've seen this sort of behaviour a lot with various differential-drive wheeled robots. It seems to be due to a strange interaction with how the friction coefficients for the wheels & ground-plane interact to enable skid-steering. Adding accessories with inertia changes the robot's center of mass enough that this glitch creeps in. The fact that the higher-mass payloads you add the worse the problem gets seems to corroborate this.
If you comment out the <inertial> tag the drift problem seems to go away. It does in my brief testing anyway. We're still investigating exactly why this issue seems to happen with skid-steering robots, but for now I would advise either lowering the mass to 0 or eliminating the inertial tag completely as a work-around.

@rafaelrgb
Copy link
Author

Thank you for your answer. I removed the <inertial> tag as you said and in fact the issue stopped happening. This will serve as a work-around for now, but soon we plan to mount a robotic arm on top of that support and in that case I won't be able to just remove the inertia, so I'll still need to invest more time on this. I'll keep you posted in case we find more information about this issue, and maybe hopefully a solution.

By the way, maybe not relevant because it's not a skid-steering robot, but I also had an identical setup before with a Jackal robot instead of a Dingo, but this problem didn't happen for the Jackal.

@civerachb-cpr
Copy link
Contributor

The Jackal is also a skid-steering robot. We've had reports from other customers of this sort of problem happening with Jackal and Husky, so it's a fairly widespread bug. I suspect the higher mass of those robots helps mitigate the payload problems. Those robots also have 4 wheels instead of 2 + a caster, so that may add enough additional friction to compensate in your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants