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

Synchronous simContinueForTime? #2285

Closed
ANogin opened this issue Oct 30, 2019 · 6 comments
Closed

Synchronous simContinueForTime? #2285

ANogin opened this issue Oct 30, 2019 · 6 comments
Labels

Comments

@ANogin
Copy link

ANogin commented Oct 30, 2019

The typical use of simContinueForTime (including in AirSim's own examples) seems to be to immediately sleep for just a bit longer than the simContinueForTime argument (ideally also accounting for ClockSpeed/etc). This seems both unnecessary, unnecessarily slow (if the extra sleep is largish), error-prone (if the extra sleep is not enough, if the clock speed is not accounted for, etc). Would it be possible to have a synchronous version of simContinueForTime that would simply block until after the sim is done?

@yannbouteiller
Copy link

yannbouteiller commented Nov 3, 2019

You can implement a kinda synchronous version of simContinueForTime() by doing this, even though this is not very satisfactory: microsoft/AirSim-NeurIPS2019-Drone-Racing#17 (comment)

@madratman
Copy link
Contributor

Hey @ANogin, can you give #2292 a shot?
simPause should now actually pause everything. I'm leaning towards removing simContinueForTime() and let the user just have simPause(True) and simPause(False) (or well simPause() and simUnpause().
cc @sytelus

@ANogin
Copy link
Author

ANogin commented Nov 5, 2019

Hey @ANogin, can you give #2292 a shot?
simPause should now actually pause everything. I'm leaning towards removing simContinueForTime() and let the user just have simPause(True) and simPause(False) (or well simPause() and simUnpause().
cc @sytelus

I do not see how that would help at all - what I want is to run the simulator for a specified amount of simulated time, and then have it pause and tell me when it is done.

@madratman
Copy link
Contributor

@ANogin, gotcha. I updated the API to do that. Can you give it a shot now? Also, see discussion here microsoft/AirSim-NeurIPS2019-Drone-Racing#113 (comment)

@yannbouteiller
Copy link

@ANogin, gotcha. I updated the API to do that. Can you give it a shot now? Also, see discussion here microsoft/AirSim-NeurIPS2019-Drone-Racing#113 (comment)

Sorry @madratman but I didn't see this comment, do you mean that SimContinueForTime() has been updated from using the CPU time to using the simulated time ?

@yannbouteiller
Copy link

(Oh my bad you only made it synchronous, right?)

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

No branches or pull requests

4 participants