Courseplay / Courseplay_FS22

Courseplay for Farming Simulator 2022
GNU General Public License v3.0
843 stars 180 forks source link

[BUG_SP]Pathfinder turn doesn't take headland to drive to the next start of the row and after game restart, transition WP seems to change into a turn WP. #3399

Closed Martin-L45 closed 1 month ago

Martin-L45 commented 1 month ago

READ FIRST https://github.com/Courseplay/Courseplay_FS22/wiki

Steps to reproduce Steps to reproduce the behavior.

Actual behavior A clear and concise description of what happen.

When moving to the next part of the field the tool does not stay inside the field border.

Expected behavior A clear and concise description of what you expected to happen.

The vehicle and tool stay in the field. If possible follow the headland track

Screenshots If applicable, add screenshots to help explain your problem.

Farming Simulator 22 Screenshot 2024 09 04 - 14 16 44 47 Farming Simulator 22 Screenshot 2024 09 04 - 14 16 44 47

Farming Simulator 22 Screenshot 2024 09 04 - 14 16 04 25

Courseplay version Version used:

7.4.2.0 with fix for #3388

Log Please attach a log with all debug channels active. For help with the debug channels, please check out the readme at the github front page.

log.txt

Map Map played on. Alma Missouri

Vehicles/ implements involved Which vehicle or implement? Mod yes/no ? Ingame 9rx and 1775nt planter

Relevant script mods Mods like Autodrive or VCA and so on.

Tensuko commented 1 month ago

Can you give me a savegame with the course loaded?

Martin-L45 commented 1 month ago

Its starting to get a bit weird. The behavior of the tractor changes after i save and restart the game.
Before save

Farming Simulator 22 Screenshot 2024 09 05 - 13 52 55 72

Farming Simulator 22 Screenshot 2024 09 05 - 13 53 02 41

After save

Farming Simulator 22 Screenshot 2024 09 05 - 13 54 43 42 Farming Simulator 22 Screenshot 2024 09 05 - 13 55 31 48

link to savegame https://www.mediafire.com/file/iijakummsaxm1gr/savegame.zip/file

Settings and start point

Farming Simulator 22 Screenshot 2024 09 05 - 14 02 34 68 Farming Simulator 22 Screenshot 2024 09 05 - 14 02 45 59

Martin-L45 commented 1 month ago

Different equipment similar issue. The vehicle behaves different after save and restart.

Before save

Farming Simulator 22 Screenshot 2024 09 05 - 14 50 00 77

Farming Simulator 22 Screenshot 2024 09 05 - 14 50 08 71

After save and restart. The vehicle is forced into a reverse course. Even when reverse is not allowed. xml has allowTurnBackward value="false" on both seeder and aircart

Farming Simulator 22 Screenshot 2024 09 05 - 14 52 17 78

Farming Simulator 22 Screenshot 2024 09 05 - 14 52 47 26 Farming Simulator 22 Screenshot 2024 09 05 - 14 53 35 14

Tensuko commented 1 month ago

Pretty sure you just catched a different waypoint with start at nearest since the target is a completly different position.

Martin-L45 commented 1 month ago

I´ll try again. and make sure it catches the right track.

Tensuko commented 1 month ago

You don't have to, this does not help us anyway.

Martin-L45 commented 1 month ago

I did it anyway 😊 Same result as before. Vehicle is forced into a reverse course. Let me know if you need anything from me.

Tensuko commented 1 month ago

@pvaiko grafik grafik Seems like a Waypoint changed to a turn after restart, that means saveing the course is faulty, maybe transition WP is broken?

Tensuko commented 1 month ago

@Martin-L45 This is your "not respect field border"? grafik

Martin-L45 commented 1 month ago

Yes. It seems to only check for the size of the tractor. not the Working width of the tool it is pulling.

Tensuko commented 1 month ago

Yes. It seems to only check for the size of the tractor. not the Working width of the tool it is pulling.

Got nothing to do with that.

pvaiko commented 1 month ago

Seems like a Waypoint changed to a turn after restart, that means saveing the course is faulty, maybe transition WP is broken?

Yeah, I'll check that, we are screwing up something when loading the course from the savegame.

pvaiko commented 1 month ago

Yes. It seems to only check for the size of the tractor. not the Working width of the tool it is pulling.

Yes, when switching from one block to the other, we just use the pathfinder and definitely ignore the working width. We aren't using the headlands in this case (unlike in turns where the other row is far away), just plain old pathfinding.

pvaiko commented 1 month ago

I have to correct myself: we do use the headland, actually, the originally generated connecting path as a 'preferredPath' for the pathfinder, so the pathfinding should apply a negative penalty for anything close to this connecting path.

As a result, the pathfinder course should be around/close to the headland.

Martin-L45 commented 1 month ago

@pvaiko I have been trying your fix. But i have run into a issue. The tractor gets stuck in this position. It seems to have found a path but i will not drive.

Farming Simulator 22 Screenshot 2024 09 09 - 17 50 18 66

log.txt

https://www.mediafire.com/file/rk9q07k2xaot962/savegame.zip/file

Tensuko commented 1 month ago

Just wait untill we are done...

pvaiko commented 1 month ago

@pvaiko I have been trying your fix. But i have run into a issue. The tractor gets stuck in this position. It seems to have found a path but i will not drive.

Pull request is still Draft, meaning we are still working on it. Wait until it is ready for review.

Martin-L45 commented 1 month ago

Understood ( i didn't see it was a draft. My mistake)

Tensuko commented 1 month ago

You can now try out current main if you want.

Martin-L45 commented 1 month ago

I have just tried every setup i had issues with before. And now i can not get it to fail!! I must admit this issue got a lot more complicated than i expected when i first opened it. Awesome work guys.