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

Confusion in filtered quaternion results #182

Open
jinglun531 opened this issue Jul 10, 2023 · 1 comment
Open

Confusion in filtered quaternion results #182

jinglun531 opened this issue Jul 10, 2023 · 1 comment

Comments

@jinglun531
Copy link

jinglun531 commented Jul 10, 2023

Hello @mintar,

I'm working with a ZED-M camera and using the zed_ros_wrapper to acquire raw_imu data and filtered_imu data. I wanted to use imu_tools to confirm whether I could merge the raw IMU data from the ZED camera (gyro and accel) to achieve the correct quaternion data shown in the filtered_imu topic provided by the ZED camera.

But I've stumbled upon an intriguing yet puzzling finding. When I set my ZED camera facing upwards, the Madgwick filter seems to match the fusion results with the ZED's own topic. However, using the complementary filter produces fused IMU results with the same quaternion value but in a different order as compared to the filtered_imu topic.

This scenario switches when I position the ZED camera to face forward. In this case, the Madgwick filter yields the correct quaternion value but in the wrong order. Interestingly, the complementary filter now gives the exact quaternion value and order as shown in the filtered_imu topic.

This incorrect quaternion order appears as follows: [x_est = y_gt, y_est = z_gt, z_est = -w_gt, w_est = x_gt]. As [x_est, y_est, z_est, w_est] is the quaternion fused via imu_tools, and [x_gt, y_gt, z_gt, w_gt] is the quaternion provided by ZED camera's filtered_imu topic.

And in both case, my reference coordinate is ENU.

I would appreciate if you could provide some insight into why this issue is occurring and perhaps suggest a possible solution.

Looking forward to your response. Many thanks in advance!

@Fatyhich
Copy link

Fatyhich commented Jul 17, 2023

I have a similar question, cause when I send my imu/data_raw to the madgwick_filter and try to fugure out what's hapenning, I'll got this:
image

Maybe I have wrong launch file:
`

    <node pkg="nodelet" type="nodelet" name="imu_manager"
      args="manager" output="screen" />

    <node pkg="nodelet" type="nodelet" name="ImuFilterNodelet"
      args="load imu_filter_madgwick/ImuFilterNodelet imu_manager"
      output="screen">

   <param name="publish_tf" value="true"/>
   <param name="use_magnetic_field_msg" value="true"/>
   <param name="world_frame" type="str" value="enu"/>
   <param name="fixed_frame" type="str" value="imu_obj"/>

   </node>
</launch>

`
But I guess the result doesn't have to look like this.

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

No branches or pull requests

3 participants