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

Clockspeed changes causes instability #901

Closed
Pierrolo opened this issue Mar 22, 2018 · 6 comments
Closed

Clockspeed changes causes instability #901

Pierrolo opened this issue Mar 22, 2018 · 6 comments
Labels

Comments

@Pierrolo
Copy link

Pierrolo commented Mar 22, 2018

Hello,

I am trying to use Airsim to apply RL to the drone.
My state input is the view from the front cam,
my action are a continuous vector : [+North , +East, Altitude, Yaw_rate] w.r.t. the view of the drone.
I am using the python API.
But I am wasting a lot of time because of wall clock = simulation clock. I tried changing the Clockspeed setting in setting.json ; but even just at "ClockSpeed": 2 the drone will become higly instable, it will shake a lot and eventually just fall on the ground on its own ... I tried using both ScalableClock and SteppableClock for clock_type , didn't help...
Does anyone have a solution?

My setup is Win10, i5 7300U, 2.60Ghz, 16go RAM (with a good old Intel(R) HD Graphics 620, but that shouldn't matter I guess)

Here is my drone's class. With function to get the states (picture), reward (based on collision) and how to move w.r.t. the drone referential, using moveByVelocityZ
environment_airsim.zip

Thank you for your help :)

@Pierrolo Pierrolo changed the title Clockspeed causes problems Clockspeed changes causes instability Mar 22, 2018
@Pierrolo
Copy link
Author

Hi,

So I tried on a new computer with i7 and GTX 1050 (4go) and even clockspeed at 2.0 causes the drone to shake and eventually crash on the floor, no matter what the action was...

Does anyone had a similar problem? I could really use some help please...

Thanks for everything

@sytelus
Copy link
Contributor

sytelus commented Apr 12, 2018

I'm working on enhancing this feature and will soon post about the progress.

@Pierrolo
Copy link
Author

Pierrolo commented Apr 12, 2018

Hi,
Thanks, that would be very very much appriciated! :)

In the meantime I managed to do somehting by following the instructions in Issue #660 proposed by @valtsblukis. By changing the PidController according to his patch and by changing SimModeBase::getPhysicsLoopPeriod() as follow:

long long ASimModeBase::getPhysicsLoopPeriod()
{
if (getSettings().usage_scenario == kUsageScenarioComputerVision)
return 2500000LL;
else
return 250000LL;
}

And by doing so I greatly reduced the instability, but there is stille quite a difference beetwen "ClockSpeed" : 1 and "ClockSpeed" : 10

@sytelus
Copy link
Contributor

sytelus commented Apr 13, 2018

Just fixed this issue. On a powerful desktop, I can run quadcopter simulation now at 100X clock speed!

@ghub-c
Copy link

ghub-c commented Apr 13, 2018

@sytelus It does not work for me...

New Neighborhood binaries show this when selecting quadrotor:

failairsim

@Pierrolo
Copy link
Author

Pierrolo commented Apr 13, 2018

I tried building it, and it didn't work. It showed this as error:


"C:\Documents\AirSim_build_2\AirSim-master\AirSim.sln" (cible par défaut) (1) ->
"C:\Documents\AirSim_build_2\AirSim-master\DroneShell\DroneShell.vcxproj" (cible par défaut) (2) ->
"C:\Documents\AirSim_build_2\AirSim-master\AirLib\AirLib.vcxproj" (cible par défaut) (3) ->
(ClCompile cible) ->
  c:\documents\airsim_build_2\airsim-master\airlib\include\common\clockbase.hpp(75): error C2220: avertissement considéré comme une erreur - aucun fichier 'object' généré [C:\Documen
ts\AirSim_build_2\AirSim-master\AirLib\AirLib.vcxproj]
  c:\documents\airsim_build_2\airsim-master\airlib\include\common\clockbase.hpp(75): error C2220: avertissement considéré comme une erreur - aucun fichier 'object' généré [C:\Documen
ts\AirSim_build_2\AirSim-master\AirLib\AirLib.vcxproj]
  c:\documents\airsim_build_2\airsim-master\airlib\include\common\clockbase.hpp(75): error C2220: avertissement considéré comme une erreur - aucun fichier 'object' généré [C:\Documen
ts\AirSim_build_2\AirSim-master\AirLib\AirLib.vcxproj]
  c:\documents\airsim_build_2\airsim-master\airlib\include\common\clockbase.hpp(75): error C2220: avertissement considéré comme une erreur - aucun fichier 'object' généré [C:\Documen
ts\AirSim_build_2\AirSim-master\AirLib\AirLib.vcxproj]
  c:\documents\airsim_build_2\airsim-master\airlib\include\common\clockbase.hpp(75): error C2220: avertissement considéré comme une erreur - aucun fichier 'object' généré [C:\Documen
ts\AirSim_build_2\AirSim-master\AirLib\AirLib.vcxproj]
  c:\documents\airsim_build_2\airsim-master\airlib\include\common\clockbase.hpp(75): error C2220: avertissement considéré comme une erreur - aucun fichier 'object' généré [C:\Documen
ts\AirSim_build_2\AirSim-master\AirLib\AirLib.vcxproj]
  c:\documents\airsim_build_2\airsim-master\airlib\include\common\clockbase.hpp(75): error C2220: avertissement considéré comme une erreur - aucun fichier 'object' généré [C:\Documen
ts\AirSim_build_2\AirSim-master\AirLib\AirLib.vcxproj]

Thank you very much for tryin' to tackle this problem :)

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