The robot does not follow path proper if goal in /map frame

asked 2018-10-29 11:12:56 -0500

Stepan Kostusiev gravatar image

Hello, I'm running ROS Kinetic in Ubuntu 16.04 on Lattepanda.

I want to send my robot to goal in /map frame. When I do this I have warning message:

Control loop missed its desired rate of 5.0000Hz... the loop actually took 0.9997 seconds

And my robot goes to goal not straight but like snake around path. CPU not loaded.

image description

Also when I change global_frame from /map to /odom in global_costmap_params.yaml everything was fine. Not warnings and robot follow path correctly, but my goal move with /odom frame. My localization node make transform /map to /odom and goal position depends on it. I want to fix my goal in /map frame.

I don't provide static map. I want to navigate my robot without map. I use IMU with magnetometer, encoders, GPS. To get localization I use robot_localization and navsat_transform node for base_footprint -> odom and odom -> map transforms. To simplify robot testing I generate empty laserscan data.

move_base.launch

<launch>
  <arg name="scan_topic" default="scan_filtered" />
  <arg name="odom_topic" default="odometry/filtered" /> 

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

    <rosparam file="$(find poopbot_launch)/param/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find poopbot_launch)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find poopbot_launch)/param/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find poopbot_launch)/param/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find poopbot_launch)/param/base_local_planner_params.yaml" command="load" />
    <rosparam file="$(find poopbot_launch)/param/dwa_local_planner_params.yaml" command="load" /> 
    <rosparam file="$(find poopbot_launch)/param/move_base_params.yaml" command="load" />
    <rosparam file="$(find poopbot_launch)/param/global_planner_params.yaml" command="load" />

    <remap from="odom" to="$(arg odom_topic)"/>
    <remap from="scan" to="$(arg scan_topic)"/>
  </node>
</launch>

move_base_params.yaml

shutdown_costmaps: false 
controller_frequency: 5.0 
controller_patience: 3.0 
planner_frequency: 0.0 
planner_patience: 2.0 
max_planning_retries: -1.0
conservative_reset_dist: 3.0 
recovery_behavior_enabled: true 
clearing_rotation_allowed: true 
oscillation_timeout: 0.0 
oscillation_distance: 0.1
recovery_behaviors: [
  {name: conservative_reset, type: clear_costmap_recovery/ClearCostmapRecovery},
  {name: rotate_recovery, type: rotate_recovery/RotateRecovery},
  {name: aggressive_reset, type: clear_costmap_recovery/ClearCostmapRecovery}]
base_local_planner: "dwa_local_planner/DWAPlannerROS"
base_global_planner: "global_planner/GlobalPlanner"

common_costmap_params.yaml

footprint: [[0.17, 0.15], [-0.17, 0.15], [-0.17, -0.15], [0.17, -0.15], [0.25, 0]] 
map_type: costmap

inflation_layer:
  enabled: true
  inflation_radius: 0.4  
  cost_scaling_factor: 15  

static_layer:
  enabled: true
  unknown_cost_value: -1 
  lethal_cost_threshold: 253 
  map_topic: map 
  first_map_only: false 
  subscribe_to_updates: false 
  track_unknown_space: false 
  use_maximum: false 
  trinary_costmap: true #(bool, default: true)

obstacle_layer:
  enabled: true
  max_obstacle_height: 0.60 
  track_unknown_space: false 
  footprint_clearing_enabled: true 
  combination_method: 0 
  observation_sources: scan
  scan: { 
    data_type: LaserScan,
    topic: scan,
    observation_persistence: 0.0, 
    expected_update_rate: 0.0, 
    marking: true,
    clearing: true,
    min_obstacle_height: 0.0,
    max_obstacle_height: 0.5,
    obstacle_range: 2.5,
    raytrace_range: 3.0
  }

global_costmap_params.yaml

global_costmap:
   global_frame: map
   robot_base_frame: base_footprint
   update_frequency: 0.5
   publish_frequency: 0.5
   static_map: false
   transform_tolerance: 5.0 
   rolling_window: true
   width: 20.0 
   height: 20.0
   resolution: 0.2
   plugins:
     - {name: static_layer, type: "costmap_2d::StaticLayer"}
     - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
     - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

local_costmap_params.yaml

local_costmap:
   global_frame: odom
   robot_base_frame: base_footprint
   update_frequency: 1.0
   publish_frequency: 1.0
   static_map: false
   transform_tolerance: 0.5
   rolling_window: true
   width: 2.0
   height: 2.0
   resolution: 0.05
   plugins ...
(more)
edit retag flag offensive close merge delete