# Routing through obstacles behind the robot

I encountered a problem with my robot in the planner algorithm I used in my project. The problem is as follows:

My robot is 1 meter long. My robot has realsense camera and lidar. With the camera data on the robot, I can detect obstacles (the table is an obstacle) and have them detected as obstacles. And I can move autonomously to any point I point in the RVIZ environment. The problem is that when I run the planner algorithm when the robot is in an opposite position and close to an obstacle, there are delays in obstacle detection (Purple line is obstacle ) and hitting the obstacle occurs. When the target is a table, it tries to pass through the space under the table. Due to the height of the robot, it is not possible to pass. (The target point is shown as a red dot in the figure.)

What can I do for this situation? Is there a suitable planner algorithm for this? Thank you for your help.

There are several common approaches to the table-problem example that you've outlined, all of which are supported in ROS:

• 'keepout' zones: In addition to your typical obstacle map, you can add another map that describes zones the robot should stay out of. In your case, this would mean providing the table as a zone that the planner should treat as a full obstacle, even if no obstacle is detected. But this does require prior knowledge of your environment.
• constrain movement to reflect sensing: It sounds like you don't have this problem when going forward? If that's the case, then the realsense camera is doing its job when going forward, but is unable to help when going backwards. If that's the case, you can set your maximum speed in the negative x direction to zero: this way, the local planner will turn 180 before driving forward (instead of reversing into a problem area, even if this is the shorter route). But this constrains the movement of the robot.
• add more sensing to unconstrain movement: If you again don't have a problem when moving into areas covered by the realsense, you could add another realsense to cover the rear. But this does add cost to the platform.
• map in 3d environments: octomapping may be helpful to you here. But this is an additional computational cost.

There's no one answer, since as you can see they each have their own pro's and con's. You'll have to consider each and select which combination of solutions works for your application. You should also look at why there is a delay in obstacle detection: that's very odd, and resolving that may be a big help.

• Thank you very much. The main problem I mean by delays in obstacle detection is that the obstacle is detected late by the planner algorithm and cannot create the route correctly. Sep 1, 2023 at 6:27