Airsim: Customising Python API for FPV camera FOV control - (+simSetCameraFov function)

Created on 14 Jan 2020  ·  10Comments  ·  Source: microsoft/AirSim

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.

feature request

Most helpful comment

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

All 10 comments

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

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

A pull request would be very welcome!

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

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

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)

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

I'll post a PR ASAP :+1:

https://github.com/microsoft/AirSim/pull/2534 has been merged which closes this

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mayankm96 picture Mayankm96  ·  4Comments

p3jawors picture p3jawors  ·  3Comments

Kim-BongSu picture Kim-BongSu  ·  3Comments

sinanonur picture sinanonur  ·  3Comments

machenxiang picture machenxiang  ·  3Comments