ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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

2 Answers

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

answered 2021-06-23 05:52:12 -0500 gravatar image

You're getting the orientation of the IMU (as an axes), this is given by the rviz imu plugin . You can see the static frame there with your fixed distance and orientation. Check with unselecting the imu rviz plugin. Select only TF to check with static frames.

edit flag offensive delete link more

Question Tools



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

Seen: 1,834 times

Last updated: Jun 23 '21