0
$\begingroup$

I'm trying to run a simulation in gazebo fortress for reinforcement learning. I can't set the step size. My sdf file looks like this:

<sdf version="1.5">
<world name="rl_world">
    <include>
        <uri>/path/to/terrain.sdf</uri>
    </include>
    <include>
        <uri>/path/to/robot.urdf</uri>
    </include>
    <plugin filename="libignition-gazebo6-contact-system" name="ignition::gazebo::systems::Contact" />
    <plugin filename="libignition-gazebo6-physics-system" name="ignition::gazebo::systems::Physics">
        <max_step_size>0.01</max_step_size>
        <real_time_update_rate>100</real_time_update_rate>
        <real_time_factor>-1</real_time_factor>
    </plugin>
    <plugin filename="libignition-gazebo6-scene-broadcaster-system" name="ignition::gazebo::systems::SceneBroadcaster" />
</world>

But in gazebo I see this:

screenshot of gazebo GUI  with step size set to 0.001

I'm also unable to change those values - they immediately revert to the defaults. I'm not seeing any error messages when I run gazebo with "-v 4".

It also uses that step size (0.001) when I run gazebo via the c++ api as part of my RL algorithm.

$\endgroup$

1 Answer 1

1
$\begingroup$

You have added the max_step_size, real_time_update_rate and real_time_factor parameters to the Physics system's XML <plugin/> block, but these parameters should be added to a <physics/> XML block as a child of the <world/> element. See one of the example worlds from gz-sim for reference:

https://github.com/gazebosim/gz-sim/blob/gz-sim7/examples/worlds/empty.sdf#L64-L67

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.