Robotics StackExchange | Archived questions

Navigation Stack - could not get robot pose

Hi there, I just tried to use the navigation stack package. I have a lidar, formed a map (though in poor quality) with hector map, I followed this and put the map in for navigation. except for the odom, I tried with laserscanmatcher (this).

However, I got these while roslaunch the move_base.launch, and the pose of the robot/ costmap local could not be found...

[ WARN] [1549943317.338789222]: Trajectory Rollout planner initialized with param meter_scoring not set. Set it to true to make your settins robust against changes of costmap resolution.
[ INFO] [1549943318.632678731]: Recovery behavior will clear layer obstacles
[ INFO] [1549943318.731042550]: Recovery behavior will clear layer obstacles
[ WARN] [1549943318.891879203]: Map update loop missed its desired rate of 5.0000Hz... the loop actually took 0.4183 seconds
[ WARN] [1549943416.070164221]: Costmap2DROS transform timeout. Current time: 1549943416.0697, global_pose stamp: 1549943415.6726, tolerance: 0.3000
[ WARN] [1549943416.071357157]: Could not get robot pose, cancelling reconfiguration

The robot_configuration.launch:

<launch>
  <node name="ydlidar_node"  pkg="ydlidar"  type="ydlidar_node" output="screen">
    <param name="port"         type="string" value="/dev/ydlidar"/>  
    <param name="baudrate"     type="int"    value="115200"/>
    <param name="frame_id"     type="string" value="base_laser"/>
    <param name="angle_fixed"  type="bool"   value="true"/>
    <param name="low_exposure"  type="bool"   value="false"/>
    <param name="heartbeat"    type="bool"   value="false"/>
    <param name="resolution_fixed"    type="bool"   value="true"/>
    <param name="angle_min"    type="double" value="-180" />
    <param name="angle_max"    type="double" value="0" />
    <param name="range_min"    type="double" value="0.08" />
    <param name="range_max"    type="double" value="16.0" />
    <param name="ignore_array" type="string" value="" />
    <param name="samp_rate"    type="int"    value="9"/>
    <param name="frequency"    type="double" value="7"/>
  </node>

  <node pkg="tf" type="static_transform_publisher" name="map_to_odom" 
    args="0.0 0.0 0.0 0 0 0.0 /map /odom 40" />
  <node pkg="tf" type="static_transform_publisher" name="odom_to_basefootprint" 
        args="0.0 0.0 0.0 0 0 0.0 /odom /base_footprint 40" />
  <node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link"
    args="0.2245 0.0 0.2 0.0 0.0  0.0 /base_footprint /base_link 40" />

    <node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="laser_scan_matcher_node" output="screen">
      <param name="base_frame"    value="base_footprint"/>
      <param name="_fixed_frame"  value="map"/>
      <param name="use_imu"       value="false"/>
      <param name="use_odom"      value="false"/>
      <param name="use_vel"       value="false"/>
      <param name="max_iterations" value="10"/>
      <param name="publish_tf"    value="false"/>
      <param name="publish_pose"  value="true"/>
    </node>

    <node pkg="mobilet_setup_tf" type="tf_broadcaster" name="tf_broadcaster"/>
  <node pkg="rviz" type="rviz" name="rviz1" 
    args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/>

</launch>

and the move_base.launch

<launch>

   <master auto="start"/>
 <!-- Run the map server --> 
    <node name="map_server" pkg="map_server" type="map_server" args="$(find mobilet_2dnav)/maps/office_map_MoBiLET.yaml"/>

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

   <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find mobilet_2dnav)/param/costmap_common_params.yaml" command="load" ns="global_costmap" /> 
    <rosparam file="$(find mobilet_2dnav)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find mobilet_2dnav)/param/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find mobilet_2dnav)/param/global_costmap_params.yaml" command="load" /> 
    <rosparam file="$(find mobilet_2dnav)/param/base_local_planner_params.yaml" command="load" />
 </node>

</launch> 

This is my tf tree: (Will there be something missing? appreciate if someone can help with this. thanks!) image description ------------------------Edit

I then tried to provide the initial pose as billy said. however, the tf is not moving anywhere, while the laser scanning just like swinging to here and there (the lidar stayed still without moving), not really mapping to the boundary.

also, I got the error:

[ WARN] [1549961650.626591362]: Map update loop missed its desired rate of 5.0000Hz... the loop actually took 0.4752 seconds
[ WARN] [1549961650.840136325]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.1786 seconds
[ERROR] [1549961650.841627700]: Extrapolation Error: Lookup would require extrapolation into the future.  Requested time 1549961650.866647546 but the latest data is at time 1549961650.862548296, when looking up transform from frame [odom] to frame [map]

[ERROR] [1549961650.841905132]: Global Frame: odom Plan Frame size 42: map

image description

Asked by IvyKK on 2019-02-12 00:40:34 UTC

Comments

You'll get that error until you provide the robot pose so make sure you either provide initial pose through RVIZ or do it in code/YAML(there is some way to do it in launch I think but I just use initial pose button in RVIZ).

Asked by billy on 2019-02-12 01:09:15 UTC

Thanks billy, I have tried with providing the pose, but the tf is not moving accordingly..(tf also fails to move when the lidar moves) I posed to the edit part for the errors and the RVIZ, would you mind looking into it?

Asked by IvyKK on 2019-02-12 03:58:19 UTC

Answers