Imu Integration with Mobile Robot
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=hZZzMtRVv_M&feature=emb_logo&ab_channel=LeoRover
My Robot
There should be something missing. But where it is?
xsensetopic topic publish baselink--->imu_link tf
my urdf file publish with robot state publish (map-odom-base-footprint-baselink-imu) map-odom-footprint-base_link are published by static transform ( static transform publisher)
base_link-other components was published by robot state publisher
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>
Asked by bfdmetu on 2020-11-27 07:03:04 UTC
Answers
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.
Asked by Dragonslayer on 2020-11-27 08:21:02 UTC
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 ?
Asked by bfdmetu on 2020-11-28 08:28:55 UTC
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.
Asked by Dragonslayer on 2020-11-30 08:08:34 UTC
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.
Asked by bfdmetu on 2020-12-01 01:06:50 UTC
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.
Asked by Dragonslayer on 2020-12-01 08:44:47 UTC
The base_link -> imu_link should be a "static/fixed transform", reflecting the fact that the imu is FIXED to the base of the robot. So, when the imu_link moves, the base_link moves respectively.
Then, there should be a fixed reference frame (world or map or ...), with respect to which the imu_link should be moved (dynamic transform), resulting in the movement of the robot. This dynamic transform publishing (world -> imu_link) is the work of the imu_sensor package.
Asked by Raza Rizvi on 2022-12-06 11:40:22 UTC
Comments