ClemensElflein / open_mower_ros

Other
498 stars 122 forks source link

Mower hits obstacle if area between boundary and obstacle is only two perimeters thick #102

Open karlranseierausrom opened 3 months ago

karlranseierausrom commented 3 months ago

Hi, I have some problems with obstacles and the last perimeter (most inner perimeter of the obstacle) when the obstacle is close to the outer boundary. To visualize my problem I made the sketch.

grafik

Red area is the obstacle. Black is the planned path. Orange is the carrot. Green the area boundary. Other colors explained later.

Because the perimeter 1-3 (here are only three shown) of my obstacle are part of the boundary outline of my area, the perimeter 4 has a problematic starting point. After the outer boundary is mowed, perimeter 1-3 of my obstacle are finished. It than drives to the obstacle to mow the perimeter 4 only. The carrot drives to the starting point and than turns left, but there is the obstacle and it cannot turn.

It somehow needs to start the last perimeter with the correct driving direction, as it is always given, when driving 4 perimeters around and obstacle. If I understood my problem correctly, one solution could be to use the first two datapoints, extrapolate them to the first perimeter and move to this point. Like shown in blue: there are two crossing points of extrapolation and perimeter. One works, the other not.

It maybe a bit more complicated: Violet line is the extrapolation of a different starting pount. Violet areas possible points on the outer perimeter. Green is the outer boundary of the mowing area. Driving from the calculated point may be a large distance and may cross obstacles.

Comment: yes, it is MS paint. My working computer has no other program and my other computer is broken ;-)

ClemensElflein commented 1 month ago

This should be fixed on the latest edge version

karlranseierausrom commented 1 week ago

Dear Clemens, sorry for the late reply. At exactly that place the problem is solved, but on other places the changes seem to make trouble. If I saw corectly, you just let the mower turn around in the other direction. Great idea and simple, but now it hits sometimes other obstacles. I think this problem should be solved in another way. I think most of my problem appear when the mower hits something and it wants to turn, but for some reason it got stuck. In most of my observed problem the mower could go on, if it would just move 1cm backwards when it has hit a target. So maybe an option "distance to move backward when it hits an obstacle in cm" would be great. Same should be done when it tries to turn and cannot. Just drive a bit backward, if forward is impossible. Eventually it would make sense to keep in mind, that a second or third try might want to move a larger distance. Or it just moves back the distance for each try. Another approach would be to detect if it turns, if not, it drives constantly slowly backward till it can turn.