Courseplay / courseplay

Courseplay for Farming Simulator 2019
http://courseplay.github.io/courseplay
GNU General Public License v3.0
954 stars 529 forks source link

Combining routes enhancement #10

Closed Satissis closed 11 years ago

Satissis commented 11 years ago

Hiya.

I was playing with the Fieldwork mode the other day and one thing I noticed is that when you have a generated route and have a unloading route added for the bale loader, then when the bale loader is full, then it drives directly to the endpoint as it should, but the problem I sees here is that the field is full of bales and it highly it will drive into some of the bales when going to unload.

What I want to suggest is that you have an option to add a route to the generated route so it moves the end waiting point from the generated route to the new added route end point. This will make us able to make the field end waiting point up to the start of the field so the bale loader will drive away from the area that still have bales.

Another possible solution could be to make the bale loader return to the start waiting point instead and then drive the unloading route from there. You could even add an option to select which waiting point to return to in the cp hud when inside the field. This will also give us allot of great possibilities for other stuff :)

Hope you get what I mean about it.

Kind regards Satis

JakobTischler commented 11 years ago

Hi Satis,

good thoughts, but that problem has actually already been dealt with. In the new course generation algorithm that will be coming, I've already incorporated the latter part of your suggestion: I've included a boolean setting for returning to the field course start point instead of the end point. This can be switched with every new generation. Meaning, for vehicles that don't need to return, like a combine, a baler or whatever, you can leave it at "no" (meaning, don't return to the start). For other ones, like a fertilizer tank, or a seeder, you can choose "yes", where it will add the first five waypoints in reverse order to the end. So your unloading/refilling course can then start and end at the field course's start point.

I may post a picture of the settings in due time.

Satissis commented 11 years ago

Nice to know :) Can't wait for the new course generator ;)

JakobTischler commented 11 years ago

Here we go.

Courseplay course generation v2

The settings are pretty much self-explanatory. The starting direction is coupled to the starting corner: e.g., if your starting corner is south-west, your starting direction can of course only be north or east. If it's north-east, the starting direction can only be west or south.

Satissis commented 11 years ago

Nice :) I have a question about the End at starting point. will this be generated into the route or are you able to change i when you already have generated the route, so you don't need to have 2 of the same route but with 2 different end point ?

For me it would be nice if it was not passed in when generating the field, but it was more an global option on the settings panel. Then I would be able to have only one route for multiply tools :)

Kind regards Satis

JakobTischler commented 11 years ago

At the moment it's hard coded into the generated course. For me this never was a problem as I generate the course anew for each operation, for each different tool etc. (also saves some space in the course management section ;)).

It might be feasible and not too difficult to do it "on the fly", though. I'll think about a possible solution.

Satissis commented 11 years ago

Sounds great mate. May I ask how far you are in it ? I can see that the GUI have been added on your end but is it only the visibility that have been added and not the code or do you actually have a working copy that needs to be tweaked before pushing it ??

JakobTischler commented 11 years ago

As an "good" politician, I can neither confirm nor deny this ;)

The new generation thingy will consist of two parts. One, the field course generation itself, and two, well, let's just say that's for later. Part one is ca 95% done - meaning the GUI, the code etc. Don't expect anything, but I'm hoping to push it sometime in the near future.

Satissis commented 11 years ago

I was not asking for any time related thing, was just wondering how it was going :) so yeah I don't expect anything.

Anyway, thanks for the update ;)

Satissis commented 11 years ago

Uh I see that you have pushed the new generator :P Going to try it out now :D

JakobTischler commented 11 years ago

So what's the verdict here? Since this is a rather big feature (both the course generation and the turning maneuver), we need it tested thoroughly.

Satissis commented 11 years ago

Turning Manuver ?!? something thats added to the course generation ?? (Might be I haven't got the latest version) The course generation works nicely by it self.

Satissis commented 11 years ago

Okay I know what you mean by the turning maneuver now :P Just got the latest build and I had a hunch on what you meant, so just went inside the game and setup a cultivating and seeding run and it then stops at each end, lifting the tool, making a nice turn maneuver, align to new lane, lowering the tool and continue on the route. Thats really awesome :D Nice work there.

One question, since I didn't test it. Will the turn maneuver also apply to the windrower, baler and bale loader ?? My concern is that I hope it won't back at least, since those tools are not good at backing with CP :)

JakobTischler commented 11 years ago

The turn maneuver itself works with every tool/every tractor. But only certain ones are able to be backed up (e.g. certain cultivators, seeders, fertilizers etc.). For other tools, the tractor will make a smooth half circle (forwards) to the next point.

But every tool that can be raised will be during the turn maneuver.

Satissis commented 11 years ago

Okay. I have played a bit more with it and generally the turn maneuver works okay. I do have something to point out thou. I have a video showing a turn maneuver with an Amazone fertilizer where in my opinion it don't need to back as it does in the video. Also notice in the video, the seeded ground. I used the big 15m seeder (Think it's an Amazone) and when it stops to turn, is stops a little bit too early + the turn maneuver makes it miss a bit in the start, so when coming back at the next lane, there is no overlap a couple of meters before it turns again.

Here is the video: http://www.youtube.com/watch?v=-ZsVEqDC6a0

Kind regards Satis

bigdigger commented 11 years ago

Question: i been playing around with course generated stuff. noticed that when playing, i can use small tools to work the field, eg ploughing works great. but saving the course, then reloading the game and the course, it goes mad ??

JakobTischler commented 11 years ago

@bigdigger Please be more precise. "It goes mad" doesn't really help us. At all. What happens? When does it happen? What tools were involved? What did you try to do? What does the log say? Etc. pp.

bigdigger commented 11 years ago

ok,, I started new game, first thing I do is make a course to take my vehicles to the fields, naming them MoveTo-Farm-Field16. (using Field 16 as exp) By using this I start in the farm, end point at start of the field, (North West) then another course MoveTo-Field16-Farm South East And South West, I put a cross road. Drive back to then farm, drive to just before the start of course, then end the route. Then I marked each corner of field16 starting at north west (just a little bigger) driving east and end at south west. (bale loader, use return to first point, making sure you have a straight line to start of moveto-field16-farm) Set working width at 3.5m, saving this as field16-3.5m, one at field16-2.1m and field16-3.0m. resetting the course, then load moveto-farm-field16 and field16-3.5m and moveto-field16-farm. Using the combine (Fahr m66, with its cutter) or any of the tools this works. The bug comes from ended the game then restarting. With seeding and any spraying, start must be next to the filling point.

Sorry if I not clear with this!

JakobTischler commented 11 years ago

@Satissis: Thomas will have a look concerning the Amazone seeder. Intended is: (when leaving the field) stopping and raising when the aiBackMarker touches the last lane waypoint / (when entering the field) stopping and lowering when the aiBackMarkertouches the first lane waypoint.

Concerning the turning maneuver for the fertilizer: what was the work width, and how big was the automatic turn radius?

JakobTischler commented 11 years ago

@bigdigger: please explain

then another course MoveTo-Field16-Farm South East And South West, I put a cross road.

Specifically, what do you mean "south east" and "south west"? Also, is "cross road" supposed to be a crossing point?

Then I marked each corner of field16 starting at north west (just a little bigger) driving east and end at south west.

Are you saying you didn't drive around the field, but only set 4 points?

The bug comes from ended the game then restarting.

Are the generated courses saved successfully? Please check in the courseplay.xmlfile if - for that one course - each waypoint has a generated, turn, turnstart, turnend, and ridgemarker attribute.

With seeding and any spraying, start must be next to the filling point.

Are you using the very same course for both the combine (fieldwork mode) and a seeder/sprayer (fertilizing&seeding mode)? If so, why do you say the start has to be next to the filling point? The seeder/sprayer refills automatically when driving through a spray fill trigger or a seeding trigger.

Satissis commented 11 years ago

@JakobTischler The work width was set to 18 meters and the automatic turn radius was 16

ThomasGaertner commented 11 years ago

@Satissis : we have built in a safety value for tools which are close to the border between backturn and nobackturn . We decide on every turn maneuver , whether it should turn with backward or not concerning to the distance to the first waypoint on the next lane. in the case U have a field which has no straight edges it may be the case tha it decides wrong. therefore we built in a factor 1.2 if Ur turn radius is 16 the the workwidth mustbe bigger than 19,2 m to turn with no backward . By the way , I'm thinking about an exeption table for certain tools.

Satissis commented 11 years ago

hmm okay :)