0
$\begingroup$

Rosanswers logo

Hello everyone,

I am building a robot that will be navigating indoors. But the place that it is designed to navigate in is supposed to have a lot of people. I don't want the robot to avoid obstacles, I just want it to stop (maybe cancel navigation) if an obstacle is in it's path. I checked out this question here Not sure if I'm doing it right

I added the plugin into the global_costmap.yaml:

global_costmap:
    global_frame: /map
    robot_base_frame: /base_footprint
    update_frequency: 2.0
    publish_frequency: 0
    static_map: true
    rolling_window: false
    resolution: 0.05
    transform_tolerance: 1.5
    map_type: costmap
    plugins: {name: static_layer, type: 'costmap_2d::StaticLayer'}
GlobalPlanner:        
    allow_unknown: false 

It seemed to have disabled the entire costmap. In rviz the costmap is gone:/

Then it gave me this error:

[move_base-16] process has died [pid 13627, exit code -6, cmd /opt/ros/kinetic/lib/move_base/move_base __name:=move_base __log:=/home/eaibot/.ros/log/8ac2adee-e040-11e9-b1f8-b827ebe60581/move_base-16.log].

and it doesn't move(using rviz).

In short, I just want to make the robot stop when an obstacle is in it's path. Is this the only way to do it? Or is there a better way?

Thank you


Originally posted by Zeken on ROS Answers with karma: 3 on 2019-09-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You dont need to tinker with the costmap parameters. You can achieve that behavior if you set the following parameters in your move_base.launch:

<param name="controller_patience" value="0.0" />
<param name="planner_frequency" value="0.0" />

<param name="recovery_behavior_enabled" value="false" />
<param name="clearing_rotation_allowed" value="false" />

This means that once a collision is detected, the local planner will abort the navigation immediately because a valid control could not be found and no recovery behaviors will be executed. Also the global planner will only run when a new goal is received.
You can check move_base for more information on the parameters.


Originally posted by pavel92 with karma: 1655 on 2019-09-26

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Zeken on 2019-09-26:
That worked! I just set the planner patience to 1.0 too so that it will stop faster. Thank you!

$\endgroup$

Your Answer

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