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

The global path gradually oscillates

asked 2021-08-04 08:54:39 -0500

ayato gravatar image

updated 2021-08-04 08:55:39 -0500

Hello,

I am currently developing an autonomous robot using move_base.
A strange thing happened the other day, so let me ask you a question.

Until then, my robot was running smoothly.
It generated a straight path to the goal I set, and had no problem estimating its own position.

One day, when I ran the robot in the same way, it started to shake from side to side.
The shaking became larger and larger, and it seemed to be oscillating.
When I checked the bag file, I found that the global path was oscillating left and right like the amplitude of a sin function, and as a result of following the path, the robot ran oscillating left and right.
I do not know the cause of the oscillation.
The aisle was very wide and there was no obstacle between the robot and the goal.
There was a wall some meters away from the robot, and the self-position estimation seemed to be working.

I have come to understand that this phenomenon only happens in certain areas, but I don't know the difference between the areas that don't shake at all.
I tried navfn and global_planner for global planner, but both of them caused this problem.

Does anyone have any hints for me?
Thanks in advance.  

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-08-05 06:33:46 -0500

Mike Scheutzow gravatar image

Neither of those global planners makes it a priority to create a path that is a straight line to the goal. For NavFn, what I have seen is that the algorithm maximizes the path's distance from obstacles (e.g. walls) if most of the cells in the global costmap have a cost of zero.

To encourage the planner to create a more direct path, assign every cell in your global costmap a cost > 0. This makes a longer path have a higher path-cost.

edit flag offensive delete link more

Comments

Hello @Mike Scheutzow,
I'm sorry that my expression was not correct.I am not focusing on making the robot run in a straight line right now.

I can't show you the bag file, so it's hard to explain... Usually, a global path is generated, which is almost a single line (straight or curved), and the robot follows that path.
In this case, for example, a straight line path is generated first. The next moment, a large detour path to the right is generated, and the next moment, a large detour path to the left is generated, and so on. The local planner follows this oscillating path, and the robot runs while oscillating left and right.

As for obstacles, the sensors do not detect any obstacles within the global cost map. I also edited the map file, and added walls in straight lines to the map created by ...(more)

ayato gravatar image ayato  ( 2021-08-05 21:51:24 -0500 )edit

You are displaying the global path output by NavFn node in rviz? And you see very different global paths being generated close together in time? This is not normal. If there are no obstacle changes in the global costmap, there's no reason the global path would change.

Some local planners can output their short-term modifications to the global plan. Could this be what you are looking at in rviz?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-08-06 06:22:37 -0500 )edit

I am indeed looking at the global path published by navfn and global_planner.When I used the "decay time" function, I could clearly see that normally a single line would gradually get shorter, but in this event, many, many lines were generated and branched off to the left and right.

Stranger still, I tried removing the Obstacle Map Layer from the global costmap, but the same thing still happened.I really don't know why this happens, since the cost only affects the map at this time.

ayato gravatar image ayato  ( 2021-08-07 01:07:11 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-08-04 08:54:39 -0500

Seen: 341 times

Last updated: Aug 05 '21