Rosanswers logo

Hello everyone,

I'm currently building a robot that will navigate in a building. It will have odometry for localization and IR range sensor (with data send as LaserScan) for obstacle detection. However I don't want it to avoid the obstacle, I just want it to stop when it detects an obstacle.

How can I disable obstacle avoidance in the navigation stack (I still require the navigation_stack for the global pathfinding) ?

I was considering setting marking and clearing to false in the costmap_commons_params.yml. Ex: laser_scan_sensor: {sensor_frame: base_link, data_type: LaserScan, topic: sharp, marking: false, clearing: false}

As I understand it, the sensor will draw nothing on the costmap and therefor the robot will not try to avoid the obstacle. Am I correct ?

Is there an other simpler way to do that ?

Thank you in advance for your answers.

Originally posted by Bacab on ROS Answers with karma: 35 on 2015-01-27

Post score: 0

Original comments

Comment by dornhege on 2015-01-27:
Do you do the stopping or do you want the nav_stack to do it? In other words: Would it be OK for you if the navstack is blind?

Comment by David Lu on 2015-01-27:
Which distribution are you using?

Comment by Bacab on 2015-01-27:
Thanks for your answers. @dornhege: Yes I want the navigation stack to be blind. The controller will listen to the LaserScan thread and do the stopping. @David Lu: I use Indigo


1 Answer 1


Rosanswers logo

An easier way to disable the obstacle avoidance would be to remove the obstacles layer from the plugins parameter.

To do this, in your global_costmap.yaml, add a parameter called plugins.

    - {name: static_layer, type: 'costmap_2d::StaticLayer'}

Originally posted by David Lu with karma: 10932 on 2015-01-27

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by Bacab on 2015-01-28:
How would you do that ?

Comment by David Lu on 2015-01-29:
When you start move_base, does it say anything about using pre-hydro parameters?

Comment by Bacab on 2015-01-29:
Thank you for your answer. I can't launch the move_base node for some reason. I'll open an other question on this one (ERROR: cannot launch node of type [move_base/move_base]: can't locate node [move_base] in package [move_base] even if I succeed in launching the file move_base_0.3_to_0.2.launch)

Comment by Zeken on 2019-09-20:
Hi, I know this is thread is very old, but can I ask is it as easy as putting in this plugin into the global_costmap.yaml? What does this plugin actually do?

Comment by David Lu on 2019-09-23:
Please open your own question.


Your Answer

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