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

Customising Python API for FPV camera FOV control - (+simSetCameraFov function) #2379

Closed
ibrhm0v opened this issue Jan 14, 2020 · 10 comments
Closed

Comments

@ibrhm0v
Copy link
Contributor

ibrhm0v commented Jan 14, 2020

Hello @madratman I hope and think that you'll be the one to help me :)

I am currently working on a project where I need an controllable gimbal camera but with the additive of zoom function. I found out that I can zoom in and out of a view by altering field of view parameter of the camera. Therefore I have already done that in airSim. Now in my version, when FPV mode is entered with "F" key, the camera orientation can be controlled with WASDQE keys and its fov can be controlled with the arrow keys. Anyways, now I want to be able to do this using the API you provided. The camera orientation can already be configured using the simSetCameraOrientation.
So I started working on declaring and using a function called simSetCameraFov that function as its name implies but couldn't reach a point yet. So please your help would be appreciated. I will be working on it and I would like to post a merge request for an API update + the manual fpv gimbal control so the community can get use of it.

@ibrhm0v
Copy link
Contributor Author

ibrhm0v commented Jan 15, 2020

I am able to change FOV of the camera now using my simSetCameraFov function but something is updating the FOV back to settings.fov which is 90 degress by default. I cannot find the module that is reverting it back to 90deg.

@clovett @sytelus @madratman Can someone please guide me

@ibrhm0v
Copy link
Contributor Author

ibrhm0v commented Jan 16, 2020

I have solved it. Now I have successfully added simSetCameraFov function as api for FPV camera zoom control. I can post a pull request if anyone cares

@saihv
Copy link
Contributor

saihv commented Jan 21, 2020

A pull request would be very welcome!

@ibrhm0v
Copy link
Contributor Author

ibrhm0v commented Jan 21, 2020

@saihv okay I'll post a PR as soon as I finish up some cleaning in my code 👍

@alwynmathew
Copy link

alwynmathew commented Jan 30, 2020

what is the FOV you achieved? Will it be able to modify your setting to 180 degree fisheye camera?

@ibrhm0v
Copy link
Contributor Author

ibrhm0v commented Feb 7, 2020

I have limited it between 150degs to 20degs but the limits are customisable. I have seen 180 and the upside down view for degs above 180 (upto 360 I guess)

@alwynmathew
Copy link

@ibrahim0v Have you posted this PR yet? I need 180 degree Horizontal FOV, how would I do it? Any help would be appreciated.

@ibrhm0v
Copy link
Contributor Author

ibrhm0v commented Feb 7, 2020

I'll post a PR ASAP 👍

@rajat2004
Copy link
Contributor

#2534 has been merged which closes this

@ibrhm0v ibrhm0v closed this as completed May 12, 2020
@ibrhm0v
Copy link
Contributor Author

ibrhm0v commented May 12, 2020

thanks @rajat2004 I couldn't send my PR :) Yours is a better way anyways 👍

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

No branches or pull requests

4 participants