Robotics StackExchange | Archived questions

IMU orientation mismatch with RVIZ

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"/>
  </node>

  <!--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" />
  </node>

  <!--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" />

Asked by aarontan on 2018-08-09 14:34:14 UTC

Comments

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

Asked by Man on 2019-03-14 13:11:26 UTC

Answers

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

Asked by stevemacenski on 2018-08-09 16:23:07 UTC

Comments

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.

Asked by stevejp on 2018-08-10 08:13:10 UTC

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.

Asked by Vignesht.tech on 2021-06-23 05:52:12 UTC

Comments