-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reiterate over frame conversions between NED and ENU #216
Comments
Maybe someone can comment on the current state? I lack the time to sift through the code currently, but I'd be happy to review the transformations. |
@LorenzMeier See PR #208. |
@LorenzMeier Actually, this is the current convention we use : body-fixed NED → ROS ENU: (x y z)→(x -y -z) or (w x y z)→(x -y -z w) |
Yes that's my scheme. I can confirm it, and I used and explained it on my thesis. Note: This conversion is what we agreed some months ago and I was able to confirm it on Rviz. |
The issue isn't the actual conversion but rather when a certain conversion is used. |
I'm looking at this: There are a number of issues with the graphic (and if it represents the orientation, the code):
Consequently there is no difference between the body frame and the world frame at zero rotation, and the conversion between NED and ENU is the same for both frames, using global / local reference, respectively. |
I agree mostly with whats @LorenzMeier has said. However, unless I'm very much mistaken every coordinate frame in the above graphic except the bottom right one is a left handed coordinate system. Maybe you mislabeled x and y axes in the graphics's legend? Apart from that I agree that converting fron ENU to NED is the same whether its for the ground frame or body frame. On the body frame the name ENU or NED does not make much sense, but still converting from the coordinate frame used in ROS to FCU should always be the same I think. I haven't yet checked the method for conversion that @mhkabir posted above. Think we need to get thw graphic right first before doing the math |
@thedinuka Would you mind whipping up a new one in Paint or something, according to what seems correct to you . ;) |
I have the original file, can chnage it then ans send a new one (no need to use paint @mhkabir). The thing about right and left hand seems right. But I still have doubts relative to having two different converions, and when I did that image that time, I was having them too. So probably we need to check the code, cause from what I remember, most of the implementations use the above conversions. |
While waiting for the modified version of the graphic by @TSC21 , I have given this a bit more thought and it seems more complicated than I initiall thought. I kind of agree with @TSC21. There are two different pairs of coordinate transformations that we need to think of.
While there is documentation both on ROS side and Pixhawk side about the convention used for the body-fixed coordinate frame, I couldn't find specific information about the convention used on the Pixhawk side about the Inertial (or Earth Fixed) coordinate frame. If I had to make a guess then I'd say that on the Pixhawk side, in the absence of GPS, the Earth Fixed coordinate frame aligns with the initial orientation of the body-fixed frame, but I'm not 100% sure whether this is the case. So to prevent any mistakes and confusion, I'm going to, for now, only consider the body fixed frame. Relaying on the documentation [1] for ROS and [2] for Pixhawk, I have made the following diagram. Once we have the coordinate frame diagrams for both (1) and (2) above verified, confirmed and agreed, then the math to do the actual transformations on mavros side is very straight forward. [1] http://www.ros.org/reps/rep-0103.html |
Please also look at #148 (covariation conversion). |
This may help ros-infrastructure/rep#95 |
Did we end getting somewhere with this? Are the current conversions from ENU/NED, body/world frames correct? I'm asking this cause we need to iterate the possibility that @BlackCoder is getting a yaw rotation on the FCU when sending the vision data because we are doing things wrong. |
@thedinuka Looks good to me.
Actually don't need GPS. We have a global yaw reference from the mag already. That should mean EF frame rotated using by this yaw. |
Hi, |
@congleetea that seems legit. Can you please apply the same transformations to setpoint plugins and see what's the result? also, does the data coming from |
We also must take this into account. |
PR #317 change conversions. |
I have test this conversing NED(Pixhawk)->ENU(ROS) ENU(ROS)->NED(Pixhawk) That works well both in rviz and real fling. |
@supermice that confirms #317 so thanks! :) |
offboard control handover commands
No description provided.
The text was updated successfully, but these errors were encountered: