AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

API improvement: Independent gimbal angle control

Open ibrahim-aydin opened this issue 3 years ago • 5 comments

Context

Improving pythonclient, rpc and unreal apis to allow independent control of each gimbal angle. This update allows the control of each gimbal angle separately for a given camera. Therefore we won't need to pass a Pose struct for every and every gimbal control action. This will minorly improve performance and increase camera control flexibility. Docs update is also included in this PR

How Has This Been Tested?

Tested through a simple gimbal control python script

ibrahim-aydin avatar May 17 '22 11:05 ibrahim-aydin

IMHO it's not really worth it adding extra APIs just for controlling one specific parameter, going this way will lead to explosion in number of APIs. Do you have any numbers for the performance improvement, doubt there would be much difference. If the current pose API doesn't handle controlling independent angles, maybe it can be enhanced to only apply non-zero control values. But zero pitch or roll is also valid and something which the user wants to apply, maybe an optional argument (like a bitset), indicating which clause the user wants to control? Wdyt

rajat2004 avatar May 19 '22 04:05 rajat2004

I agree with you. But for a gimbal, as most real gimbal controller APIs allow, controlling each angle separately would be useful. Tracking an object during maneuver can be given as an example. This helped me in my application. I thought it would be good to help others too. By the way your idea also sounds positive to me, advancing the simSetCameraPose by adding a typemask argument to select control of position and each angle would also be good. But might increase complexity for the user. I can update my implementation that way. Your opinions would be appreciated

ibrahim-aydin avatar May 23 '22 14:05 ibrahim-aydin

@rajat2004 Any thoughts on this?

ibrahim-aydin avatar May 30 '22 13:05 ibrahim-aydin

Sorry, missed the reply. Bitmask seems to be the better option to me atleast. What do you think @zimmy87 @jonyMarino

rajat2004 avatar Jun 01 '22 05:06 rajat2004

Thanks for the contribution and the debate. I think the current implementation is ok. I would refactor the client APIs to get objects with specialized APIs (for example, for cameras). But that is out of the scope of this contribution. I will continue thinking about this.

jonyMarino avatar Jun 21 '22 19:06 jonyMarino