How to check if there is obstacle on path

asked 2021-09-22 08:24:12 -0600

ahopsu gravatar image

updated 2021-09-22 08:26:40 -0600


My goal would be to know, does ROS2 (Navigation2) provide some kind of ready "feature"/function, which could tell, if there is an obstacle on the path the robot is trying to follow, either on the whole path, or just some meters forward from robot's current position, using the costmap(s). image description

From example in the picture, the path is going through the cost cells, and the idea is, that the ROS2 (Navigation2) could some how tell that. The intention is not to calculate new route etc. I just want to know, if there is existing "obstacle detected" function?

edit retag flag offensive close merge delete


Really cool question! Maybe consider writing such a function your self if it would not already be included in nav2.

Of course, you first of all need to consider that there exists different paths in navigation2. The global path that takes the static (cost) map into account (which door to take etc.) and the local path planner typically only has like a 2x2m grid of space where it has the purpose of staying on the global path. I don't think that there is something like a: "check if there is an obstacle and if yes go around it". I think the planners are typically build like: "okay this is my path, and I want to stay on it with the lowest cost. If there is an object, this means cost. so I plan my local path arround it. if there is no cost on my way, than my local ...(more)

flo gravatar image flo  ( 2021-09-23 15:21:59 -0600 )edit