Airsim: Using simGetObjectPose to calculate distance

Created on 6 Jun 2019  路  1Comment  路  Source: microsoft/AirSim

Hello everyone,
I'm currently working on how to estimate distance only by images in AirSim, and I want to use simGetObjectPose to get (x,y,z) value and calculate distances from car to objects.
The problem is when I moved the car, object's value got by the API did not change. So I can't calculate distance from car to objects while moving.
It's said in the doc that "The returned pose is in NED coordinates in SI units with its origin at Player Start.", but I don't understand this very much.
Can anyone explain the API simGetObjectPose clearly for me?
Thank you and best regards.

Most helpful comment

simGetObjectPose returns a pose relative to the car's origin. It is not relative to the car's local coordinate frame. As the car's position in the world changes, which you can see by simGetVehiclePose, the object's position in the world relative to the origin does not change.

In order to calculate the object's location relative to your vehicle, you must subtract the vehicle's world position from the object's world position.

>All comments

simGetObjectPose returns a pose relative to the car's origin. It is not relative to the car's local coordinate frame. As the car's position in the world changes, which you can see by simGetVehiclePose, the object's position in the world relative to the origin does not change.

In order to calculate the object's location relative to your vehicle, you must subtract the vehicle's world position from the object's world position.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mayankm96 picture Mayankm96  路  4Comments

JenaEmz picture JenaEmz  路  3Comments

p3jawors picture p3jawors  路  3Comments

zywOwO picture zywOwO  路  3Comments

vinbo picture vinbo  路  4Comments