File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -329,6 +329,50 @@ def structure(self):
329
329
330
330
return '' .join (structure )
331
331
332
+ def isrevolute (self ):
333
+ """
334
+ Revolute joints as bool array
335
+
336
+ :return: array of joint type, True if revolute
337
+ :rtype: bool(n)
338
+
339
+ Example:
340
+
341
+ .. runblock:: pycon
342
+
343
+ >>> import roboticstoolbox as rtb
344
+ >>> puma = rtb.models.DH.Puma560()
345
+ >>> puma.isrevolute()
346
+ >>> stanford = rtb.models.DH.Stanford()
347
+ >>> stanford.isrevolute()
348
+
349
+ .. note:: Fixed joints, that maintain a constant link relative pose,
350
+ are not included. ``len(self.structure) == self.n``.
351
+ """
352
+ return [link .isrevolute for link in self ]
353
+
354
+ def isprismatic (self ):
355
+ """
356
+ Revolute joints as bool array
357
+
358
+ :return: array of joint type, True if prismatic
359
+ :rtype: bool(n)
360
+
361
+ Example:
362
+
363
+ .. runblock:: pycon
364
+
365
+ >>> import roboticstoolbox as rtb
366
+ >>> puma = rtb.models.DH.Puma560()
367
+ >>> puma.isprismatic()
368
+ >>> stanford = rtb.models.DH.Stanford()
369
+ >>> stanford.isprismatic()
370
+
371
+ .. note:: Fixed joints, that maintain a constant link relative pose,
372
+ are not included. ``len(self.structure) == self.n``.
373
+ """
374
+ return [link .isprismatic for link in self ]
375
+
332
376
def todegrees (self , q = None ):
333
377
"""
334
378
Convert joint angles to degrees
You can’t perform that action at this time.
0 commit comments