@@ -548,7 +548,7 @@ function HybridAStar:initRun(start, goal, turnRadius, allowReverse, constraints,
548548 self .hitchLength = hitchLength
549549 self .constraints = constraints
550550 -- a motion primitive is straight or a few degree turn to the right or left
551- self .hybridMotionPrimitives = self :getMotionPrimitives (turnRadius , allowReverse )
551+ self .motionPrimitives = self :getMotionPrimitives (turnRadius , allowReverse )
552552 -- create the open list for the nodes as a binary heap where
553553 -- the node with the lowest total cost is at the top
554554 self .openList = BinaryHeap .minUnique (function (a , b )
@@ -628,10 +628,12 @@ function HybridAStar:run(start, goal, turnRadius, allowReverse, constraints, hit
628628 closeIntervalTimer (self .timer )
629629 -- if we had the coroutine package, we would coursePlayCoroutine.yield(false) here
630630 return PathfinderResult (false )
631- end -- pop lowest cost node from queue
631+ end
632+ -- pop lowest cost node from queue
632633 --- @type State3D
633634 local pred = State3D .pop (self .openList )
634635 self .logger :trace (' pop %s' , tostring (pred ))
636+ self .logger :trace (' dPos %.1f dTheta %.1f' , self .deltaPosGoal , math.deg (self .deltaThetaGoal ))
635637
636638 if pred :equals (self .goal , self .deltaPosGoal , self .deltaThetaGoal ) then
637639 -- done!
@@ -657,9 +659,9 @@ function HybridAStar:run(start, goal, turnRadius, allowReverse, constraints, hit
657659 end
658660 end
659661 -- create the successor nodes
660- for _ , primitive in ipairs (self .hybridMotionPrimitives :getPrimitives (pred )) do
662+ for _ , primitive in ipairs (self .motionPrimitives :getPrimitives (pred )) do
661663 --- @type State3D
662- local succ = self .hybridMotionPrimitives :createSuccessor (pred , primitive , self .hitchLength )
664+ local succ = self .motionPrimitives :createSuccessor (pred , primitive , self .hitchLength )
663665 if succ :equals (self .goal , self .deltaPosGoal , self .deltaThetaGoal ) then
664666 succ .pred = succ .pred
665667 self :debug (' Successor at the goal (%d).' , self .iterations )
0 commit comments