ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to setup the yaml files for a modified map?

asked 2016-05-18 06:16:36 -0600

RosUser gravatar image

updated 2016-05-18 06:20:23 -0600

Hi all I'm using Nav2d where the part of simulator is replaced with my own physical robot. The map in simulator has larger dimension size than my map which is only 5x3 meters. Since the map size is changed then I understand that costmap.yaml, operator.yaml and navigator.yaml has to be changed, where I have set them to :


global_frame: odom
robot_base_frame: base_link
update_frequency: 10.0
publish_frequency: 2.0
publish_voxel_map: true
static_map: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.05
map_type: costmap
track_unknown_space: true
transform_tolerance: 0.3
obstacle_range: 2.0
min_obstacle_height: 0.0
max_obstacle_height: 2.0
raytrace_range: 4.5
robot_radius: 0.4
inflation_radius: 0.75
cost_scaling_factor: 2.0
lethal_cost_threshold: 100
observation_sources: scan
scan: {data_type: LaserScan, expected_update_rate: 0.6,
  observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}


max_velocity: 0.2
publish_route: true
max_free_space: 2.0
safety_decay: 0.50
distance_weight: 1
safety_weight: 2
conformance_weight: 1 
continue_weight: 0


map_inflation_radius: 1.0
robot_radius: 0.5
navigation_goal_distance: 0.10
navigation_goal_angle: 1.0
navigation_homing_distance: 0.30
exploration_goal_distance: 1.0
min_target_area_size: 1.0
visualize_frontiers: true

I understand the parameters in navigator when I change them, and it make good since but the reaction of robot is randomly each time when I change parameters in costmap and operator.

image description

My question is, am I hitting some limitations in these two files since robot stops after 20 cm moving or just make a turn ? Is there other files I also must change when map size is changed ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-05-18 08:25:44 -0600

Sebastian Kasperski gravatar image

There shouldn't be a need to change any of these parameters just because you use a different map. The operators costmap is independent from the global map.

I assume you are using a static map together with the localizer. In that case note that you can't use path planning before the particle filter has converged to the robot's position, which it hasn't yet in your picture.

edit flag offensive delete link more


I use localizer and static map. How can I decide to use particle filter first and then path planner if it is possible !?

RosUser gravatar image RosUser  ( 2016-05-18 09:48:03 -0600 )edit

I understand it in this way that first a desired goal is defined in map(by using 2D Nav Goal), then a shortest path is created and after that particle filter starts converge robot's position!

RosUser gravatar image RosUser  ( 2016-05-18 09:51:46 -0600 )edit

No, the path planner can't do any planning until it knows where the robot is. There is a service "Localize", that moves the robot straight until it gets a pose. See here for the action interface. You might need to start the localize_client to use the service.

Sebastian Kasperski gravatar image Sebastian Kasperski  ( 2016-05-19 01:37:22 -0600 )edit

When I click in map for desired goal it first find a path (pink line) very fast before robot make any moves. I haven't studiet Navigator code in detail but I only knew that it uses Dijkstra algorithm.

RosUser gravatar image RosUser  ( 2016-05-19 03:33:27 -0600 )edit

...and my question is how can path be created immediately first? But you mentioned service "Localize" take action first where it moves robot straight until it gets a position and then path is created!

RosUser gravatar image RosUser  ( 2016-05-19 03:42:18 -0600 )edit

Question Tools



Asked: 2016-05-18 06:16:36 -0600

Seen: 737 times

Last updated: May 18 '16