Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG_SP/Enhancement] Plough doesn' start the first path turned the correct way #3413

Closed
coatsy35 opened this issue Sep 8, 2024 · 23 comments · Fixed by #3440
Closed

[BUG_SP/Enhancement] Plough doesn' start the first path turned the correct way #3413

coatsy35 opened this issue Sep 8, 2024 · 23 comments · Fixed by #3440
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@coatsy35
Copy link

coatsy35 commented Sep 8, 2024

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

Steps to reproduce
Pick a field and create a pattern of up and down with a plough.

Actual behaviour
On the first pass of the plough, the plough is turned the wrong way with it's first furrow away from the headland. There is also a funny path thing going on right when the tractor starts the 1st pass as can be seen from the screenshot.

Expected behaviour
The plough should be turned so the first furrow is against the headland on the first run, so that subsequent runs match up.

Screenshots
Please watch the video, feel free to fast forward each pass to the end of the field. I have recorded 4 passes of the plough to show what is happening properly.

https://youtu.be/sPIIYHHEaKQ

fsScreen_2024_09_08_13_37_46

Courseplay version

Version used: 7.4.2.0

Log
log.txt

Map
Vintage Oaks

Vehicles/ implements involved
Giants JD 6250R and Giants KV Ecomat

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

@coatsy35 coatsy35 added the bug Something isn't working label Sep 8, 2024
@pvaiko
Copy link
Contributor

pvaiko commented Sep 16, 2024

The plough should be turned so the first furrow is against the headland on the first run, so that subsequent runs match up.

Need help here with the algorithm. For each waypoint, we know:

  • If the left or right (or both) side has been worked on already in a previous pass (see details here:
    --- Was the area on the left of this waypoint worked on already? Use this to determine:
    )
  • We also know if it is on a headland or not.
  • If not on a headland, we know if there is a headland on the left or both sides.
  • We can also figure out which way are we going to turn at the end of the pass, or it is the last pass.

Now, based on all this, using as few information as possible, what would be the correct algorithm to determine which side to rotate the plow when starting a course at a given waypoint?

@coatsy35
Copy link
Author

Hmm. Been thinking about this. Not a solution yet perhaps, but some points to consider. Obviously I am talking about reversible ploughs here as conventional ploughs are way too complicated to do correctly IMO.

  1. On the first pass of a headland, the ploughs front furrow (1st furrow) should always be facing the centre of the field as CP ploughs a field "in" as we call it IRL.

2.The front furrow (1st furrow) should always face the headland when starting the field centre on the first lane - obviously if you start in the middle anything is possible, but I imagine most people start at one side and go across the field.

Is them two options possible? that way the plough would always be in the correct rotation. After the first path it would just need to make sure the front furrow was always facing the existing ploughed ground.

I'll keep thinking

@pvaiko pvaiko linked a pull request Sep 19, 2024 that will close this issue
@Tensuko Tensuko added this to the 7.4.2.1 milestone Sep 20, 2024
Tensuko added a commit that referenced this issue Sep 20, 2024
WARNING: While this version is backwards compatible with older savegames, it'll write the courses to the savegame in a new format. Vesions before 7.4.2.0 WILL NOT BE ABLE TO READ the games saved with this version! If you install this version, and decide to revert to an old one, YOU MUST BACK UP YOUR OLD SAVEGAME before!

- Even row width setting does work now #3423
- Fix for a strange waypoint transformation #3399
- Narrow field is now fixed too #3387
- Transition fix #3387
- Another fix for Bale Unloader #3381
- Fix for #3378
- Fix for plows not starting the work after headland #3413
- Vehicles in 180° turns near a diagonal field border are not leaving the field anymore.
- Fix for Multitool #3379

New for Multitool:
- A multitool now contains 2-5 single course for each lane depending on the amount of vehicles you selected.
- That course is switched when switching the lane.
- The old "symetric lane change" got renamed to "switching lanes" and hopefully is more clear about what it does and have to be selected in the generator before generating the course.
- Multitool courses saved by older versions will not work, you'll need to regenerate them!

Known Issue:
After reconnecting to the server, the selected lane setting for multitool gets reset and won't show the correct lane, but the tool keeps working on the correct one. This will be fixed in a later version, as we don't want to wait longer with important fixes.
@coatsy35
Copy link
Author

coatsy35 commented Sep 21, 2024

@pvaiko it still starts the wrong way after loading a save unfortunately. On the headland the plough should always be the other way to my picture below, it was when I saved the game (as it had finished the centre work with the plough turned to the right, so it continued onto the headland with it turned right (which is correct), when I tried to resume it after loading in the game it turned it to the left as the picture below shows and tried to drive to the other side of the waypoint line to continue

Can it be set to remember it's position? (centre always starts on the correct side after save) as I can't now get it to turn the correct way to finish the headland without putting it back on the last centre pass and allowing it to start the headland again

What it's trying to do
fsScreen_2024_09_21_13_28_23

What a headland rotation should always be like
fsScreen_2024_09_21_13_38_02

@pvaiko
Copy link
Contributor

pvaiko commented Sep 21, 2024

@pvaiko it still starts the wrong way after loading a save unfortunately.

Ok, I see we still have a bug in there but that does not affect this, it still turns the plow to the right for me on a headland, whatever I do. Do you have a log? What plow is this?

Also, which way should it be turned on a headland around an island?

@pvaiko pvaiko reopened this Sep 21, 2024
@Tensuko
Copy link
Contributor

Tensuko commented Sep 21, 2024

It depends on the headland direction I think.
CCW should be turned the right way.
Do we have to use the same issue for this or can we make an enhancement for that, as the original issue was plow not starting at all.

@coatsy35
Copy link
Author

coatsy35 commented Sep 21, 2024

@pvaiko it still starts the wrong way after loading a save unfortunately.

Ok, I see we still have a bug in there but that does not affect this, it still turns the plow to the right for me on a headland, whatever I do. Do you have a log? What plow is this?

Also, which way should it be turned on a headland around an island?

headland will always have a plough to the right even on an island (that's assuming all island start from the outside inwards? going clockwise) If you going anti clockwise then you would be plough to the left.

The plough is a mod, let me test with a Giants plough (but I used to have it before this update on the Giants Lemken Titan 18). It only appears to do it for me if I have saved the game after it has finished it's last row and then started the headland, If I save whilst on the headland and renter the game, the first thing it wants to do is turn the plough the other way to continue. Let me see If I can get a log for you.

@coatsy35
Copy link
Author

coatsy35 commented Sep 21, 2024

It depends on the headland direction I think. CCW should be turned the right way. Do we have to use the same issue for this or can we make an enhancement for that, as the original issue was plow not starting at all.

With respect Tensuko the issue of saving direction after loading the game is quite old, I reported it a good while ago now and was never fixed as I couldn't get a log that showed it, I will attempt to get one now.

@coatsy35
Copy link
Author

Got it!

I placed myself on the first headland run, start on the right correctly. I then saved and existed the game, loaded it back in and selected start and the plough changed to the left before it would continue. Please see before and after save logs below. I was using Giants 6250R and Giants KV 7 furrow plough

log_before save.txt
log_after save.txt

Before Save
fsScreen_2024_09_21_15_46_22

After Save
fsScreen_2024_09_21_15_48_51
fsScreen_2024_09_21_15_49_05

@coatsy35
Copy link
Author

coatsy35 commented Sep 21, 2024

In short clockwise headland, plough should always be on the right and anti clockwise headland, plough should always be on the left, no matter if it's a headland or island (as long as islands are worked from the outside pass to the inner most)

@Tensuko
Copy link
Contributor

Tensuko commented Sep 21, 2024

It depends on the headland direction I think. CCW should be turned the right way. Do we have to use the same issue for this or can we make an enhancement for that, as the original issue was plow not starting at all.

With respect Tensuko the issue of saving direction after loading the game is quite old, I reported it a good while ago now and was never fixed as I couldn't get a log that showed it, I will attempt to get one now.

For me the Issue was rather the turn doesn't start at all....
Then we keep it just open but I don't classify this as a bug, as nothing is breaking and is rather cosmetic.

@Tensuko Tensuko removed the bug Something isn't working label Sep 21, 2024
@Tensuko Tensuko modified the milestones: 7.4.2.1, 7.4.2.2 Sep 21, 2024
@Tensuko Tensuko added the enhancement New feature or request label Sep 21, 2024
@Tensuko Tensuko changed the title [BUG_SP] Plough doesn' start the first path turned the correct way [BUG_SP/Enhancement] Plough doesn' start the first path turned the correct way Sep 21, 2024
@coatsy35
Copy link
Author

It depends on the headland direction I think. CCW should be turned the right way. Do we have to use the same issue for this or can we make an enhancement for that, as the original issue was plow not starting at all.

With respect Tensuko the issue of saving direction after loading the game is quite old, I reported it a good while ago now and was never fixed as I couldn't get a log that showed it, I will attempt to get one now.

For me the Issue was rather the turn doesn't start at all.... Then we keep it just open but I don't classify this as a bug, as nothing is breaking and is rather cosmetic.

We will have to agree to disagree. It's not cosmetic when it doesn't match the previous work and there is no way to force it to without reworking the whole headland by starting on the last run of the centre... that is squarely and firmly a bug IMO

@Tensuko
Copy link
Contributor

Tensuko commented Sep 21, 2024

Can you plow your field? -> yes, not a bug
Does it work as you expect? -> No -> cosmetic.

Other then that, I found more bugs with plows right now... maybe just MP I just have to validate that 1st.

@pvaiko
Copy link
Contributor

pvaiko commented Sep 21, 2024

I then saved and existed the game, loaded it back in and selected start and the plough changed to the left before it would continue

That's weird. Do you have a savegame?

@coatsy35
Copy link
Author

Yes. Just out atm will upload it in a couple of hours when I’m back

@coatsy35
Copy link
Author

If it makes any difference I didn’t stop it before I excited the game. I saved it as I usually do with everything running and then exit without stopping any of it. Then load back in and press play (on nearest point)

@coatsy35
Copy link
Author

I then saved and existed the game, loaded it back in and selected start and the plough changed to the left before it would continue

That's weird. Do you have a savegame?

Link below. Only mod is the current release of CP and Vintage Oaks Map latest V1.003

https://farmsimbrisco.itch.io/fs22-the-vintage-oaks

https://drive.google.com/file/d/1Rup_QMbT0DQ8qmTWaS3cO6d-yw5Uxl5h/view?usp=sharing

If you load the game and tab to the tractor and press Play on nearest point, it immediately turns the plough the wrong way

@Tensuko
Copy link
Contributor

Tensuko commented Sep 26, 2024

Picture A:
grafik
Picture B;
grafik

Wich one is correct?
And in what direction does the plow look on each picture? left or right?
We seem to have a different look at the plow direction.

@coatsy35
Copy link
Author

coatsy35 commented Sep 26, 2024

Picture A (if that is the last pass of the headland after starting against the centre work) is plough to the left which you only get on a reversible plough and would only be used when starting on the centre and performing a CCW headland or starting on the headland with direct CW.

Picture B is plough to the right (That is the same as a conventional plough direction as well i.e. a non reversible plough) i.e. ploughing to the right and would only be used when starting on the centre and ploughing the headland CW or starting on the headland with direction CCW.

I will add, you wouldn't usually start plough a field on the headland! so only start on the centre scenarios would be used 95% of the time i imagine

@Tensuko
Copy link
Contributor

Tensuko commented Sep 26, 2024

Don't care about start on headland or center.
Headland CCW in this picutres, wich one is correct for CCW.

@pvaiko
Copy link
Contributor

pvaiko commented Sep 26, 2024

I will add, you wouldn't usually start plough a field on the headland! so only start on the centre scenarios would be used 95% of the time i imagine

Yes, but we are trying to solve your issue here, to start on the correct side when continuing on the headland after the savegame is loaded.

@coatsy35
Copy link
Author

coatsy35 commented Sep 26, 2024

Don't care about start on headland or center. Headland CCW in this picutres, wich one is correct for CCW.

Picture A then, plough on left

@Tensuko
Copy link
Contributor

Tensuko commented Sep 26, 2024

Total confusing about plow side.
For me logically the plow is on the right side, but anyway, this is how it is made yet, so we can push it to main.

@coatsy35
Copy link
Author

Total confusing about plow side. For me logically the plow is on the right side, but anyway, this is how it is made yet, so we can push it to main.

When the mouldboards in work are facing right then you would always refer to it IRL as plough on the right. Your picture is plough on the left.

it works as I tested the commit
👍

@Tensuko Tensuko closed this as completed Sep 26, 2024
Tensuko added a commit that referenced this issue Sep 28, 2024
- Plow fixes for SP and MP as well as rotation enhancements #3413
- MP and SP Hud Mode selection bugs fixed #3451
- Fix for #3454
- Fix for #3463
- Fix for #3469
- Faster course generation, load and save #3457 #3461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants