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

Navigation stack on youBot

asked 2011-09-07 01:54:20 -0600

Lorenzo gravatar image

updated 2011-09-07 01:59:28 -0600

dornhege gravatar image

Hi everybody, I am developing my final thesis using a KUKA youBot. I am managing to run the navigation stack on it, after many attempts, everything seems to work (no warning, no errors), but when I give through rviz a navigation goal this is what happens

http://www.youtube.com/watch?v=EjOxJTRCj7s

The green path is the full plan for the robot (topic: NavfnROS/plan), while the red path is the portion of the global plan that the local planner is currently pursuing (TrajectoryPlannerROS/global_plan). There should be also TrajectoryPlannerROS/local_plan in black, but it is not visible.

Here are the configuration files I am using:

costmap_common_params.yaml

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[0.290,0.190], [0.290,-0.190], [-0.290,-0.190], [-0.290,0.190]]
#robot_radius: ir_of_robot
inflation_radius: 0.55

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: base_laser, data_type: LaserScan, topic: scan\
, marking: false, clearing: false}

#point_cloud_sensor: {sensor_frame: openni_rgb_optical_frame, data_type: PointC\
loud2, topic: camera/rgb/points, marking: false, clearing: false}
--------------------------------------------

global_costmap_params.yaml

global_costmap:
  global_frame: /map
  robot_base_frame: /base_footprint
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: true
  transform_tolerance: 0.8
(If a use a lower tolerance I obtain the warning concerning the costmap2dros transform timeout )
-----------------------------

local_costmap_params.yaml

local_costmap:
  global_frame: odom
  robot_base_frame: base_footprint
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: false
  width: 6.0
  height: 6.0
  resolution: 0.10
  origin_x: 10
  origin_y: 10

base_local_planner_params.yaml

TrajectoryPlannerROS:
  max_vel_x: 0.07
  min_vel_x: 0.05
  max_rotational_vel: 0.07
  min_in_place_rotational_vel: 0.05

  acc_lim_th: 4.0
  acc_lim_x: 3.7
  acc_lim_y: 3.5

  yaw_goal_tolerance: 0.2
  xy_goal_tolerance: 0.2

  holonomic_robot: true
  y_vels: [-0.1, -0.05, 0.05, 0.1]

  dwa: true

The navigation is blind because in the task involved will not be dynamic obstacles, the only ones are the work space walls.

Am I missing something? What possibly is going wrong?

Thank you so much for the help

Lorenzo

edit retag flag offensive close merge delete

7 Answers

Sort by ยป oldest newest most voted
0

answered 2011-09-07 03:49:14 -0600

eitan gravatar image

updated 2011-09-07 03:50:00 -0600

There are a couple of problems that I see in your parameter set:

1) If you really do intend to avoid obstacles based only on localization and a static map, you'll need to make sure that the local costmap is set up to run with that information. Otherwise, the local planner won't know about those static obstacles. If the map is small, you'll probably just be able to have the local costmap have the same parameters as the global costmap. However, if the map is going to be large, you'll probably want to feed the local costmap tiles of the global map to make sure computing the cost function for the map doesn't get too expensive.

2) The velocity limits you've set are extremely limiting. It'll be hard for the robot to follow any global path when its rotational velocity is limited to 0.07 radians/second and its translational velocity is limited to 0.07 meters/second. To make those limits work, I'd expect you'll have to play around a lot with the trajectory scoring parameters. Personally, I've never run navigation with such tight constraints.

edit flag offensive delete link more
0

answered 2011-09-16 02:50:52 -0600

Lorenzo gravatar image

Thank you so much! With your help the new situation is:

http://www.youtube.com/watch?v=wcHE1yCuq8w

Now everything works, but still it seems there is a problem with amcl, since it constantly changes (incorrectly) the transformation between /map and /odom.

The green lines are the inflated obstacles, so they are correct, I do not display obstacles because they are too heavy for rviz, but they works.

I tried to change amcl.launch in order to reduce the corrections, but the problem remains...

Here are the configuration files

costmap_common_params.yaml

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: base_laser, data_type: LaserScan, topic: scan, marking: false, clearing: false}

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

#Obstacle marking parameters
obstacle_range: 2.5
max_obstacle_height: 2.0
raytrace_range: 3.0

#The footprint of the robot and associated padding
footprint: [[0.290,0.190], [0.290,-0.190], [-0.290,-0.190], [-0.290,0.190]]
footprint_padding: 0.05

#Cost function parameters
inflation_radius: 0.1
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

local_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: 2.0

  static_map: true
  rolling_window: false


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

TrajectoryPlannerROS:
  #Set the acceleration limits of the robot
  acc_lim_th: 4.0
  acc_lim_x: 3.7
  acc_lim_y: 3.5

  #Set the velocity limits of the robot
  max_vel_x: 0.2
  min_vel_x: 0.05
  max_rotational_vel: 0.3
  min_in_place_rotational_vel: 0.05

  #The velocity the robot will command when trying to escape from a stuck situation
  escape_vel: -0.1

  #For this example, we'll use a holonomic robot
  holonomic_robot: true

  #Since we're using a holonomic robot, we'll set the set of y velocities it will sample
  y_vels: [-0.3, -0.1, 0.1, 0.3]

  #Set the tolerance on achieving a goal
  xy_goal_tolerance: 0.1
  yaw_goal_tolerance: 0.05

  #We'll configure how long and with what granularity we'll forward simulate trajectories
  sim_time: 1.7
  sim_granularity: 0.025
  vx_samples: 3
  vtheta_samples: 20
      #Parameters for scoring trajectories 
      goal_distance_bias: 1.5
      path_distance_bias: 0.6
      occdist_scale: 0.01
      heading_lookahead: 0.325

      #We'll use the Dynamic Window Approach to control instead of Trajectory Rollout for this example
      dwa: true

      #How far the robot must travel before oscillation flags are reset
      oscillation_reset_dist: 0.05

      #Eat up the plan as the robot moves along it
      prune_plan: true

and this is the amcl launch file:

<launch>
<node pkg="amcl" type="amcl" name="amcl">
  <!-- Publish scans from best pose at a max of 10 Hz -->
  <param name="odom_model_type" value="omni"/>
  <param name="odom_alpha5" value="0.001"/>
  <param name="transform_tolerance" value="0.2" />
  <param name="gui_publish_rate ...
(more)
edit flag offensive delete link more
0

answered 2011-09-15 05:11:30 -0600

eitan gravatar image

A couple of things:

1) I tried to run in simulation with similar parameters, I'll post them at the bottom of this post, and things worked for me.

2) Its not clear from the video you posted whether or not the local costmap's obstacles are being updated properly. This tutorial shows how to display navigation-relevant information in rviz. Specifically, I'd really like to know whether move_base/local_costmap/obstacles shows anything.

Here are the params I used in stage:

costmap_common_params.yaml

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

#Obstacle marking parameters
obstacle_range: 2.5
max_obstacle_height: 2.0
raytrace_range: 3.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.01

#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

local_costmap_params.yaml

local_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: 2.0

  static_map: true
  rolling_window: false

global_costmap_params.yaml

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

base_local_planner_params.yaml

TrajectoryPlannerROS:
  #Set the acceleration limits of the robot
  acc_lim_th: 4.0
  acc_lim_x: 3.7
  acc_lim_y: 3.5

  #Set the velocity limits of the robot
  max_vel_x: 0.2
  min_vel_x: 0.05
  max_rotational_vel: 0.3
  min_in_place_rotational_vel: 0.05

  #The velocity the robot will command when trying to escape from a stuck situation
  escape_vel: -0.1

  #For this example, we'll use a holonomic robot
  holonomic_robot: true

  #Since we're using a holonomic robot, we'll set the set of y velocities it will sample
  y_vels: [-0.3, -0.1, 0.1, 0.3]

  #Set the tolerance on achieving a goal
  xy_goal_tolerance: 0.1
  yaw_goal_tolerance: 0.05

  #We'll configure how long and with what granularity we'll forward simulate trajectories
  sim_time: 1.7
  sim_granularity: 0.025
  vx_samples: 3
  vtheta_samples: 20

  #Parameters for scoring trajectories
  goal_distance_bias: 0.8
  path_distance_bias: 0.6
  occdist_scale: 0.01
  heading_lookahead: 0.325

  #We'll use the Dynamic Window Approach to control instead of Trajectory Rollout for this example
  dwa: true

  #How far the robot must travel before oscillation flags are reset
  oscillation_reset_dist: 0.05

  #Eat up the plan as the robot moves along it
  prune_plan: true

Hope this helps.

edit flag offensive delete link more
0

answered 2011-09-16 06:46:05 -0600

eitan gravatar image

Sorry, the syntax for comments doesn't allow me to post correctly.

Have you looked at the Navigation Tuning Guide? Specifically, section 2.

edit flag offensive delete link more
0

answered 2011-09-14 21:28:04 -0600

Lorenzo gravatar image

I've tried to change settings, and configuration files, but nothing improved... Any suggestions?

Thank you so much, I am quite stuck and I need help

edit flag offensive delete link more
0

answered 2011-09-16 06:39:59 -0600

Lorenzo gravatar image

The page you linked does not exist anymore. If I am not getting wrong is the one explaining to test odometry during rotation and translation setting laserscan decadence to a high value, right? I have done it, translation is ok, rotation shows an error of almnost 10 degree, but I thought nothing can be done about it.

edit flag offensive delete link more

Comments

That is what I was referring to. An error of 10 degrees in rotation isn't awesome, but is something that AMCL should probably be able to deal with. Running the local planner in the odometric frame would likely help you. Is there any reason you can't run it in that frame and feed it laser data?
eitan gravatar image eitan  ( 2011-09-16 06:49:10 -0600 )edit
0

answered 2011-09-09 03:03:34 -0600

Lorenzo gravatar image

Thank you so much for the help. I changed che configuration files and what I am obtaining now is:

http://www.youtube.com/watch?v=vaIuS2Bii_U

the robot does not follow the path planned and actually it penetrates the wall, as it was not an obstacle

My new configuration files are

costmap_common_params.yaml

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[0.290,0.190], [0.290,-0.190], [-0.290,-0.190], [-0.290,0.190]]
#robot_radius: ir_of_robot
#inflation_radius: 0.55

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: base_laser, data_type: LaserScan, topic: scan\
, marking: false, clearing: false}

#point_cloud_sensor: {sensor_frame: openni_rgb_optical_frame, data_type: PointC\
loud2, topic: camera/rgb/points, marking: false, clearing: false}

local_costmap_params.yaml
ocal_costmap:
  global_frame: /map
  robot_base_frame: /base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: true
  transform_tolerance: 0.8

global_costmap_params.yaml

global_costmap:
  global_frame: /map
  robot_base_frame: /base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: true
  transform_tolerance: 0.8

base_local_planner_params.yaml

rajectoryPlannerROS:
  max_vel_x: 0.2
  min_vel_x: 0.05
  max_rotational_vel: 0.3
  min_in_place_rotational_vel: 0.05

  acc_lim_th: 4.0
  acc_lim_x: 3.7
  acc_lim_y: 3.5

  yaw_goal_tolerance: 0.2
  xy_goal_tolerance: 0.1

  holonomic_robot: true
  y_vels: [-0.2, -0.05, 0.05, 0.2]

  dwa: false (using trajectory rollout or dwa leads to the same results)
edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-09-07 01:54:20 -0600

Seen: 3,216 times

Last updated: Sep 16 '11