|
20 | 20 | from roboticstoolbox.mobile.OccGrid import BaseOccupancyGrid, BinaryOccupancyGrid
|
21 | 21 | from roboticstoolbox.mobile.Animations import VehiclePolygon
|
22 | 22 | from colored import fg, attr
|
| 23 | +from spatialmath.base.graphics import axes_logic |
| 24 | +from spatialmath.base.graphics import plotvol2 |
23 | 25 |
|
24 | 26 | try:
|
25 | 27 | from progress.bar import FillingCirclesBar
|
@@ -155,7 +157,7 @@ def start(self, start):
|
155 | 157 | if start is not None:
|
156 | 158 | if self.isoccupied(start):
|
157 | 159 | raise ValueError("Start location inside obstacle")
|
158 |
| - self._start = base.getvector(start) |
| 160 | + self._start = getvector(start) |
159 | 161 |
|
160 | 162 | @property
|
161 | 163 | def goal(self):
|
@@ -185,7 +187,7 @@ def goal(self, goal):
|
185 | 187 | if goal is not None:
|
186 | 188 | if self.isoccupied(goal):
|
187 | 189 | raise ValueError("Goal location inside obstacle")
|
188 |
| - self._goal = base.getvector(goal) |
| 190 | + self._goal = getvector(goal) |
189 | 191 |
|
190 | 192 | @property
|
191 | 193 | def verbose(self):
|
@@ -323,7 +325,7 @@ def validate_endpoint(self, p, dtype=None):
|
323 | 325 | :seealso: :meth:`isoccupied` :meth:`occgrid`
|
324 | 326 | """
|
325 | 327 | if p is not None:
|
326 |
| - p = base.getvector(p, self._ndims, dtype=dtype) |
| 328 | + p = getvector(p, self._ndims, dtype=dtype) |
327 | 329 | if self.isoccupied(p):
|
328 | 330 | raise ValueError("Point is inside obstacle")
|
329 | 331 | return p
|
@@ -635,7 +637,7 @@ def plot(
|
635 | 637 | if configspace and ndims < 3 and path is not None:
|
636 | 638 | raise ValueError(f"path should have {ndims} rows")
|
637 | 639 |
|
638 |
| - ax = base.axes_logic(ax, ndims) |
| 640 | + ax = axes_logic(ax, ndims) |
639 | 641 |
|
640 | 642 | # plot occupancy grid background
|
641 | 643 | if background:
|
@@ -734,7 +736,7 @@ def plot(
|
734 | 736 |
|
735 | 737 | elif ndims == 2 and self._ndims == 3:
|
736 | 738 | # 2d projection of 3d plot, show start/goal configuration
|
737 |
| - scale = base.axes_get_scale(ax) / 10 |
| 739 | + scale = axes_get_scale(ax) / 10 |
738 | 740 |
|
739 | 741 | if self.marker is None:
|
740 | 742 | self.marker = VehiclePolygon(shape="car", scale=scale)
|
@@ -827,9 +829,9 @@ def plot_bg(
|
827 | 829 | return
|
828 | 830 |
|
829 | 831 | if isinstance(self._occgrid, BaseOccupancyGrid):
|
830 |
| - ax = base.plotvol2(dim=self._oc
5F79
cgrid.workspace, ax=ax) |
| 832 | + ax = plotvol2(dim=self._occgrid.workspace, ax=ax) |
831 | 833 | else:
|
832 |
| - ax = base.axes_logic(ax, 2) |
| 834 | + ax = axes_logic(ax, 2) |
833 | 835 |
|
834 | 836 | # create color map for free space + obstacle:
|
835 | 837 | # free space, color index = 1, white, alpha=0 to allow background and grid lines to show
|
|
0 commit comments