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

Add simDisableCamera API #2465

Closed
wants to merge 4 commits into from
Closed

Conversation

rajat2004
Copy link
Contributor

@rajat2004 rajat2004 commented Mar 19, 2020

Closes #2464, #2389

Without simDisableCamera-

$ python3 test_camera.py
Connected!
Client Ver:1 (Min Req: 1), Server Ver:1 (Min Req: 1)

Time spent for 30 frames: 0:00:01.008567
Time spent for 30 frames: 0:00:01.033204
Time spent for 30 frames: 0:00:01.029388
Time spent for 30 frames: 0:00:01.053637
Time spent for 30 frames: 0:00:01.059051
Time spent for 30 frames: 0:00:01.067620
Time spent for 30 frames: 0:00:01.054935
Time spent for 30 frames: 0:00:01.060000
Time spent for 30 frames: 0:00:01.040280
Time spent for 30 frames: 0:00:01.101260
Time spent for 30 frames: 0:00:01.060938
Time spent for 30 frames: 0:00:01.108110
Time spent for 30 frames: 0:00:01.150538
Time spent for 30 frames: 0:00:01.093519
Time spent for 30 frames: 0:00:01.060111
Time spent for 30 frames: 0:00:01.051841
High resolution image captured.
Time spent for 30 frames: 0:00:01.925659
Time spent for 30 frames: 0:00:02.788289
Time spent for 30 frames: 0:00:02.831024
Time spent for 30 frames: 0:00:02.813883

With simDisableCamera-

Time spent for 30 frames: 0:00:01.092915
Time spent for 30 frames: 0:00:01.057923
Time spent for 30 frames: 0:00:01.062711
Time spent for 30 frames: 0:00:01.062194
Time spent for 30 frames: 0:00:01.138591
Time spent for 30 frames: 0:00:01.090212
Time spent for 30 frames: 0:00:01.048497
Time spent for 30 frames: 0:00:01.060650
Time spent for 30 frames: 0:00:01.096157
Time spent for 30 frames: 0:00:01.049348
Time spent for 30 frames: 0:00:01.104762
Time spent for 30 frames: 0:00:01.102033
Time spent for 30 frames: 0:00:01.055395
Time spent for 30 frames: 0:00:01.097566
Time spent for 30 frames: 0:00:01.094629
Time spent for 30 frames: 0:00:01.138703
High resolution image captured.
Time spent for 30 frames: 0:00:01.414585
Time spent for 30 frames: 0:00:01.041129
Time spent for 30 frames: 0:00:01.139397
Time spent for 30 frames: 0:00:01.067039
Time spent for 30 frames: 0:00:01.041106
Time spent for 30 frames: 0:00:01.079655

Only Unreal Engine for now, problem in parsing the settings in Unity
Hiding the whitespace changes makes it much easier to review (Sorry for this, editor settings)

@rajat2004
Copy link
Contributor Author

Placeholder only in Unity for now since there are problems in Unity's settings parsing I think
Will also need to figure out how to implement this in Unity, more convoluted than Unreal currently

@madratman
Copy link
Contributor

Hmm, I think it would be ideal to handle this on C++ side itself, instead of asking the user to call a simDisableCamera?
Perhaps we can incorporate this in #2472 or after #2472 is in?
cc @ironclownfish

@rajat2004
Copy link
Contributor Author

Yes, it might be better to disable the camera right inside AirSim after getImage completes, but will need to test if there's any performace impact when a camera is being used continuously
Better to get this in after #2472 gets merged

@rajat2004
Copy link
Contributor Author

rajat2004 commented May 28, 2020

I've included a one-line fix for this as mentioned by @madratman in #2713, one main problem is that PR mostly won't get merged anytime soon
Seems to be 2 other options -

  1. Open another PR to apply the current one-line fix to current master, thereby not having the API (but probably will be more complex than 1 line)
  2. Rebase this PR which adds the API and requires user to use it

I prefer the 1st option, let me know which seems better

@rajat2004
Copy link
Contributor Author

Replaced by #2881

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