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.
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.
Most helpful comment
simGetObjectPosereturns 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 bysimGetVehiclePose, 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.