0
$\begingroup$

Rosanswers logo

I am trying navigation_stage package in Hydro, ubuntu 12.04. I am using move_base_multi_robot.lauch.

But navfn is planning through the walls. The map used in willow map which have small openinings. Navfn is not considering size of the robot.

EDIT 3: The other problem is cost map is not accumulating the observed obstacles which were not part of map. What i understand is when rbot gets stucj, recovery behaviour is initiated and costmap is cleared. All previous observations are lost in cost map. Because of this, robot keep on oscillating from one small opening to next.Following is the configuration files:

There is also an extrapolation error reported : " lookup would require extrapolation into future. Requested time is 627.3 but the latest data is at 627.2 when looking up for transform from frame [robot1/odom] to frame [map]

local cost map params

local_costmap:
  #We'll publish the voxel grid used by this costmap
  publish_voxel_map: true

  #Set the global and robot frames for the costmap
  global_frame: odom
  robot_base_frame: base_link

  #Set the update and publish frequency of the costmap
  update_frequency: 5.0
  publish_frequency: 2.0

  #We'll configure this costmap to be a rolling window... meaning it is always
  #centered at the robot
  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  resolution: 0.025
  origin_x: -1.0
  origin_y: -1.0
  map_type: costmap


global cost map params
global_costmap:
  #Set the global and robot frames for the costmap
  global_frame: /map
  robot_base_frame: base_link

  #Set the update and publish frequency of the costmap
  update_frequency: 5.0
  publish_frequency: 0.0

  #We'll use a map served by the map_server to initialize this costmap
  static_map: true
  rolling_window: false

  footprint_padding: 0.02
  map_type: costmap

move_base.xml

<launch>
<!--
  Example move_base configuration. Descriptions of parameters, as well as a full list of all amcl parameters, can be found at http://www.ros.org/wiki/move_base.
-->
  <node pkg="move_base" type="move_base" respawn="false" name="move_base_node" output="screen">
    <param name="footprint_padding" value="0.01" />
    <param name="controller_frequency" value="10.0" />
    <param name="controller_patience" value="3.0" />

    <param name="oscillation_timeout" value="30.0" />
    <param name="oscillation_distance" value="0.5" />

    <!--
    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
    -->

    <rosparam file="$(find navigation_stage)/move_base_config/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find navigation_stage)/move_base_config/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find navigation_stage)/move_base_config/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find navigation_stage)/move_base_config/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find navigation_stage)/move_base_config/base_local_planner_params.yaml" command="load" />
    <!--
    <rosparam file="$(find navigation_stage)/move_base_config/dwa_local_planner_params.yaml" command="load" />
    -->
  </node>
</launch>

costmap_common_params.yaml

#For this example we'll configure the costmap in voxel-grid mode
map_type: voxel

#Voxel grid specific parameters
origin_z: 0.0
z_resolution: 0.2
z_voxels: 10
unknown_threshold: 9
mark_threshold: 0

#Set the tolerance we're willing to have for tf transforms
transform_tolerance: 0.3

#Obstacle marking parameters changed from 2.5 to 4.5 meters
obstacle_range: 14.5
max_obstacle_height: 2.0
#raytrace range changed from three to five meters
raytrace_range: 15.0

#The footprint of the robot and associated padding
footprint: [[-0.325, -0.325], [-0.325, 0.325], [0.325, 0.325], [0.46, 0.0], [0.325, -0.325]]
footprint_padding: 0.2

#Cost function parameters
inflation_radius: 0.55
cost_scaling_factor: 10.0

#The cost at which a cell is considered an obstacle when a map is read from the map_server
lethal_cost_threshold: 100

#Configuration for the sensors that the costmap will use to update a map
observation_sources: base_scan
base_scan: {data_type: LaserScan, expected_update_rate: 0.4,
  observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}

image description

edit 1: image description image description image description image description image description image description image description image description

It can be seen from sequence of these images that robot oscillates a lot. The map visualised is from topic /robot/move base node/global costmap/costmsp

The console output is as follows

lization) move_base_node (move_base/move_base)

auto-starting new master
process[master]: started with pid [5868]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 711d29f0-cc69-11e3-ae1a-00219b4712db
process[rosout-1]: started with pid [5881]
started core service [/rosout]
process[map_server-2]: started with pid [5895]
process[stageros-3]: started with pid [5915]
process[robot_0/move_base_node-4]: started with pid [5930]
process[robot_0/fake_localization-5]: started with pid [5945]
process[robot_1/move_base_node-6]: started with pid [6016]
process[robot_1/fake_localization-7]: started with pid [6055]
process[rviz-8]: started with pid [6094]
[ INFO] [1398423902.611603072, 0.400000000]: Loading from pre-hydro parameter style
[ INFO] [1398423902.613168796, 0.400000000]: Loading from pre-hydro parameter style
[ INFO] [1398423902.688667094, 0.400000000]: Using plugin "static_layer"
[ INFO] [1398423902.689555089, 0.400000000]: Using plugin "static_layer"
[ INFO] [1398423902.820690736, 0.600000000]: Requesting the map...
[ INFO] [1398423902.832775150, 0.600000000]: Requesting the map...
[ INFO] [1398423903.006369627, 0.800000000]: Resizing costmap to 584 X 526 at 0.100000 m/pix
[ INFO] [1398423903.006798763, 0.800000000]: Resizing costmap to 584 X 526 at 0.100000 m/pix
[ INFO] [1398423903.105284777, 0.900000000]: Received a 584 X 526 map at 0.100000 m/pix
[ INFO] [1398423903.106387280, 0.900000000]: Received a 584 X 526 map at 0.100000 m/pix
[ INFO] [1398423903.118228875, 0.900000000]: Using plugin "obstacle_layer"
[ INFO] [1398423903.120959682, 0.900000000]: Using plugin "obstacle_layer"
[ INFO] [1398423903.123606924, 0.900000000]:     Subscribed to Topics: base_scan
[ INFO] [1398423903.126138122, 0.900000000]:     Subscribed to Topics: base_scan
[ INFO] [1398423903.186841811, 0.900000000]: Using plugin "footprint_layer"
[ INFO] [1398423903.189624862, 0.900000000]: Using plugin "footprint_layer"
[ INFO] [1398423903.200209240, 0.900000000]: Using plugin "inflation_layer"
[ INFO] [1398423903.202976023, 0.900000000]: Using plugin "inflation_layer"
[ INFO] [1398423903.552735653, 1.300000000]: Loading from pre-hydro parameter style
[ INFO] [1398423903.584294897, 1.300000000]: Loading from pre-hydro parameter style
[ INFO] [1398423903.598261656, 1.300000000]: Using plugin "obstacle_layer"
[ INFO] [1398423903.628366041, 1.400000000]: Using plugin "obstacle_layer"
[ INFO] [1398423903.731914069, 1.500000000]:     Subscribed to Topics: base_scan
[ INFO] [1398423903.764563298, 1.500000000]:     Subscribed to Topics: base_scan
[ INFO] [1398423903.782795984, 1.500000000]: Using plugin "footprint_layer"
[ INFO] [1398423903.794150579, 1.500000000]: Using plugin "inflation_layer"
[ INFO] [1398423903.834527828, 1.600000000]: Using plugin "footprint_layer"
[ INFO] [1398423903.852023785, 1.600000000]: Using plugin "inflation_layer"
[ INFO] [1398423904.054029565, 1.800000000]: Created local_planner base_local_planner/TrajectoryPlannerROS
[ INFO] [1398423904.073211549, 1.800000000]: Sim period is set to 0.10
[ INFO] [1398423904.081724909, 1.800000000]: Created local_planner base_local_planner/TrajectoryPlannerROS
[ WARN] [1398423904.096906093, 1.800000000]: 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] [1398423904.117247230, 1.900000000]: Sim period is set to 0.10
[ WARN] [1398423904.140807836, 1.900000000]: Trajectory Rollout planner initialized with param meter_scoring not set. Set it to true to make your settins robust against changes of costmap resolution.

    [ WARN] [1398423904.406322508

, 2.200000000]: The base_scan observation buffer has not been updated for 1.30 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.406358325, 2.200000000]: The base_scan observation buffer has not been updated for 1.30 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.407153907, 2.200000000]: The base_scan observation buffer has not been updated for 0.70 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.506219439, 2.300000000]: The base_scan observation buffer has not been updated for 0.80 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.607484888, 2.400000000]: The base_scan observation buffer has not been updated for 1.50 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.608102022, 2.400000000]: The base_scan observation buffer has not been updated for 1.50 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.608460212, 2.400000000]: The base_scan observation buffer has not been updated for 0.90 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.706686676, 2.500000000]: The base_scan observation buffer has not been updated for 1.00 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.808078116, 2.600000000]: The base_scan observation buffer has not been updated for 1.70 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.808900751, 2.600000000]: The base_scan observation buffer has not been updated for 1.10 seconds, and it should be updated every 0.40 seconds. [ WARN] [1398423904.809313100, 2.600000000]: The base_scan observation buffer has not been updated for 1.70 seconds, and it should be updated every 0.40 seconds. [ INFO] [1398423904.874431385, 2.600000000]: odom received! [ WARN] [1398423904.906963957, 2.700000000]: The base_scan observation buffer has not been updated for 1.20 seconds, and it should be updated every 0.40 seconds. [ INFO] [1398423904.933096013, 2.700000000]: odom received! [ERROR] [1398423993.906444702, 91.700000000]: Extrapolation Error: Lookup would require extrapolation into the future. Requested time 91.700000000 but the latest data is at time 91.600000000, when looking up transform from frame [robot_1/odom] to frame [map]

[ERROR] [1398423993.906527544, 91.700000000]: Global Frame: robot_1/odom Plan Frame size 671: map

[ WARN] [1398423993.906584374, 91.700000000]: Could not transform the global plan to the frame of the controller
[ WARN] [1398424036.404220679, 134.200000000]: Clearing costmap to unstuck robot.
[ WARN] [1398424036.705563909, 134.500000000]: Rotate recovery behavior started.
[ERROR] [1398424036.705813136, 134.500000000]: Rotate recovery can't rotate in place because there is a potential collision. Cost: -1.00
[ WARN] [1398424103.904794598, 201.700000000]: Clearing costmap to unstuck robot.
[ WARN] [1398424104.205285965, 202.000000000]: Rotate recovery behavior started.
[ERROR] [1398424104.205546115, 202.000000000]: Rotate recovery can't rotate in place because there is a potential collision. Cost: -1.00
[ERROR] [1398424108.205809219, 206.000000000]: Extrapolation Error: Lookup would require extrapolation into the future.  Requested time 206.000000000 but the latest data is at time 205.900000000, when looking up transform from frame [robot_1/odom] to frame [map]

[ERROR] [1398424108.205965998, 206.000000000]: Global Frame: robot_1/odom Plan Frame size 755: map


[ WARN] [1398424108.206052855, 206.000000000]: Could not transform the global plan to the frame of the controller
^C[rviz-8] killing on exit

Is this problem related to some configuration or navfn is not meant to consider robot size! thnks prince


Originally posted by prince on ROS Answers with karma: 660 on 2014-04-24

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I don't see some parameters that I know of in costmap_common_params that would help you in the cost map: cost_scaling_factor and inflation_radius. I would throw these parameters in an inflation layer namespace. So it would look something like this in your .yaml file:

   inflation_layer:
      enabled:             true
      cost_scaling_factor: 10 #default value; for my work, I have been using values between 40-50
      inflation_radius:    0.55 #default value; for my work, I have been using values between 0.8-1.0

There are plenty of other parameters you can add in to get the costmap working the way you need it to. I would do some research here and read up on what other parameters you may want to add in rather than using the defaults: http://wiki.ros.org/costmap_2d/flat and http://wiki.ros.org/costmap_2d/hydro/inflation


Originally posted by jessiems10 with karma: 16 on 2015-10-01

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.