Robotics StackExchange | Archived questions

target_frame map does not exist

HI, I have a problem with, in my opinion, read map through move_base node.

When I launch my move_base.launch I got a WARN:

[ WARN] [1559215881.016792500, 588.765000000]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 588.765 timeout was 0.1.

But next communicats are:

[ INFO] [1559215882.172031593, 589.785000000]: Using plugin "static"
[ INFO] [1559215882.193340817, 589.801000000]: Requesting the map...
[ INFO] [1559215882.456086100, 590.027000000]: Resizing costmap to 4000 X 4000 at 0.050000 m/pix
[ INFO] [1559215882.590548878, 590.134000000]: Received a 4000 X 4000 map at 0.050000 m/pix
[ INFO] [1559215882.590664833, 590.135000000]: Subscribing to updates
[ INFO] [1559215882.608805401, 590.144000000]: Using plugin "inflation"
[ INFO] [1559215882.810460955, 590.298000000]: Using plugin "obstacles_laser"
[ INFO] [1559215882.815282109, 590.302000000]:     Subscribed to Topics: laser
[ INFO] [1559215882.876871143, 590.351000000]: Using plugin "inflation"
[ INFO] [1559215882.971461633, 590.425000000]: Created local_planner base_local_planner/TrajectoryPlannerROS
[ INFO] [1559215882.990769389, 590.442000000]: Sim period is set to 0.05
[ INFO] [1559215883.263756661, 590.676000000]: Recovery behavior will clear layer obstacles
[ INFO] [1559215883.278203387, 590.686000000]: Recovery behavior will clear layer obstacles
[ INFO] [1559215883.503132378, 590.831000000]: odom received!

In my map.yaml I have direct path to map.pgm

I do not know if this is a problem or not because:

I use p3dx model, on ROS Melodic, Ubuntu 18.04

EDIT:

costmap_common.yaml:

footprint: [[0.07, 0.19], [0.17, 0.08], [0.17, -0.08], [0.07, -0.19], [-0.07, -0.19], [-0.09, -0.16], [-0.19, -0.16], [-0.26, -0.05], [-0.26, 0.05], [-0.19, 0.16], [-0.09, 0.16], [-0.07, 0.19]]
footprint_padding: 0.01

robot_base_frame: base_link
update_frequency: 2.0
publish_frequency: 3.0
transform_tolerance: 0.5

resolution: 0.05

obstacle_range: 5.5
raytrace_range: 6.0

#layer definitions
static:
    map_topic: /map
    subscribe_to_updates: true

obstacles_laser:
    observation_sources: laser
    laser: {data_type: LaserScan, clearing: true, marking: true, topic: /p3dx/laser/scan, inf_is_valid: true}

inflation:
    inflation_radius: 1.0

costmap_local.yaml

global_frame: map
rolling_window: true

plugins:
  - {name: obstacles_laser,           type: "costmap_2d::ObstacleLayer"}
  - {name: inflation,                 type: "costmap_2d::InflationLayer"}

global_costmap.yaml

global_frame: map
rolling_window: false
track_unknown_space: true
static_map: true


plugins:
  - {name: static,                  type: "costmap_2d::StaticLayer"}
  - {name: inflation,               type: "costmap_2d::InflationLayer"}

planner.yaml

controller_frequency: 2.0
recovery_behaviour_enabled: true

NavfnROS:
  allow_unknown: true 
  default_tolerance: 0.1 

TrajectoryPlannerROS:
  # Robot Configuration Parameters
  acc_lim_x: 2.5
  acc_lim_theta:  3.2

  max_vel_x: 1.0
  min_vel_x: 0.0

  max_vel_theta: 1.0
  min_vel_theta: -1.0
  min_in_place_vel_theta: 0.2

  holonomic_robot: false
  escape_vel: -0.1

  # Goal Tolerance Parameters
  yaw_goal_tolerance: 0.1
  xy_goal_tolerance: 0.1
  latch_xy_goal_tolerance: false

  # Forward Simulation Parameters
  sim_time: 2.0
  sim_granularity: 0.02
  angular_sim_granularity: 0.02
  vx_samples: 6
  vtheta_samples: 20
  controller_frequency: 2.0

  # Trajectory scoring parameters
  meter_scoring: true 
  occdist_scale:  0.1 
  pdist_scale: 0.75  
  gdist_scale: 1.0 

  heading_lookahead: 0.325 
  heading_scoring: false  
  heading_scoring_timestep: 0.8   
  dwa: true 
  simple_attractor: false
  publish_cost_grid_pc: true  

  # Oscillation Prevention Parameters
  oscillation_reset_dist: 0.25 
  escape_reset_dist: 0.1
  escape_reset_theta: 0.1

DWAPlannerROS:
  # Robot configuration parameters  
  acc_lim_x: 2.5
  acc_lim_y: 0
  acc_lim_th: 3.2

  max_vel_x: 0.5
  min_vel_x: 0.0
  max_vel_y: 0
  min_vel_y: 0

  max_vel_trans: 0.5
  max_vel_trans: 0.1
  max_vel_theta: 1.0
  max_vel_theta: 0.2

  # Goal Tolerance Parameters
  yaw_goal_tolerance: 0.1
  xy_goal_tolerance: 0.2
  latch_xy_goal_tolerance: false

move_base.launch

<?xml version="1.0"?>

<launch>

  <arg name="no_static_map" default="false"/>
  <arg name="base_global_planner" default="navfn/NavfnROS"/>
<!-- <arg name="base_local_planner" default="dwa_local_planner/DWAPlannerROS"/> -->
  <arg name="base_local_planner" default="base_local_planner/TrajectoryPlannerROS"/>


<node pkg="move_base" type="move_base" respawn="false" name="move_base"
output="screen">

    <param name="base_global_planner" value="$(arg base_global_planner)"/>
    <param name="base_local_planner" value="$(arg base_local_planner)"/> 
    <rosparam file="$(find p3dx_control)/config/planner.yaml" command="load"/>

    <rosparam file="$(find p3dx_control)/config/costmap_common.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find p3dx_control)/config/costmap_common.yaml" command="load" ns="local_costmap" />


    <rosparam file="$(find p3dx_control)/config/costmap_local.yaml" command="load" ns="local_costmap" />
    <param name="local_costmap/width" value="10.0"/>
    <param name="local_costmap/height" value="10.0"/>


    <rosparam file="$(find p3dx_control)/config/global_costmap.yaml" command="load" ns="global_costmap" unless="$(arg no_static_map)"/>

    <param name="global_costmap/width" value="100.0" if="$(arg no_static_map)"/>
    <param name="global_costmap/height" value="100.0" if="$(arg no_static_map)"/>

</node>
</launch>

amcl.launch

<?xml version="1.0"?>

<launch>
  <arg name="map_file" default="$(find p3dx_control)/map2.yaml"/>
  <arg name="use_map_topic" default="true"/>
  <arg name="scan_topic" default="p3dx/laser/scan" />


  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />


  <node pkg="amcl" type="amcl" name="amcl">
    <param name="use_map_topic" value="$(arg use_map_topic)"/>
    <!-- Publish scans from best pose at a max of 10 Hz -->
    <param name="odom_model_type" value="diff"/>
    <param name="odom_alpha5" value="0.1"/>
    <param name="gui_publish_rate" value="10.0"/>
    <param name="laser_max_beams" value="60"/>
    <param name="laser_max_range" value="12.0"/>
    <param name="min_particles" value="500"/>
    <param name="max_particles" value="2000"/>
    <param name="kld_err" value="0.05"/>
    <param name="kld_z" value="0.99"/>
    <param name="odom_alpha1" value="0.2"/>
    <param name="odom_alpha2" value="0.2"/>
    <!-- translation std dev, m -->
    <param name="odom_alpha3" value="0.2"/>
    <param name="odom_alpha4" value="0.2"/>
    <param name="laser_z_hit" value="0.5"/>
    <param name="laser_z_short" value="0.05"/>
    <param name="laser_z_max" value="0.05"/>
    <param name="laser_z_rand" value="0.5"/>
    <param name="laser_sigma_hit" value="0.2"/>
    <param name="laser_lambda_short" value="0.1"/>
    <param name="laser_model_type" value="likelihood_field"/>
    <!-- <param name="laser_model_type" value="beam"/> -->
    <param name="laser_likelihood_max_dist" value="2.0"/>
    <param name="update_min_d" value="0.25"/>
    <param name="update_min_a" value="0.2"/>
    <param name="odom_frame_id" value="odom"/>
    <param name="resample_interval" value="1"/>
    <!-- Increase tolerance because the computer can get quite busy -->
    <param name="transform_tolerance" value="0.5"/>
    <param name="recovery_alpha_slow" value="0.0"/>
    <param name="recovery_alpha_fast" value="0.0"/>
    <remap from="scan" to="$(arg scan_topic)"/>
  </node>

</launch>

Asked by aefka on 2019-05-30 06:52:39 UTC

Comments

I don't know about the first one but for:

Map update loop missed its desired rate of 4.0000Hz... the loop actually took 0.2680 seconds

I think you need to reduce the control loop speed to like 10 Hz or 2 Hz

Asked by Usui on 2019-06-03 19:25:02 UTC

I change to 2 Hz and warrning doesn't appear, so thank :) But I still can't reach a goal ;/

Asked by aefka on 2019-06-04 00:48:32 UTC

did it give anything? any error message? also have you successfully do the 2d nav button on rviz?

Asked by Usui on 2019-06-04 16:16:24 UTC

it would be nice if you upload your files too

Asked by Usui on 2019-06-09 23:03:24 UTC

I'm so sorry, i don't saw your answer. No, model is moving to the some place on the map, but not to the goal. I set goal via rviz 2DNavGoal, but I don't have any error message, model still looking for path to the goal, got to the some place (out of the path to the goal).

Okej, I upload my config files

Asked by aefka on 2019-06-10 05:12:34 UTC

@aefka @Usui were you able to solve this problem? I am stuck with the same

Asked by hunterlineage1 on 2023-04-16 22:13:24 UTC

Answers