Skip to content
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

IMU output Y-axis inverted? #177

Closed
MarcGyongyosi opened this issue Dec 18, 2014 · 5 comments
Closed

IMU output Y-axis inverted? #177

MarcGyongyosi opened this issue Dec 18, 2014 · 5 comments
Labels

Comments

@MarcGyongyosi
Copy link

Hi,

so I've been spending a lot of time trying to figure out the transform from my camera to the IMU for the EKF and as I was checking the frames over and over, I found something which puzzles me: When I look at imu output when the pixhawk's horizontal, lin acc z is +9.81 as expected. When I tilt my pixhawk such that +x (the front) points to the ceiling I get +9.81 on lin acc x (as expected). However, when I look at what happens as I put the Pixhawk on its left (such that y, which should be y+ right, points to the ceiling, I get -9.81). Based on this, is it possible something's messed up in the conversion from NED to ENU in mavros? Specifically the Y output?

Thanks,
Marc

@tonybaltovski
Copy link
Contributor

Hi Marc,

According to ROS REP103, the postive axis are x - forward, y - left and z - up. So when the left side is facing the ceiling, you should get +9.81 and -9.81 when the right is facing the ceiling. We have discussed this in issue #49 if you want to check it out.

-Tony

@MarcGyongyosi
Copy link
Author

Hi Tony,

thanks for the answer, I've been looking at these graphs and only now realized that north was always facing right for some reason ... should have seen that sooner.

So could you confirm to me the following things:

Output of IMU topic is BODY-FRAME ENU
Input to vision position estimate plugin has to be GROUND-FRAME ENU (as per: https://groups.google.com/d/msg/px4users/IC1iz_TsL_Y/QD2eaLhFfVIJ)
Position setpoints have to be GROUND-FRAME ENU

so basically, if I do some sort of external vision position estimation, I have to convert/rotate my vision estimate output to BODY FRAME ENU, fuse it with an EKF like the ETHZASL_MSF (https://github.com/ethz-asl/ethzasl_msf) then convert the output of the EKF to GROUND FRAME ENU (i.e. switch x and y) and then send that back through the vision position estimate?

Thanks a lot!

Marc

@vooon vooon added the question label Dec 19, 2014
@tonybaltovski
Copy link
Contributor

ROS body frame is [X-forward,Y-left, Z-up] where as the avionics/PX4 body frame is [X-forward,Y-right, Z-down]. This is nothing to do with global reference frames like NED or ENU. NED and ENU just state where each axis is aligned to ie X->East, Y->North and Z-Up.

The IMU outputs data about its own frame but the magnetometer reading is in terms of North to an axis. The vision_position_estimate uses a ground or world frame that I believe is initially coincident with the body frame and converts it to the PX4 coordinate system. Note: There are comments in the plugin to verify the conversion. As for the sensor fusion, only the accelerometer and gyroscope are used currently and they would be in the body frame but can be transformed to the world frame. There is more information here.

@MarcGyongyosi
Copy link
Author

thanks!

@mhkabir
Copy link
Member

mhkabir commented Dec 22, 2014

Hi ,
Incase you're running sensor fusion externally, make sure PX4 obeys heading from vision estimate. Use the "indoor" firmware branch.
Kabir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants