@@ -552,13 +552,13 @@ function ReedsSheppTurnManeuver:findAnalyticPath(vehicleDirectionNode, startXOff
552552 return course
553553end
554554
555- --- @class ReedsSheppHeadlandTurn : TurnManeuver
556- ReedsSheppHeadlandTurn = CpObject (TurnManeuver )
555+ --- @class ReedsSheppHeadlandTurnManeuver : TurnManeuver
556+ ReedsSheppHeadlandTurnManeuver = CpObject (TurnManeuver )
557557
558558--- This is a headland turn (~90 degrees) for non-towed harvesters with cutter on the front. Expected to be called
559559--- just after the cutter finished the corner, that is, the harvester should drive forward in the original direction
560560--- until there is no fruit left. It'll then do a quick 90 degree 3 point turn to align with the new direction.
561- function ReedsSheppHeadlandTurn :init (vehicle , turnContext , vehicleDirectionNode , turningRadius )
561+ function ReedsSheppHeadlandTurnManeuver :init (vehicle , turnContext , vehicleDirectionNode , turningRadius )
562562 local solver = ReedsSheppSolver ()
563563 -- use lateWorkStartNode since we covered the corner in the inbound direction already
564564 local path = PathfinderUtil .findAnalyticPath (solver , vehicleDirectionNode , 0 , 0 ,
@@ -567,7 +567,7 @@ function ReedsSheppHeadlandTurn:init(vehicle, turnContext, vehicleDirectionNode,
567567 self .course :adjustForReversing (2 )
568568 -- add a little straight section to the end so we have a little buffer and don't end the turn right at
569569 -- the work start
570- self .course :extend (5 )
570+ self .course :extend (self : getReversingOffset () + 1 )
571571 TurnManeuver .setLowerImplements (self .course , 5 , true )
572572end
573573
0 commit comments