Gazebo | Ignition | Community
Ask Your Question
0

Is joint velocity limited?

asked 2020-05-13 15:10:04 -0500

zenzu gravatar image

I am trying to control drone model from scratch, although the joint speed is limited to 100 rad/s. I tried ros_control, creating custom plugin, mechanicalReduction, changing/deleting limits in URDF... but I cannot get higher speed than 100 rad/s.

Also is it possible to fly with drones without any plugin related to aerodynamics laws?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-03-25 09:24:41 -0500

Marc gravatar image

The problem is on Gazebo's side when you are using Gazebo's ODE default physics engine. Here is a quick fix that works for me.

In the sdf file describing your Gazebo simulation environment, you need to set the "physics-->ode-->constraints-->contact_max_correcting_vel" parameter to correspond to the maximum angular speed (rad/s) of any joint you wish to simulate. For instance, for a maximum angular speed of 10000.0 rad/s, a simple working example of an sdf file would be

<?xml version="1.0" ?>
<sdf version="1.5">
    <world name="default">
        <physics name='default_physics' default='0' type='ode'>
            <max_step_size>0.001</max_step_size>
            <real_time_factor>1</real_time_factor>
            <real_time_update_rate>1000</real_time_update_rate>
            <ode>
                <constraints>
                <contact_max_correcting_vel>10000.0</contact_max_correcting_vel>
                </constraints>
            </ode>
        </physics>
        <!-- A global light source -->
        <include>
            <uri>model://sun</uri>
        </include>
        <!-- A ground plane -->
        <include>
            <uri>model://ground_plane</uri>
        </include>
    </world>
</sdf>

This is a weird workaround, because according to the SDFormat specifications , the "contact_max_correcting_vel" parameter corresponds to the maximum correcting velocities allowed when resolving contacts (and has a default value of 100). This has arguably nothing to do with the maximum angular speed of the joints in a model.

Then in Gazebo's documentation, it is pointed out that

contact_max_correcting_vel This is the same parameter as the max_vel under collision->surface->contact. contact_max_correcting_vel sets max_vel globally.

Again, setting contact_max_correcting_vel should have nothing to do with the maximum angular speed of joints in the model, but I suspect that the global value set for max_vel is also used by ODE's physics engine as the default maximum angular speed for new bodies. For more details, check out the "dWorldSetMaxAngularSpeed" function in ODE's manual.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-05-13 15:10:04 -0500

Seen: 41 times

Last updated: May 13 '20