@@ -40,7 +40,7 @@ class DistanceTransformPlanner(PlannerBase):
4040
4141 The map is described by a 2D occupancy ``occgrid`` whose elements are zero
4242 if traversable of nonzero if untraversable, ie. an obstacle.
43-
43+
4444 The cells are assumed to be unit squares. Crossing the cell horizontally or
4545 vertically is a travel distance of 1, and for the Euclidean distance
4646 measure, the crossing the cell diagonally is a distance of :math:`\sqrt{2}`.
@@ -106,7 +106,7 @@ def __str__(self):
106106
107107 return s
108108
109- def plan (self , goal = None , animate = False , verbose = False ):
109+ def plan (self , goal = None , animate = False , summary = False ):
110110 r"""
111111 Plan path using distance transform
112112
@@ -135,7 +135,8 @@ def plan(self, goal=None, animate=False, verbose=False):
135135 self .occgrid .grid ,
136136 goal = self ._goal ,
137137 metric = self ._metric ,
138- animate = animate
138+ animate = animate ,
139+ summary = summary ,
139140 )
140141
141142 def next (self , position ):
@@ -147,7 +148,7 @@ def next(self, position):
147148 :raises RuntimeError: no plan has been computed
148149 :return: next robot position
149150 :rtype: ndarray(2)
150-
151+
151152 Return the robot position that is one step closer to the goal. Called
152153 by :meth:`query` to find a path from start to goal.
153154
@@ -215,7 +216,7 @@ def plot_3d(self, path=None, ls=None):
215216 line/surface handling.
216217 """
217218 fig = plt .figure ()
218- ax = fig .gca ( projection = "3d" )
219+ ax = fig .add_subplot ( 111 , projection = "3d" )
219220
220221 distance = self ._distancemap
221222 X , Y = np .meshgrid (np .arange (distance .shape [1 ]), np .arange (distance .shape [0 ]))
@@ -273,7 +274,7 @@ def distancexform(occgrid, goal, metric="cityblock", animate=False, summary=Fals
273274 # - other cells are inf
274275 # - goal is zero
275276
276- goal = base .getvector (goal , 2 , dtype = np . int )
277+ goal = base .getvector (goal , 2 , dtype = int )
277278
278279 distance = occgrid .astype (np .float32 )
279280 distance [occgrid > 0 ] = np .nan # assign nan to obstacle cells
0 commit comments