You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a simple object in unreal with cylinders to better visualize my quadrotor orientation. The object has collisions turned off, is moveable, and is a group of 3 cylinders. The axis of this object match the directions that you see on the quadrotor when you select it with x:forward, y:right, z:up. I am not talking about the feedback in NED where z is flipped, this is just the reference frame of the object itself in airsim that you can see when you select an object. The object itself has the cylinders set to match the directions in NED given from the airsim feedback (see first image below). I have confirmed this by setting the state of objects along x,y,z and they move as expected (+x forward, +y right, +z down) as the cylinders of this object are pointing towards. The object looks like this before it gets its state set.
If I read the orientation the quaternion is (in xyzw order) [0, 0, 0, 1] as expected. However, if I set the axis object to this quaternion the object appears flipped about the y-axis by pi/2.
I can fix this orientation (visually) by doing a quaternion rotation about the y-axis by pi/2 before setting the axis object's state to match the drone orientation in NED, however this has me wondering if I am expecting orientation in a different order, or if I am missing some conversion. I take the quaternion feedback and do a conversion to zyx euler angles (as is expected in the NED frame) to use as a target orientation state in my pd controller that I am developing. Is there some conversion I should be doing to make sure that the rotations are about the NED axis that the movement is performed on? Or is this just something else that is flipping this object for some reason, and has no affect on feedback.
Since this axis object has the same reference frame as the quadrotor, I would expect setting its orientation to [0, 0, 0, 1] would not cause any rotation.
The text was updated successfully, but these errors were encountered:
python==3.5.2
airsim==1.2.7
unreal==4.24.1-0+++UE4+Release-4.24
OS: Ubuntu 16.04
I have created a simple object in unreal with cylinders to better visualize my quadrotor orientation. The object has collisions turned off, is moveable, and is a group of 3 cylinders. The axis of this object match the directions that you see on the quadrotor when you select it with x:forward, y:right, z:up. I am not talking about the feedback in NED where z is flipped, this is just the reference frame of the object itself in airsim that you can see when you select an object. The object itself has the cylinders set to match the directions in NED given from the airsim feedback (see first image below). I have confirmed this by setting the state of objects along x,y,z and they move as expected (+x forward, +y right, +z down) as the cylinders of this object are pointing towards. The object looks like this before it gets its state set.
I connect to the simulator with
Then I get the drone state with
The idea is to set this axis object to the drones state and orientation to better visualize the rotation. I do this with
If I read the orientation the quaternion is (in xyzw order) [0, 0, 0, 1] as expected. However, if I set the axis object to this quaternion the object appears flipped about the y-axis by pi/2.

I can fix this orientation (visually) by doing a quaternion rotation about the y-axis by pi/2 before setting the axis object's state to match the drone orientation in NED, however this has me wondering if I am expecting orientation in a different order, or if I am missing some conversion. I take the quaternion feedback and do a conversion to zyx euler angles (as is expected in the NED frame) to use as a target orientation state in my pd controller that I am developing. Is there some conversion I should be doing to make sure that the rotations are about the NED axis that the movement is performed on? Or is this just something else that is flipping this object for some reason, and has no affect on feedback.
Since this axis object has the same reference frame as the quadrotor, I would expect setting its orientation to [0, 0, 0, 1] would not cause any rotation.
The text was updated successfully, but these errors were encountered: