How to fix bad odometry
Hello,
I followed the steps on the ros wiki page to check my odometry and realized when rotating the robot it is really bad.
When rotating the scans don't match at all. So I tried to figure out where my problem is... but I could not find the paramters to change..
I am working with turtlebot3 and modified the wheel width. I think I got all paramters right, so they do fit to my robot. I changed paramters for turtlebot3 core in Arduino and the URDF model. My odometry still ist kind of bad... even when I change them to something obviously wrong the odometry still looks the same. So I must be missing something.
Where do I have to change parameters that affect my odometry?
Besides: I will try to simulate my model and look whether the paramters do fit there and my odometry looks right. As soon as I understood the gazebo thing I will give an update on that, but maybe somebody can help me so far?
I am really frustrated now cause I need to get things work by time.
Thank you! Laura
Here are my codes:
robot.urdf.xacro:
<?xml version="1.0" ?>
<robot name="turtlebot3_waffle_pi" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find turtlebot3_description)/urdf/common_properties.xacro"/>
<xacro:include filename="$(find turtlebot3_description)/urdf/turtlebot3_waffle_pi.gazebo.xacro"/>
<link name="base_footprint"/>
<joint name="base_joint" type="fixed">
<parent link="base_footprint"/>
<child link="base_link" />
<origin xyz="0 0 0" rpy="0 0 0"/>
</joint>
<link name="base_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.52 0.50 1.20"/>
</geometry>
<material name="light_black"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.52 0.50 1.20"/>
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0" rpy="0 0 0"/>
<mass value="20.00e+00"/>
<inertia ixx="3" ixy="0" ixz="0"
iyy="2.82" iyz="0"
izz="0.83" />
</inertial>
</link>
<joint name="sonar_bottom_right_joint" type="fixed">
<parent link="base_link" />
<child link="sonar_bottom_right_link" />
<origin xyz="0.26 -0.16 -0.51" rpy="0 0 0" />
</joint>
<link name="sonar_bottom_right_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.005 0.05 0.05"/>
</geometry>
<material name="blue"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.005 0.05 0.05"/>
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0" />
<mass value="1.8498940e-02" />
<inertia ixx="0.1175580e-05" ixy="-3.2369783e-11" ixz="-4.9381719e-09"
iyy="0.1192413e-05" iyz="-0.4400107e-11"
izz="0.0712558e-05" />
</inertial>
</link>
<joint name="sonar_bottom_left_joint" type="fixed">
<parent link="base_link" />
<child link="sonar_bottom_left_link" />
<origin xyz="0.26 0.16 -0.51" rpy="0 0 0" />
</joint>
<link name="sonar_bottom_left_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.005 0.05 0.05"/>
</geometry>
<material name="blue"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.005 0.05 0.05"/>
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0" />
<mass value="1.8498940e-02" />
<inertia ixx="0.1175580e-05" ixy="-3.2369783e-11" ixz="-4.9381719e-09"
iyy="0.1192413e-05" iyz="-0.4400107e-11"
izz="0.0712558e-05" />
</inertial>
</link>
<joint name="wheel_left_joint" type="continuous">
<parent link="base_link"/>
<child link="wheel_left_link"/>
<origin xyz="0.26 0.2215 -0.5835" rpy="-1.57 0 0"/>
<axis xyz="0 0 1"/>
</joint>
<link name="wheel_left_link">
<visual>
<origin xyz="0 0 0" rpy="1.57 0 0"/>
<geometry>
<mesh filename="package://turtlebot3_description/meshes/wheels/left_tire.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="dark"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<cylinder length="0.018" radius="0.033"/>
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0" />
<mass value="2.8498940e-02" />
<inertia ixx="1.1175580e-05" ixy="-4.2369783e-11" ixz="-5.9381719e-09"
iyy="1.1192413e-05" iyz="-1.4400107e-11"
izz="2.0712558e-05" />
</inertial>
</link>
<joint name="wheel_right_joint" type="continuous">
<parent link="base_link"/>
<child link="wheel_right_link"/>
<origin xyz="0.26 -0.2215 -0.5835" rpy="-1.57 0 0"/>
<axis xyz="0 0 1"/>
</joint>
<link name="wheel_right_link">
<visual>
<origin xyz="0 0 0" rpy="1.57 0 0"/>
<geometry>
<mesh filename="package://turtlebot3_description/meshes/wheels/right_tire.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="dark"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<cylinder length="0.018" radius="0.033"/>
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0" />
<mass value="2.8498940e-02" />
<inertia ixx="1.1175580e-05" ixy="-4.2369783e-11" ixz="-5.9381719e-09"
iyy="1.1192413e-05" iyz="-1.4400107e-11"
izz="2.0712558e-05" />
</inertial>
</link>
<joint name="caster_back_joint" type="fixed">
<parent link="base_link"/>
<child link="caster_back_link"/>
<origin xyz="-0.26 0 -0.5835" rpy="0 0 0"/>
<axis xyz="0 0 1"/>
</joint>
<link name="caster_back_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<sphere radius="0.033"/>
</geometry>
<material name="dark"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<sphere radius="0.033"/>
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0" />
<mass value="2.8498940e-02" />
<inertia ixx="0.001" ixy="0.0" ixz="0.0"
iyy="0.001" iyz="0.0"
izz="0.001" />
</inertial>
</link>
<joint name="imu_joint" type="fixed">
<parent link="base_link"/>
<child link="imu_link"/>
<origin xyz="0.0 0 0.068" rpy="0 0 0"/>
</joint>
<link name="imu_link"/>
<joint name="scan_joint" type="fixed">
<parent link="base_link"/>
<child link="base_scan"/>
<origin xyz="0 0 0.62" rpy="0 0 0"/>
</joint>
<link name="base_scan">
<visual>
<origin xyz="0 0 0.0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://turtlebot3_description/meshes/sensors/lds.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="dark"/>
</visual>
<collision>
<origin xyz="0.015 0 -0.0065" rpy="0 0 0"/>
<geometry>
<cylinder length="0.0315" radius="0.055"/>
</geometry>
</collision>
<inertial>
<mass value="0.114" />
<origin xyz="0 0 0" />
<inertia ixx="0.001" ixy="0.0" ixz="0.0"
iyy="0.001" iyz="0.0"
izz="0.001" />
</inertial>
</link>
</robot>
Asked by lslabon on 2020-12-04 10:19:42 UTC
Comments
Could you please share the link to the wiki page you mention, describe what nodes you launch and share the relevant launch and config files? Do so by editing your question and paste the code as text, using the preformatted text button (101010). Thanks
Asked by mgruhler on 2020-12-04 10:31:39 UTC
I do not see "wheel width" in your file. Which parameter did you change? "Wheel width" could refer to the width of a single wheel or to the spacing between wheels. The former doesn't affect odometry, but the latter does--assuming a differential drive, which a TurtleBot3 has.
Asked by tryan on 2020-12-04 12:36:54 UTC
I did change the Wheel width in arduino... I think it did not make anything better, but I will try by setting it to something stupid tomorrow
Asked by lslabon on 2020-12-07 06:01:23 UTC
I realized odometry isn't the problem.. When I compare odometry topic output with teleoperation I realized there is no difference..
Asked by lslabon on 2020-12-12 07:51:07 UTC