Skip to content

simGetVehiclePose() return wrong NED pose #3882

Closed
@alonfaraj

Description

@alonfaraj

Bug report

  • AirSim Version/#commit: ccfaa5d
  • UE/Unity version: 4.26
  • autopilot version:
  • OS Version: Win10

What's the issue you encountered?

This issue first mentioned here #3844.
Seems like it's not the intended behavior but better to get a confirmation for this.
The NED position returned by simGetVehiclePose() is relative the the spawn location and not to the origin (PlayerStart pawn).
In the example it should return (8,5,2) but instead it returns (0,0,2).

Settings

Seetings.json
{
"SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md",
"SettingsVersion": 1.2,
"SimMode": "Car",
"Vehicles" : 
{
  "Car1": 
  {
    "VehicleType": "PhysXCar",
    "X": 8, "Y": 5, "Z": -2
  }
}
}

How can the issue be reproduced?

  1. Run Blocks with above settings.json
  2. Run the following API code
code
import setup_path
import airsim

client = airsim.VehicleClient()
client.confirmConnection()

print(client.simGetVehiclePose("Car1").position)
output
<Vector3r> {   'x_val': 0.0,
  'y_val': 2.136230477844947e-06,
  'z_val': 2.234570026397705}

Include full error message in text form

What's better than filing an issue? Filing a pull request :).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions