Ask Your Question
0

Robot thinks there is an obstacle

asked 2018-11-26 13:24:51 -0500

stevemartin gravatar image

updated 2018-11-27 03:26:04 -0500

Hi there,

I have recently added move base for the navigation and I have two sensors for navigation, 2D lidar and ultrasonic sensor. Here is my common_costmap_params:

 obstacle_range : 2.5
raytrace_range : 3.0

#robot_radius: 0.3
footprint: [[0.3, 0.15], [0.3,-0.15], [-0.3, -0.15], [-0.3, 0.15]]
footprint_padding: 0.1

inflation_radius: 1.0
cost_scaling_factor: 3.0

My local_costmap_params:

local_costmap:
  global_frame: odom
  robot_base_frame: base_link
  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 0.5
  static_map: false
  rolling_window: true # Follow robot while navigating
  width: 3.0
  height: 3.0
  resolution: 0.2
  plugins:
  - {name: inflation_layer, type: "costmap_2d::InflationLayer"}
  - {name: sonar_layer,   type: "range_sensor_layer::RangeSensorLayer"}
  - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}

  #Configuration for the sensors that the costmap will use to update a map
  sonar_layer:
    topics: ["/sonar"]
    no_readings_timeout: 1.0

  obstacle_layer:
    observation_sources: laser
    laser: {data_type: LaserScan, sensor_frame: laser_link, topic: /laser, expected_update_rate: 0.4,
      observation_persistence: 0.0, marking: true, clearing: true}

My global_costmap_params:

global_costmap:
  global_frame: map
  robot_base_frame: base_link

  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 2
  resolution: 0.2

  static_map: true

  plugins:
  - {name: static_layer, type: "costmap_2d::StaticLayer"}
  #- {name: sonar_layer,   type: "range_sensor_layer::RangeSensorLayer"}
  #- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
  - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

My move_base_params:

shutdown_costmaps: false
controller_frequency: 10.0
planner_patience: 5.0
controller_patience: 15.0
conservative_reset_dist: 3.0
planner_frequency: 5.0
oscillation_timeout: 10.0
oscillation_distance: 0.2

And finally my dwa_local_planner_params :

    DWAPlannerROS:

  # Robot Configuration Parameters
    max_vel_x: 0.26
    min_vel_x: -0.26

    max_vel_y: 0.0
    min_vel_y: 0.0

# The velocity when robot is moving in a straight line
    max_vel_trans:  0.26
    min_vel_trans:  0.13

    max_vel_theta: 1.82
    min_vel_theta: 0.9

    acc_lim_x: 2.5
    acc_lim_y: 0.0
    acc_lim_th: 3.2 

# Goal Tolerance Parametes
    xy_goal_tolerance: 0.05
    yaw_goal_tolerance: 0.05
    latch_xy_goal_tolerance: false

# Forward Simulation Parameters
    sim_time: 4.0
    sim_granularity: 0.025
    vx_samples: 20
    vy_samples: 0
    vth_samples: 40
    controller_frequency: 10.0

# Trajectory Scoring Parameters
    path_distance_bias: 32.0
    goal_distance_bias: 20.0
    occdist_scale: 0.02
    forward_point_distance: 0.325
    stop_time_buffer: 0.2
    scaling_speed: 0.25
    max_scaling_factor: 0.2

# Oscillation Prevention Parameters
    oscillation_reset_dist: 0.05

# Debugging
    publish_cost_grid: true

However, when I run ros and try to use navigation I get this strange error:

[ WARN] [1543308969.019537296, 5.292000000]: Could not transform the global plan to the frame of the controller
[ERROR] [1543308969.019552784, 5.292000000]: 
[ INFO] [1543308969.120084338, 5.392000000]: Got new plan
[ERROR] [1543308969.120251922, 5.393000000]: Cannot move to the goal

What am I doing wrong here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-26 15:22:04 -0500

billy gravatar image

That error occurs when movebase has sensor data or map information that there is an obstacle near or within the frame of the robot. If you look at the cost map in RVIZ you should be able to see if the obstacle is from the map or from a sensor. Then you can work on a solution.

If from map then make sure you've set the initial pose properly, check inflation radius, etc.

If from a sensor, then you have more work to do. You may have sensor noise that creates spurious "obstacles" that aren't really there in which case you need to work on clearing. What does your sonar sensor say where there is no reflection? Does it report a very long distance or a very short distance? Same with lidar, what distance is reported when no signal is received. You need to make sure that laser doesn't report small value that puts obstacles on the cost map near or within the robot.

edit flag offensive delete link more

Comments

@billy I have updated my answer and my sensors work as expected but now I am getting a new error (see the question again).

stevemartin gravatar imagestevemartin ( 2018-11-27 03:00:20 -0500 )edit

@stevemartin: could I ask you to please not edit questions after you've received an answer to your initial one? Right now the question's title refers to the "old" question, while with your edit you've essentially made this a new question.

It would be preferable for you to revert your edit, ..

gvdhoorn gravatar imagegvdhoorn ( 2018-11-27 03:11:30 -0500 )edit

.. tell us whether the answer by @billy answered your question and then if it did, accept the answer by @billy.

If you then run into other problems, it's fine to post a follow-up question in which you refer to the current one as a precursor to this one.

gvdhoorn gravatar imagegvdhoorn ( 2018-11-27 03:12:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-11-26 13:24:51 -0500

Seen: 98 times

Last updated: Nov 27 '18