microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.22k stars 4.51k forks source link

Pan tilt on the Drone #2361

Open xlong0513 opened 4 years ago

xlong0513 commented 4 years ago

Hi, i want to adding pan-tilt on the drone to achieve a down-looking camera to capture images. I have got some inspirations from #539. First, i have set a camera 3(bottom_center) in setting files; second i use simSetCameraOrientation to achieve a the pan tilt. The attitude angles are all set as 0 to simulate down-looking effects. Part of the codes are as following screenshot. 2019-12-27 15-08-49

However, the captured images are still shaking with the drone? Can anyone tell us what's the matter?

Update

We have revised our code. We think the drone's altitude is affecting the camera, thus the orientation of the camera cannot be set to 0. So we got the current attitude of he drone and do a reverse rotation to the camera to achieve "pan tilt'. However, it still fail. The following is our new version code. 2019-12-27 16-27-50

ACLeighner commented 4 years ago

Hey I have a fix for the shaking drone, check it out over at: https://github.com/microsoft/AirSim/issues/1394#issuecomment-629936379

currently running into some weird issues with set camera orientation jumping around

nethtrick commented 4 years ago

Hello xlong0513,

I too have run into jittery camera issues - even after inverting the drone orientation. I have posted about it here:

https://github.com/microsoft/AirSim/issues/2595

I have not yet tried ACLeighner's solution but it sounds like they are still experiencing camera jitter issues. Hopefully between us we can figure this out!

xlong0513 commented 4 years ago

@ACLeighner @nethtrick Hi, there, thanks for the reply. However, I am now isolated at home now, and cannot work on it. When back to work, I will try the solution and reply.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity from the community in the last year. It will be closed if no further activity occurs within 20 days.