endless spinning with move_base and hector mapping

asked 2018-09-27 03:35:30 -0600

banned333 gravatar image

I am using Husky A200 in ROS kinetic. I am using P&F R2000 laser scanner. I have am getting a map using hector_mapping. I am using move_base for simple navigation using RVIZ.

I launch my scanner and move_base node inside the husky. I visualize it in rviz in my own remote pc. When I provide 2D nav goal from the rviz, the mobile base keeps spinning. It throws me error:

[ERROR] [1538035032.225474602]: Extrapolation Error: Lookup would require extrapolation into the future.  Requested time 1538035032.285401881 but the latest data is at time 1538035032.281328883, when looking up transform from frame [odom] to frame [map]

[ERROR] [1538035032.225506623]: Global Frame: odom Plan Frame size 80: map

[ WARN] [1538035032.225563373]: Could not transform the global plan to the frame of the controller
[ERROR] [1538035032.225597427]: Could not get local plan
[ INFO] [1538035032.425304326]: Got new plan
[ERROR] [1538035032.425386196]: Extrapolation Error: Lookup would require extrapolation into the future.  Requested time 1538035032.485577569 but the latest data is at time 1538035032.481471291, when looking up transform from frame [odom] to frame [map]

I tried the suggestions provided here

My launch file looks like below:

<?xml version="1.0"?>
<launch>
  <arg name="frame_id" default="base_laser"/>
  <arg name="scanner_ip" default="192.168.131.12"/>
  <arg name="scan_frequency" default="35"/>
  <arg name="samples_per_scan" default="3600"/>

  <!-- R2000 Driver -->
  <node pkg="pepperl_fuchs_r2000" type="r2000_node" name="r2000_node" respawn="true" output="screen">
    <param name="frame_id" value="$(arg frame_id)"/>
    <param name="scanner_ip" value="$(arg scanner_ip)"/>
    <param name="scan_frequency" value="$(arg scan_frequency)"/>
    <param name="samples_per_scan" value="$(arg samples_per_scan)"/>

 </node>

 <node pkg="tf" type="static_transform_publisher" name="map_odom_broadcaster" args="0 0 0 0 0 0 /map /odom 100" /> 
<node pkg="tf" type="static_transform_publisher" name="odom_baselink_broadcaster" args="0 0 0 0 0 0 /odom /base_link 100" />

 <!--- Run gmapping 
 <include file="$(find husky_navigation)/launch/gmapping.launch" />-->
<!-- <node pkg="tf" type="static_transform_publisher" name="robot_state" args="0.35 0 0.15 0 0 0 base_link base_laser  10" /> -->
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find husky_description)/urdf/husky.urdf.xacro'" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />


<!--- Run Hector_mapping -->
<include file="$(find hector_mapping)/launch/mapping_default.launch" />
 <!--- Run Move Base -->
 <include file="$(find husky_navigation)/launch/move_base.launch" />

<!-- RVIZ -->

<node pkg="rviz" type="rviz" name="$(anon rviz)" respawn="false" output="screen" args="-d $(find pepperl_fuchs_r2000)/rviz/rviz.rviz"/>
</launch>

It could be because my remote pc and husky pc time are not sync. I tried the suggestions in ROS/network setup guide but could not sync the time.

Any help will be appreciated.

edit retag flag offensive close merge delete