Courseplay / courseplay

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

Calling driveToPoint with speed less than 2 seems to set the acceleration to 0 #4487

Closed wallsingham closed 4 years ago

wallsingham commented 4 years ago

FS19 (Steam) Version: 1.5.1.0 b6732 Courseplay: v6.01.00319

The unloader stops because of a "crosstrack error"

Part of the log (if you need the entire Log, just let me now): 2019-10-31 22:15 :51 [dbg12 lp27659] AXION 870 (#1): PPC: AXION 870 (#1)-relevantWpNode waypoint index 335 2019-10-31 22:15 :51 [dbg12 lp27659] AXION 870 (#1): PPC: AXION 870 (#1)-nextWpNode waypoint index 335 2019-10-31 22:15 :51 [dbg12 lp27659] AXION 870 (#1): PPC: AXION 870 (#1)-currentWpNode waypoint index 335 2019-10-31 22:15 :51 [dbg12 lp27659] AXION 870 (#1): PPC: initialized to waypoint 335 of 694 2019-10-31 22:15 :51 [dbg12 lp27660] AXION 870 (#1): PPC: initializing, ix=335, q1=6.2, q2=8.3, la=5.8 2019-10-31 22:15 :55 [dbg12 lp27801] AXION 870 (#1): PPC: common case, ix=335, q1=5.8, q2=7.8 la=5.8 2019-10-31 22:15 :55 [dbg12 lp27801] AXION 870 (#1): PPC: AXION 870 (#1)-currentWpNode waypoint index 336 2019-10-31 22:15 :56 [dbg12 lp27831] AXION 870 (#1): PPC: AXION 870 (#1)-currentWpNode waypoint index 337 2019-10-31 22:15 :56 [dbg12 lp27856] AXION 870 (#1): PPC: AXION 870 (#1)-currentWpNode waypoint index 338 2019-10-31 22:15 :57 [dbg12 lp27871] AXION 870 (#1): PPC: waypoint 335 passed, dz: 0.0
2019-10-31 22:15 :57 [dbg12 lp27871] AXION 870 (#1): PPC: AXION 870 (#1)-nextWpNode waypoint index 336 2019-10-31 22:15 :57 [dbg12 lp27871] AXION 870 (#1): PPC: relevant waypoint: 335, crosstrack error: 0.0 2019-10-31 22:15 :57 [dbg12 lp27892] AXION 870 (#1): PPC: waypoint 336 passed, dz: 0.1
2019-10-31 22:15 :57 [dbg12 lp27892] AXION 870 (#1): PPC: AXION 870 (#1)-relevantWpNode waypoint index 336 2019-10-31 22:15 :57 [dbg12 lp27892] AXION 870 (#1): PPC: AXION 870 (#1)-nextWpNode waypoint index 337 2019-10-31 22:15 :57 [dbg12 lp27892] AXION 870 (#1): PPC: relevant waypoint: 336, crosstrack error: -0.2 2019-10-31 22:15 :57 [dbg12 lp27898] AXION 870 (#1): PPC: AXION 870 (#1)-currentWpNode waypoint index 339 2019-10-31 22:15 :58 [dbg12 lp27912] AXION 870 (#1): PPC: waypoint 337 passed, dz: 0.1
2019-10-31 22:15 :58 [dbg12 lp27912] AXION 870 (#1): PPC: AXION 870 (#1)-relevantWpNode waypoint index 337 2019-10-31 22:15 :58 [dbg12 lp27912] AXION 870 (#1): PPC: AXION 870 (#1)-nextWpNode waypoint index 338 2019-10-31 22:15 :58 [dbg12 lp27912] AXION 870 (#1): PPC: relevant waypoint: 337, crosstrack error: -0.0

2019-10-31 22_16_47-Farming Simulator 19 2019-10-31 22_16_22-Farming Simulator 19

Tensuko commented 4 years ago

I don't want parts of the logfile, I want a full one.

pvaiko commented 4 years ago

It certainly does not stop due to the crosstrack error. Cross track error means the sideways deviation from the course, which is in our case 0.0 meters, which is good news because we are right on track!

wallsingham commented 4 years ago

ok, then I misunderstood "crosstrack error". Anyway, he stops. I've tried it with a newgame and almost no other mods on the Estancia Lapacho 1.0.4.0. Attached the full log and the courses. Courseplay-Courses.zip log.txt fsScreen_2019_11_01_08_32_54

wallsingham commented 4 years ago

The problem seems only to occur if the course has been composed of several partial courses. Even if the resulting course was then saved as a separate course. In the case described above, I had composed the course of 3 pieces. Silo to bakery (generated from AD) + recorded route for backward unloading at the bakery + bakery to silo (also generated from AD). If I record this entire route manually, the problem does not arise. What I have not tested is if the 3 partial courses were previously recorded manually and not generated from AD.

wallsingham commented 4 years ago

@pvaiko ich habe noch folgendes getestet und damit fährt der Traktor jetzt durch. Vielleicht hilft dir das untenstehende, das Problem zu fixen. Der Kurs bestand ja aus 2 Stücken die zuvor aus AD generiert worden waren, und in der Mitte eine kleine Strecke für's Rückwärtsabladen bei der Bäckerei. Bei den AD-Generierten Stücken war durchgehend der Wert speed="0" für alle waypoints. Bei dem eingefahrenem Stück stand natürlich die jeweils eingefahrene Geschwindigkeit bei "speed".

Wenn man nun die letzten Speedwerte von Stück 1 (das AD-Generierte Stück) von speed="0" auf z.B. speed="25" stellt, dann fährt der Traktor durch. Aber auch wenn man alle Speed-Werte des gesammten Kurses auf speed="0" setzt, fährt er ebenfalls durch. Es scheint also an den Werten von speed="???" beim Übergang vom AD-Generiertem Stück, zum eingefahrenem Stück zu liegen, bzw. damit lässt es sich zumindest so manipulieren dass der Traktor durchfährt.

pvaiko commented 4 years ago

@wallsingham super, danke, das hilft wirklich, du has mir bestimmt eine Stunde arbeit gespart...

pvaiko commented 4 years ago

Try with 325.

wallsingham commented 4 years ago

I think the behavior has not changed with 325. I have also recorded some new courses and tried different settings. The results are below in the screenshots.

However, this combination of speed values ​​maybe only results if courses are combined and the first course has a continuous speed = "0". Maybe it could be bypassed by manipulating the speed values ​​a little bit when merging courses.

Situation 1: grafik Situation 2: grafik Situation 3: grafik

pvaiko commented 4 years ago

Not sure if we really have a problem there, the algorithm takes the average speed over the next 4 waypoints, ignoring the 0 speed setting. So in your first example when it stops, the average over those 4 waypoints is 1 km/h, which for whatever reason does not seem to move the vehicle (may be a Giants issue), whereas 2 km/h works.

Now the real question is do you really have courses with 1 km/h?

wallsingham commented 4 years ago

OK. Thanks for the explanation.

Now the real question is do you really have courses with 1 km/h?

Yes (unintentionally), because if the recording is started first and then the vehicle starts, then the first speed value of such a course is obviously always Speed = "1". If this course is then attached behind an automatically generated course (all speed values = 0), the combination 0-0-0-1 is created. Maybe it would be enough if the recording do not create speed ="1" values, or similar.

Whether Giants problem or not, I can not determine course. But I have tested the following: I once manipulated a course with 4x speed = "1" in a row. Even then, the CP-controlled vehicle stops. However, if you set the cruise control to 1km / h and drive the vehicle without CP but with cruise control, there is no problem.

wallsingham commented 4 years ago

Many thanks @pvaiko The issue seems to be solved