Ask Your Question
1

ROS and Gazebo: problems when loading joint controllers

asked 2021-02-18 14:50:21 -0500

AndreaRoss gravatar image

updated 2021-02-24 12:40:15 -0500

I'm trying to control a gazebo robot using ros control but I have some problems after I load the joint controllers. This is the robot model before I load the controllers, the model seems to be correct (https://drive.google.com/file/d/1cd0w...) but when I load the joint controllers the model implodes on the origin (https://drive.google.com/file/d/1diBV...), the controller.launch it's not showing errors.

Why when I load the controllers the model implodes on the origin?

Edit:

This is my robot model (https://drive.google.com/file/d/1YKo-...), this is the inertia matrix of one joint

<inertia ixx="4.5e-05" ixy="-3e-06" ixz="1e-06" iyy="3e-05" iyz="5e-06" izz="3.6e-05"/>

I changed to <inertia ixx="0.16666700" ixy="0.0" ixz="0.0" iyy="0.16666700" iyz="0.0" izz="0.16666700" /> and now the robot it's moving like crazy around but when I launch the ros control the robot still moving around (it's not like before)... so now the question is how can I calculate the inertia values? I can get the some information from the fusion 360 model. For exemple this is a leg informations:

Leg1

Component instances (1)
Area    1.787E+04 mm^2
Density 9.520E-04 g / mm^3
Mass     66.794 g
Volume  7.016E+04 mm^3

Bounding box
    Length   150.172 mm
    Width    26.00 mm
    Height   35.00 mm
X, Y, Z global   0.00 mm, 0.00 mm, 0.00 mm
Center of mass  -68.611 mm, -83.519 mm, 118.34 mm

Moment of inertia at the center of mass   (g mm^2)
    Ixx = 7016.191
    Ixy = 1551.50
    Ixz = 15.726
    Iyx = 1551.50
    Iyy = 1.078E+05
    Iyz = -0.298
    Izx = 15.726
    Izy = -0.298
    Izz = 1.085E+05

Moment of inertia on origin   (g mm^2)
    Ixx = 1.408E+06
    Ixy = -3.812E+05
    Ixz = 5.423E+05
    Iyx = -3.812E+05
    Iyy = 1.358E+06
    Iyz = 6.602E+05
    Izx = 5.423E+05
    Izy = 6.602E+05
    Izz = 8.888E+05

Edit 1: I've calculeted the inertia values for the robot and I think i get correct values (https://drive.google.com/file/d/1puhu...) but the problem still... I've noticed that if I use bigger values the problem disappear, when I use the correct values (that are very small values) again I get the problem.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-02-20 02:46:17 -0500

updated 2021-02-22 18:49:05 -0500

That is when gazebo starts commanding the joints, which means there is something wrong with your model.

Without having any information on the model, all I can say is start by looking into your inertias. As a simple test, replace all inertias, for example, with the inertia of a unit box and observe what happens.

Edit:

The center of mass and inertia at the center of mass of each link from fusion 360 is exactly what you need (don't forget to correct for the dimensions). If you want to simplify things or you have any complications, the next best thing is to approximate the inertias with the inertias of the bounding boxes. And as a side note, you can visualize the inertias in gazebo. Their size should be around the size of the links.

Now, regarding the instability of the model. Check any physics parameters you might have set in the world description and any surface parameters for the links of the robot. As no information is provided, I'll suggest removing all parameters, gradually adding them back, and playing with the values, while ensuring the stability of the model. You'll probably have to go back and forth a few times.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-02-18 14:50:21 -0500

Seen: 85 times

Last updated: Feb 24