microsoft / AirSim

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

Gimbal drift in multirotor #2140

Open heleidsn opened 4 years ago

heleidsn commented 4 years ago

Dear all,

I am doing reinforcement learning work with multirotor. To get a stable image as input of the network, I set the gimbal and stable the Pitch and Roll of the camera. But I find that the gimbal always drifts after hundreds of episodes as shown in the following picture. Note: one of the arms always appears in the image and I don't set the gimbal for Yaw.

I reset the multirotor using resetClient() at each end of the episode but it seems doesn't work with the gimbal and leads to a small accumulated drift.

image

My setting of Camera:

"CameraDefaults": {
      "CaptureSettings": [
        {
          "ImageType": 0,
          "Width": 640,
          "Height": 280,
          "FOV_Degrees": 90,
          "AutoExposureSpeed": 100,
          "AutoExposureBias": -1,
          "AutoExposureMaxBrightness": 0.40,
          "AutoExposureMinBrightness": 0.03,
          "MotionBlurAmount": 0,
          "TargetGamma": 1.0,
          "ProjectionMode": "",
          "OrthoWidth": 5.12
        }
      ],
      "Gimbal": {
        "Stabilization": 1,
        "Pitch": 1,
        "Roll": 1
      }
    }

OS:windows 10 AirSim: V1.2.2 master Python:3.6.5 Unreal version:4.22.2

Does anyone have the same problem using the gimbal module? Is there any way to solve this problem?

Thank you very much!

ironclownfish commented 4 years ago

We can look into this. Can you please share the full settings file so we can make sure our conditions are exactly the same?

heleidsn commented 4 years ago

Thanks for your reply! This is the full setting file:

"SettingsVersion": 1.2,
"SimMode": "Multirotor",
"ClockSpeed": 1,
"EngineSound": false,

"Recording": {
  "RecordOnMove": true,
  "RecordInterval": 0.05,
  "Cameras": [
    {
      "CameraName": "0",
      "ImageType": 0,
      "PixelsAsFloat": false,
      "Compress": true
    }
  ]
},

"CameraDefaults": {
  "CaptureSettings": [
    {
      "ImageType": 0,
      "Width": 640,
      "Height": 280,
      "FOV_Degrees": 90,
      "AutoExposureSpeed": 100,
      "AutoExposureBias": -1,
      "AutoExposureMaxBrightness": 0.40,
      "AutoExposureMinBrightness": 0.03,
      "MotionBlurAmount": 0,
      "TargetGamma": 1.0,
      "ProjectionMode": "",
      "OrthoWidth": 5.12
    }
  ],
  "Gimbal": {
    "Stabilization": 1,
    "Pitch": 1,
    "Roll": 1
  }
},

"Vehicles": {
  "ComputerVision": {
    "VehicleType": "SimpleFlight"
    }
  }

I just want to stabilize the pitch and roll axis in setting file. The multirotor is reset using client.reset() API when it crashes to obstacles.

patnolan33 commented 4 years ago

I have seen the same issue with a similar setup for gimbal stabilization (i.e. full pitch and roll stabilization, no yaw stabilization). The issue seems to happen quicker when running with ClockSpeed set to greater than 1.

DanielGilo commented 3 years ago

We face the same issue. We only want to stabilize the drone for pitch and roll (we don't want yaw stabilization) for the bottom_center camera (the one that looks down). But when omitting the yaw from the settings.json (only specifying roll and pitch for the gimbal), the camera's yaw moves in an unstable way - doesn't follow the drone's orientation.

image

If the settings are this way, we get stabilization on yaw (not what we want).

image

This is supposed to be what we what we want, but as we said the yaw in this case "goes crazy", we just want it to follow the drone's orientation.

Is there any solution?

Zartris commented 3 years ago

We face the same issue. We only want to stabilize the drone for pitch and roll (we don't want yaw stabilization) for the bottom_center camera (the one that looks down). But when omitting the yaw from the settings.json (only specifying roll and pitch for the gimbal), the camera's yaw moves in an unstable way - doesn't follow the drone's orientation.

image

If the settings are this way, we get stabilization on yaw (not what we want).

image

This is supposed to be what we what we want, but as we said the yaw in this case "goes crazy", we just want it to follow the drone's orientation.

Is there any solution?

I think this is something separate and you should make a new thread for this. I have the exact same problem, but i have no solution yet.

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.

msmcconnell commented 6 months ago

This is still an active issue for me (exactly as other describe above). Has there been any movement on it?

jprodriguezg commented 3 months ago

I have the same issue reported above. The issue is still active. It seems like the gimbal functionality only works while stabilizing all three rotation axes. I am wondering if someone is working on a solution.