Robotics StackExchange | Archived questions

Extrapolation Error: Lookup would require extrapolation

i am working on a slam robot using only rplidar only, without any encoders, at this point I was able to map my room using hector slam but during navigation using amcl, I am getting errors like

[ERROR] [1669362559.701892915]: Extrapolation Error: Lookup would require extrapolation 0.004418590s into the future.  Requested time 1669362559.701718807 but the latest data is at time 1669362559.697300196, when looking up transform from frame [odom] to frame [map]

[ERROR] [1669362559.702051652]: Global Frame: odom Plan Frame size 15: map

[ WARN] [1669362559.702154965]: Could not transform the global plan to the frame of the controller
[ERROR] [1669362559.702280092]: Could not get local plan

and my robot is moving outside but in rviz, where did I go wrong can some help me this is my urdf file

    <?xml version="1.0" ?>

<robot name="robot" xmlns:xacro="http://www.ros.org/wiki/xacro">

<link name="base_link">
   <collision name="base_collision">
        <origin rpy="0 0 0" xyz="0 0 0.01"/>
        <geometry>
            <mesh filename="package://robot_description/mesh/base.dae"/> 
        </geometry>
   </collision>

    <visual name="base_visual">
        <origin rpy="0 0 0" xyz="0 0 0.01"/>
        <geometry>
            <mesh filename="package://robot_description/mesh/base.dae"/>
        </geometry>
    </visual>


    <collision name="front_caster_collision">
        <origin rpy=" 0 0 0" xyz="0.06 0 0"/>
        <geometry>
            <sphere radius="0.017"/>
        </geometry>
        <surface>
            <friction>
                <ode>
                    <mu>0</mu>
                    <mu2>0</mu2>
                    <slip1>1.0</slip1>
                    <slip2>1.0</slip2>
                </ode>
            </friction>
        </surface>
    </collision>

    <visual name="front_caster_visual">
        <origin rpy=" 0 0 0" xyz="0.06 0 0"/>
        <geometry>
            <sphere radius="0.017"/>
        </geometry>
    </visual>

    <collision name="back_caster_collision">
        <origin rpy=" 0 0 0" xyz="-0.06 0 0"/>
        <geometry>
            <sphere radius="0.017"/>
        </geometry>
        <surface>
            <friction>
                <ode>
                    <mu>0</mu>
                    <mu2>0</mu2>
                    <slip1>1.0</slip1>
                    <slip2>1.0</slip2>
                </ode>
            </friction>
        </surface>
    </collision>

    <visual name="back_caster_visual">
        <origin rpy=" 0 0 0" xyz="-0.06 0 0"/>
        <geometry>
            <sphere radius="0.017"/>
        </geometry>
    </visual> 

</link>

<link name="right_wheel">

 <collision name="right_wheel_collision">
   <origin rpy="0 0 0" xyz="0 0 0"/>
    <geometry>
        <mesh filename="package://robot_description/mesh/wheel.dae"/> 
    </geometry>
 </collision>

 <visual name="right_wheel_visual">
   <origin rpy="0 0 0" xyz="0 0 0"/>
    <geometry>
        <mesh filename="package://robot_description/mesh/wheel.dae"/> 
    </geometry>
 </visual>
</link>

<joint name="joint_right_wheel" type="continuous">
 <origin rpy="0 0 0" xyz="0 -0.063 0.017"/>
 <child link="right_wheel"/>
 <parent link="base_link"/>
 <axis rpy="0 0 0" xyz="0 1 0"/>
</joint>


<link name="left_wheel">

 <collision name="left_wheel_collision">
   <origin rpy="0 0 0" xyz="0 0 0"/>
    <geometry>
        <mesh filename="package://robot_description/mesh/wheel.dae"/> 
    </geometry>
 </collision>

 <visual name="left_wheel_visual">
   <origin rpy="0 0 0" xyz="0 0 0"/>
    <geometry>
        <mesh filename="package://robot_description/mesh/wheel.dae"/> 
    </geometry>
 </visual>
</link>

<joint name="joint_left_wheel" type="continuous">
 <origin rpy="0 0 0" xyz="0 0.063 0.017"/>
 <child link="left_wheel"/>
 <parent link="base_link"/>
 <axis rpy="0 0 0" xyz="0 1 0"/>
</joint>


<!--lider -->
<link name="laser">

 <visual>
   <origin xyz="0 0 0" rpy="0 0 0" />
   <geometry>
        <box size="0.0501 0.0702 0.0957"/>
   </geometry>

 </visual>

 <collision>
   <origin xyz="0 0 0" rpy="0 0 0"/>
   <geometry>
     <box size="0.0501 0.0702 0.0957"/>
   </geometry>
 </collision>
</link>

<joint name="joint_liderr" type="fixed">
 <origin xyz="0 0 0.14014" rpy="0 0 0"/>
 <parent link="base_link"/>
 <child link="laser"/>
</joint>

</robot>

and this is my navigation launch file

<?xml version="1.0"?>

<launch>

  <arg name="open_rviz" default="true"/>
  <arg name="move_forward_only" default="false"/>

  <node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0 0 0 0 0 0 map odom 30" />
  <node pkg="tf" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0 0 0 odom base_link 30" />



  <!-- Run Gazebo -->

  <include file="$(find robot_simulation)/launch/robot_standalone.launch"></include>

  <!-- Run the map server -->
  <arg name="map_file" default="$(find navstack)/map/mymap.yaml"/>
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />

  <!--- Run AMCL -->
  <include file="$(find navstack)/launch/amcl_diff.launch" >

  </include>
  <!--- Run Move Base -->
  <include file="$(find navstack)/launch/move_base.launch" />

  <!-- rviz -->
  <group if="$(arg open_rviz)"> 
    <node pkg="rviz" type="rviz" name="rviz" required="true"
          args="-d $(find navstack)/include/robot_navigation.rviz"/>
  </group>

</launch>

Asked by harish1111 on 2022-11-25 03:11:41 UTC

Comments

Answers