Ask Your Question

IMU orientation mismatch with RVIZ

asked 2018-08-09 14:34:14 -0500

aarontan gravatar image

Hello everyone,

I am using the robot localization package to fuse together data from wheel odometry and imu.

For my robot, the imu frame is placed at 0.5m on top of the base_link (it is placed flat, paralleled to the ground plane on my robot). When I visualize the imu data in rviz, i see that it does not match the frame that I have broadcasted. This is shown in the image below with the larger frame representing the orientation of the imu (UM7) sensor. It is shown that it is on an angle however the imu is placed flat. Can someone explain why this happens?

image description

This is what I am using to launch the IMU and broadcase the imu transform

  <!--launches IMU UM7-->
  <node pkg="um7" type="um7_driver" name="um7_driver" respawn="true" output="screen">
    <param name="port" value="/dev/ttyUSB0"/>
    <param name="frame_id" type="string" value="imu"/>
    <param name="baud" type="int" value="115200"/>
    <param name="mag_updates" type="bool" value="true"/>

  <!--launches robot localization that fuses wheel odometry and IMU-->
  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true">
    <rosparam command="load" file="$(find robot_localization)/params/ekf_template.yaml" />

  <!--broadcasts IMU frame transform -->
  <node pkg="tf" type="static_transform_publisher" name="imu" args="0 0 0.5 0 0 0 base_link imu 100" />
edit retag flag offensive close merge delete


Hey did you solve your problem? I fixed it by setting the param tf_ned_to_enu to false, at least the vizualisation of rviz_imu_plugin

Man gravatar image Man  ( 2019-03-14 13:11:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-09 16:23:07 -0500

An IMU starts to broadcast data in its original orientation when its started. If you start it when its tilted and then move flat, then the data will be offset by this amount. Not to worry, the next global pose update from a landmark system (SLAM, AMCL, etc) it will correct the relative transform

edit flag offensive delete link more


The UM7 IMU is reporting the orientation of the imu_link frame in some world fixed frame (e.g., ENU / NED). So regardless of the orientation you start it in, you should be able to rotate it onto a flat plane and have the IMU orientation reflect that.

stevejp gravatar image stevejp  ( 2018-08-10 08:13:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-08-09 14:34:14 -0500

Seen: 864 times

Last updated: Aug 09 '18