Ask Your Question
0

Disable obstacle avoidance

asked 2015-01-27 04:01:54 -0600

Bacab gravatar image

updated 2015-01-27 04:02:36 -0600

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.

edit retag flag offensive close merge delete

Comments

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?

dornhege gravatar imagedornhege ( 2015-01-27 04:50:36 -0600 )edit

Which distribution are you using?

David Lu gravatar imageDavid Lu ( 2015-01-27 11:06:58 -0600 )edit

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

Bacab gravatar imageBacab ( 2015-01-27 11:59:11 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-01-27 13:48:01 -0600

David Lu gravatar image

updated 2015-02-02 18:10:48 -0600

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.

plugins:
    - {name: static_layer, type: 'costmap_2d::StaticLayer'}
edit flag offensive delete link more

Comments

How would you do that ?

Bacab gravatar imageBacab ( 2015-01-28 06:30:05 -0600 )edit

When you start move_base, does it say anything about using pre-hydro parameters?

David Lu gravatar imageDavid Lu ( 2015-01-29 10:46:53 -0600 )edit

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)

Bacab gravatar imageBacab ( 2015-01-29 11:02:05 -0600 )edit

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?

Zeken gravatar imageZeken ( 2019-09-20 01:05:56 -0600 )edit

Please open your own question.

David Lu gravatar imageDavid Lu ( 2019-09-23 14:29:49 -0600 )edit
0

answered 2015-01-29 09:09:50 -0600

Bacab gravatar image

updated 2015-02-03 01:21:52 -0600

Eventually I decided to set the obstacle_range in costmap_commons_params.yml to 0.005 so it would never try to avoid an obstacle (in addition to setting laser_scan_sensor: {sensor_frame: base_link, data_type: LaserScan, topic: sharp, marking: false, clearing: false}. Hope it will do the trick.

EDIT: When I start move_base I do see "using pre-hydro parameter style" so I think I'm doing something wrong. Here is my launch file for the move_base:

<launch>
  <master auto="start"/>

  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(find sargas_2dnav)/map/plan_ece.yaml">
  </node>

  <!--- Run AMCL -->
  <include file="$(find amcl)/examples/amcl_diff.launch" />

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find sargas_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find sargas_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find sargas_2dnav)/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find sargas_2dnav)/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find sargas_2dnav)/base_local_planner_params.yaml" command="load" />
  </node>
</launch>

Thank you in advance for your answers.

edit flag offensive delete link more

Comments

This seems more than a hack than what you want. Either remove the obstacle layer as David Lu said or on groovy you can clear the observation_sources entry.

dornhege gravatar imagedornhege ( 2015-01-29 09:56:17 -0600 )edit

Thank you for your answer. I will try it as soon as I get the move_base node working.

Bacab gravatar imageBacab ( 2015-01-29 10:57:27 -0600 )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: 2015-01-27 04:01:54 -0600

Seen: 1,218 times

Last updated: Feb 03 '15