AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

simGetPose() & simSetPose() issue

Open cangokalp opened this issue 9 years ago • 3 comments

#532 - might be relevant

(Pdb) client.simGetPose()
{b'position': {b'x_val': 0.0, b'y_val': 0.0, b'z_val': 0.0}, b'orientation': {b'x_val': 0.0, b'z_val': 0.0, b'y_val': 0.0, b'w_val': 1.0}}
(Pdb) client.getPosition().z_val
-10.334099769592285
(Pdb) home
{b'position': {b'x_val': 0.0, b'y_val': 0.0, b'z_val': 0.0}, b'orientation': {b'x_val': 0.0, b'z_val': 0.0, b'y_val': 0.0, b'w_val': 1.0}}
(Pdb) client.simSetPose(home,True)
(Pdb) client.getPosition().z_val
-10.334085464477539
(Pdb) client.simGetPose()
{b'position': {b'x_val': 0.0, b'y_val': 0.0, b'z_val': 0.0}, b'orientation': {b'x_val': 0.0, b'z_val': 0.0, b'y_val': 0.0, b'w_val': 1.0}}

simGetPose() won't return the correct Pose, simSetPose() make the drone respawn from the starting point (given starting point Pose) then it flies to where it was before the simSetPose() command

cangokalp avatar Oct 13 '17 16:10 cangokalp

Are you using these APIs in multirotor mode? They are not designed for use in multirotor mode. They should only be used in "Computer Vision" mode.

sytelus avatar Oct 13 '17 19:10 sytelus

ah, gotcha

cangokalp avatar Oct 18 '17 17:10 cangokalp

BTW, I did some refactoring so this API is now usable in other modes as well. Source is updated and new binaries will be updated soon as well.

sytelus avatar Oct 19 '17 08:10 sytelus