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

Setting a goal point where is an obstacle

asked 2021-03-17 09:24:46 -0500

DaveH gravatar image

Is there any parameter to allow setting a goal where is an obstacle, which transform this goal point, where is an obstacle, into other goal point near the previous one obstacle free.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-03-18 02:57:38 -0500

Roberto Z. gravatar image

updated 2021-03-18 04:18:25 -0500

I know of at least two existing packages that could provide the functionality that you want :


Carrot Planner will move your robot straight to the goal position and stop it in front of any obstacle.

I quote from their wiki page:

The planner takes a goal point from an external user, checks if the user-specified goal is in an obstacle, and if it is, it walks back along the vector between the user-specified goal and the robot until a goal point that is not in an obstacle is found. It then passes this goal point on as a plan to a local planner or controller. In this way, the carrot planner allows the robot to get as close to a user-specified goal point as possible.

To test it you just have to add the following code to the launch file where you start move_base:

<param name="base_global_planner" value="carrot_planner/CarrotPlanner" />

This is an exemplary launch file:

<?xml version="1.0"?>
<launch>

  <!-- Start move_base (nav stack) node and load config files -->    
  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find your_pkg)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find your_pkg)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find your_pkg)/config/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find your_pkg)/config/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find your_pkg)/config/base_local_planner_params.yaml" command="load" />

    <!-- Set the global planner: -->
    <param name="base_global_planner" value="carrot_planner/CarrotPlanner" /> 

  </node>

</launch>

The second option I know, the asr_navfn package, is also a global planner that can navigate your robot to the closest free space if the desired destination is in an obstacle. The main benefit is that it is not limited to a stright line path, as in Carrot Planner.

The image on their wiki page is pretty self-explanatory:

image description

Hope this helps!

edit flag offensive delete link more

Comments

The asr_navfn package is exactly what I have been looking for, thanks.

DaveH gravatar image DaveH  ( 2021-03-18 03:11:17 -0500 )edit

I am glad that this resolved your question.

Roberto Z. gravatar image Roberto Z.  ( 2021-03-18 04:19:05 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-03-17 09:24:46 -0500

Seen: 401 times

Last updated: Mar 18 '21