0
$\begingroup$

Rosanswers logo

I'm using ROS melodic with Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS.

I'm implementing an autonomous node that uses A* algorithm to move a robot from one position to another. The robot will be on a Gazebo World.

My problem is when moves on diagonal, sometimes it hits a corner and can not continue moving.

For example, I want to move from cell (1,1) to cell(10,12). I'm using an ones and zeros grid that it is represented in Gazebo and I translate the cells into Gazebo world's locations. Moving from (1,1) to (10,12), I get this path:

The Path is -> (1,1) -> (2,2) -> (3,3) -> (4,4) -> (4,5) -> (5,6) -> (6,6) -> (7,6) -> (8,7) -> (9,7) -> (10,7) -> (11,7) -> (12,8) -> (11,9) -> (11,10) -> (10,11) -> (10,12)

Cell (1,1) is the top most left cell in map. The problem comes when it tries to move from (4,5) to (5,6). In the following picture, the robot is on cell (4,5) facing to cell (5,6), and if it moves, it will hit the corner.

image description

The algorithm is doing this:

image description

Is there any way to solve this problem or this is a problem attached to A* algorithm?


Originally posted by Elric on ROS Answers with karma: 71 on 2019-07-13

Post score: 0


Original comments

Comment by curi_ROS on 2019-07-15:
which local planner are you using?

Comment by Elric on 2019-07-15:
No local planner. I have implemented A*, and using Odometry and cmd_vel topics to move the robot.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The standard way of achieving basic obstacle avoidance in grid-map based planning is inflating the grid map's walls with the size of the robot (+ some margin), i.e. dilate the obstacles in the map.

Another option would be to implement some basic reactive obstacle avoidance that checks sensor data for close-by walls and mixes in steering commands to keep away from walls while still following the global plan.

That being said, there are many open source solutions for this kind of problem available for ROS, so those could be used as well.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2019-07-15

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Elric on 2019-07-15:
Thanks for your answer. Where can I find those projects? Or, what are their names? Thanks a lot!

Comment by gvdhoorn on 2019-07-15:\

Where can I find those projects? Or, what are their names?

The standard navigation stack and its local planners.

$\endgroup$

Your Answer

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