AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

How to extract Gimbal Orientation?

Open Omar-Elmofty opened this issue 6 years ago • 2 comments

I am using active gimbal stabalization in airsim to stabalize my camera while flying (below are my camera settings that I am using). I'd like to extract the gimbal orientation (relative to the drone's base frame) in realtime while the vehicle is flying, I basically want to know where the camera is relative to the body of the drone at all time. I am wondering how to do that? (I'd like to eventully publish the gimbal orientation to a ros topic)

"front_right_custom": { "CaptureSettings": [ { "PublishToRos": 1, "ImageType": 0, "Width": 672, "Height": 376, "FOV_Degrees": 90, "TargetGamma": 1.5 } ], "Gimbal": { "PublishToRos": 1, "Stabilization": 1, "Pitch": -30, "Roll": 0 }, "X": 0, "Y": 0.06, "Z": 0.2, "Pitch": 0, "Roll": 0, "Yaw": 0

Omar-Elmofty avatar Jun 13 '20 21:06 Omar-Elmofty

Have you tried using simGetCameraInfo

rajat2004 avatar Jun 14 '20 04:06 rajat2004

you can try this:

change

"Gimbal": { "PublishToRos": 1, "Stabilization": 1, "Pitch": -30, "Roll": 0 } to

"Gimbal": { "PublishToRos": 1, "Stabilization": 1 }

ZGX010 avatar Feb 02 '21 03:02 ZGX010