Height difference between base link and odom
Hey guys.
I was developing my robot model, I don't understand why the base link and odom is not aligned in rviz? Which parameter may cause this type of discrepancy? This makes the robot float in the air. Please look into the below image
Thanks guys!
EDIT: Adding the xacro files This is the base link xacro file
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="500">
<xacro:macro name="mp_500_base" params="name">
<link name="${name}">
<inertial>
<mass value="1.4" />
<origin xyz="0.000122063 0.106046383 0.229559509" rpy="0 0 0"/>
<inertia ixx="19.3007" ixy="-1.11893480243" ixz="-0.407945788144"
iyy="131.584507173302" iyz="-53.615672236"
izz="25.601786" />
</inertial>
<visual name='body'>
<origin xyz="0.0 0.0 -0" rpy="0 0 1.570796" /><!-- for STL -->
<geometry>
<mesh filename="package://path-to-BODY.dae" scale="0.001 0.001 0.001"/>
</geometry>
</visual>
<collision name='body_collision'>
<origin xyz="0.0 0.0 0.0" rpy=" 0 0. 1.570796" />
<geometry>
<mesh filename="package://path-to-BODY.dae" scale="0.001 0.001 0.001"/>
</geometry>
</collision>
</link>
</xacro:macro>
</robot>
Just putting the important snippet from gazebo xacro
<plugin name="b1_controller" filename="libgazebo_ros_planar_move.so">
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<odometryRate>20.0</odometryRate>
<robotBaseFrame>base_link</robotBaseFrame>
</plugin>
</gazebo>
</robot>