rtv / Stage

Mobile robot simulator
rtv.github.com/Stage
GNU General Public License v2.0
399 stars 175 forks source link

Unable to set 'speedup' running headless (ie. --gui) #89

Open jacobperron opened 6 years ago

jacobperron commented 6 years ago

We can set the desired real-time factor (aka. speedup) by placing the following in our world file:

    # Set 10x real-time
    speedup 10 

But this seems to only work when running with the GUI enabled. As soon as I run headless (e.g. stage --gui my.world), the simulation seems to run as fast as possible (as if speedup 0 was set).

It would be nice to be able to set the speedup factor regardless of whether the GUI is enabled. This would allow running headless simulations with distributed systems (e.g. ROS) with processes that may not be able to keep up with how fast the simulation is progressing.

rtv commented 6 years ago

That’s an interesting use case I’ve never considered. Will think about it.

On Wed, Apr 25, 2018 at 6:03 PM Jacob Perron notifications@github.com wrote:

We can set the desired real-time factor (aka. speedup) by placing the following in our world file:

# Set 10x real-time
speedup 10

But this seems to only work when running with the GUI enabled. As soon as I run headless (e.g. stage --gui my.world), the simulation seems to run as fast as possible (as if speedup 0 was set).

It would be nice to be able to set the speedup factor regardless of whether the GUI is enabled. This would allow running headless simulations with distributed systems (e.g. ROS) with processes that may not be able to keep up with how fast the simulation is progressing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rtv/Stage/issues/89, or mute the thread https://github.com/notifications/unsubscribe-auth/AACCnbW-GNXVi4ykjswQ8RA6sbo0cLFoks5tsRzkgaJpZM4TkXj2 .

-- Sent from a mobile gadget

tylertian123 commented 1 month ago

This would definitely be useful. I had an issue where the GUI was extremely slow on larger maps, but I was also using it with ROS so running headless at full speed would be unideal. I'm not sure if this project is still being maintained but I made a PR that adds support for speedup in headless. Hope someone finds this useful!