IMU + Magnetometer points south - madgwick filter
I have a um7 imu that publishes data in NED frame.
I then have a imutransformer node that transforms it to enu in baselink
<node pkg="tf2_ros" type="static_transform_publisher" name="ned_publisher" args="0 0 0 0 0 3.1416 imu_link_ned imu_link_enu"/>
<node name="um7_transformer" pkg="imu_transformer" type="imu_transformer_node">
<remap from="imu_in" to="um7"/>
<remap from="imu_out/data" to="imu/data_raw"/>
<remap from="imu_out/mag" to="imu/mag"/>
<param name="target_frame" value="base_link"/>
</node>
And then finally a madgwick filter node:
<node name="madgwick_filter" pkg="imu_filter_madgwick" type="imu_filter_node">
<rosparam command="load" file="$(find robot_config)/config/madgwick_filter.yaml"/>
</node>
With the following parameters:
use_magnetic_field_msg: true
use_mag: true
mag_bias_x: 0
mag_bias_y: 0
mag_bias_z: 0
orientation_stddev: 0.001
gain: 0.01
zeta: 0.001
publish_tf: false
The robot is pointing north but when I view this with rvizimuplugin the green axis points towards south and the red axis points towards west.
C:\fakepath\Screenshot from 2021-02-19 12-31-00.png
How can I fix this?
Asked by Gherkins on 2021-02-19 06:23:18 UTC
Comments