Skip to content

Commit 95d7efb

Browse files
committed
Merge branch 'future' of github.com:petercorke/robotics-toolbox-python into future
2 parents 3c0e463 + b97420d commit 95d7efb

File tree

8 files changed

+904
-109
lines changed

8 files changed

+904
-109
lines changed

roboticstoolbox/blocks/arm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ def __init__(
147147
:type q0: array_like(n), optional
148148
:param useprevious: Use previous IK solution as q0, defaults to True
149149
:type useprevious: bool, optional
150-
:param ik: Specify an IK function, defaults to ``Robot.ikine_LM``
151-
:type ik: callable
150+
:param ik: Specify an IK function, defaults to "LM"
151+
:type ik: str
152152
:param args: Options passed to IK function
153153
:type args: dict
154154
:param seed: random seed for solution

roboticstoolbox/mobile/Animations.py

+12
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@Author: Peter Corke, original MATLAB code and Python version
33
@Author: Kristian Gibson, initial MATLAB port
44
"""
5+
56
from abc import ABC
67
from math import pi, atan2
78
import numpy as np
@@ -194,6 +195,7 @@ def __init__(self, shape="car", scale=1, **kwargs):
194195
``shape`` can be:
195196
196197
* ``"car"`` a rectangle with chamfered front corners
198+
* ``"box"`` a rectangle
197199
* ``"triangle"`` an isocles triangle pointing in the forward direction
198200
* an 2xN NumPy array of vertices, does not have to be closed.
199201
@@ -205,6 +207,7 @@ def __init__(self, shape="car", scale=1, **kwargs):
205207
super().__init__()
206208
if isinstance(shape, str):
207209

210+
# consider vehicle at origin, pointing along +ve x-axis
208211
h = 0.3
209212
t = 0.8 # start of head taper
210213
c = 0.5 # centre x coordinate
@@ -221,6 +224,15 @@ def __init__(self, shape="car", scale=1, **kwargs):
221224
[-c, -h],
222225
]
223226
).T
227+
elif shape == "box":
228+
self._coords = np.array(
229+
[
230+
[-c, h],
231+
[w - c, h],
232+
[w - c, -h],
233+
[-c, -h],
234+
]
235+
).T
224236
elif shape == "triangle":
225237
self._coords = np.array(
226238
[

0 commit comments

Comments
 (0)