Skip to content

Airsim camera yaw angle is negative of Unity quadrotor pose yaw #4902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sandilyasg opened this issue Nov 7, 2023 · 0 comments
Open

Airsim camera yaw angle is negative of Unity quadrotor pose yaw #4902

sandilyasg opened this issue Nov 7, 2023 · 0 comments

Comments

@sandilyasg
Copy link

Question

Why is the Airsim camera yaw angle negative of Unity quadrotor pose yaw?

Include context on what you are trying to achieve

I am using the C++ Image API, particularly the simGetImages API. My quadrotor in Unity has a yaw angle of +45 degrees. However, when I view the RGB, depth, and semantic segmentation frames, they are in exactly -1*Unity yaw angle that I set for my quadrotor. Is this because Airsim uses the NED coordinate system, but Unity uses DirectX convention (left-handed Y-up)? I have included images below to explain my question.

Context details

OS: Linux Ubuntu 18.04
Airsim: latest release
Python version: n/a
Unity editor version: 2021.3.31f1

{   
    "SeeDocsAt" : "https://github.com/Microsoft/AirSim/blob/main/docs/settings.md",
    "SettingsVersion": 1.2,
    "SimMode": "Multirotor",

    "Vehicles": {
        "Drone1": {
          "VehicleType": "SimpleFlight",
          "X": -69.38, "Y": 5.0, "Z": -177.74,"Yaw": 0
        },
        "Drone2": {
          "VehicleType": "SimpleFlight",
          "X": -59.81, "Y": 5.0, "Z": -177.74,"Yaw": 0
        },
        "Drone3": {
          "VehicleType": "SimpleFlight",
          "X": -50.61, "Y": 5.0, "Z": -177.74,"Yaw": -45
        },
        "Drone4": {
          "VehicleType": "SimpleFlight",
          "X": -69.56, "Y": 5.0, "Z": -186.53,"Yaw": -90
        },
        "Drone5": {
          "VehicleType": "SimpleFlight",
          "X": -60.33, "Y": 5.0, "Z": -186.84,"Yaw": 180
        },
        "Drone6": {
          "VehicleType": "SimpleFlight",
          "X": -50.4, "Y": 5.0, "Z": -187.54,"Yaw": 90
        }
    }
}

My quadrotor in Unity is at 45 degrees yaw angle, and the camera viewframe is also shown:
Screenshot from 2023-11-06 21-39-04
Screenshot from 2023-11-06 21-38-53

However, when I start the simulation and view the RGB, depth, and semantic segmentation frames from Airsim, the camera is showing the viewpoint from exactly -45 degrees:
Screenshot from 2023-11-06 21-40-55

Include details of what you already did to find answers

#1498
#2951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant