Ask Your Question
0

Imu Integration with Mobile Robot

asked 2020-11-27 06:03:04 -0500

bfdmetu gravatar image

updated 2020-11-27 06:26:28 -0500

Hi. I am working on a mobile robot. I want to use xsense imu.

I can get the imu/data. When i turn the imu, i can see it turns in RVİZ. However my robot (base_link) doesn't move-turn.

Example In youtube Leo Rover account. If the imu turn , leo robot will turn in rviz.

https://www.youtube.com/watch?v=hZZzM...

My Robot

https://youtu.be/UiiGGe_luqw

There should be something missing. But where it is?

xsense_topic topic publish base_link--->imu_link tf

my urdf file publish with robot state publish (map-odom-base-footprint-base_link-imu) map-odom-foot_print-base_link are published by static transform ( static transform publisher)

base_link-other components was published by robot state publisher

image description

this is my urdf file related imu

<link name="imu_link">
    <visual>
      <origin rpy="0 0 1.57079632679" xyz="0.0121 0 0.0016"/>
      <geometry>
        <mesh filename="package://optim/meshes/mti_1.STL" scale="0.001 0.001 0.001"/>
      </geometry>
      <material name="xsens_orange">
        <color rgba="0.92 0.45 0.02 1.0"/>
      </material>
    </visual>
  </link>
  <joint
    name="imu_link"
    type="fixed">
    <origin
      xyz="0.0 0 0.278189004081027"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="imu_link" />
    <axis
      xyz="0 0 0" />
  </joint>
</robot>
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-11-27 07:21:02 -0500

Dragonslayer gravatar image

updated 2020-11-27 07:22:20 -0500

Most ot the time the imu data is fused with odometry and thus influences the odom->base_link transform. Usually via ekf_localization_node

I checked leorover github (link text). It seems all should work fine, but in the

odometry.launch

you might want to change Line 3

  <arg name="three_d" default="false"/>

set this to "true", the odometry is in 2d mode by default.

edit flag offensive delete link more

Comments

Thank you for reply. I notice that if i change the imu_link-->base_link transform, the robot model turn with imu. If i use base_link-->imu_link ,robot model does not move when i turn the imu...

I guess if i turn the imu, shouldn't the robot model stay motionless.

I am asking another. What is the difference between robot_pose_ekf (package) and ekf_localization_node (robot_localization package)

To get better localization , which is the best ?

Second question is

When we navigate the robot on the map, how can we determine its localization?

using frames ( which frames) or topics (amcl_pose ) or something else ?

bfdmetu gravatar image bfdmetu  ( 2020-11-28 07:28:55 -0500 )edit

Did you try my suggestion? Do you use the Leo stack from github? Where do you change "base_link-->imu_link"? What file? -Those two ekf nodes are similar but Leo uses ekf_localization_node. -As the Leo github collection says it uses amcl for localization, but needs gmapping first to build a map. Theoretically one could only use known starting_position an odometry (dead reckoning) but odometry errors accumulate very fast and the robot would be lost in a very short time.

Dragonslayer gravatar image Dragonslayer  ( 2020-11-30 07:08:34 -0500 )edit

I change base_link-->imu_link in my urdf file.Not in Leo robot file. Today i try to integrate Leo ekf_localization_node configuration in my file.

I have a known map. I build it with gmapping.

Do i ask one more thing?

My odom file publish odom0 topic and odom_frame-->base_link transformation... My ekf file subscribe odom0 topic and imu/data topic and publish odom topic... And also publish odom_frame-->base_link transformation.

In that way 2 different node publish same transfer function odom_frame--> base_link... Is this right way or do i need to change frames name , tf.

bfdmetu gravatar image bfdmetu  ( 2020-12-01 00:06:50 -0500 )edit

Well, you should only have one braodcaster per tf transform. Usually odometry nodes have a parameter to switch on/off tf publishing. Thus if you use ekf switch off the odometries tf. But be aware the odometry message itself is not a tf broadcaster.

Dragonslayer gravatar image Dragonslayer  ( 2020-12-01 07:44:47 -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

1 follower

Stats

Asked: 2020-11-27 06:03:04 -0500

Seen: 328 times

Last updated: Nov 27 '20