|
| 1 | +# MIT Licensed |
| 2 | +import numpy as np |
| 3 | +from collections import namedtuple |
| 4 | + |
| 5 | +RobotModel = namedtuple('RobotModel', "dh angles") |
| 6 | + |
| 7 | +def kuka_lbr_iiwa_7(): |
| 8 | + """Get KUKA LBR iiwa 7 MDH model. (https://github.com/nnadeau/pybotics)""" |
| 9 | + dh = [ |
| 10 | + {'alpha': 0, 'theta': 0, 'd': 0, 'a': 0.340, "type": 1}, |
| 11 | + {'alpha': -np.pi / 2, 'theta': 0, 'd': 0, 'a': 0, "type": 1}, |
| 12 | + {'alpha': np.pi / 2, 'theta': 0, 'd': 0, 'a': 0.400, "type": 1}, |
| 13 | + {'alpha': np.pi / 2, 'theta': 0, 'd': 0, 'a': 0, "type": 1}, |
| 14 | + {'alpha': -np.pi / 2, 'theta': 0, 'd': 0, 'a': 0.400, "type": 1}, |
| 15 | + {'alpha': -np.pi / 2, 'theta': 0, 'd': 0, 'a': 0, "type": 1}, |
| 16 | + {'alpha': np.pi / 2, 'theta': 0, 'd': 0, 'a': 0.126, "type": 1}, |
| 17 | + ] |
| 18 | + return dh |
| 19 | + |
| 20 | +def kuka_kr_500(): |
| 21 | + """KUKA KR 500 (Forces Acting on the Robot during Grinding, Thesis, Adam Tresnak, 2017)""" |
| 22 | + dh = [ |
| 23 | + {'alpha': np.pi / 2, 'theta': 0, 'd': -1.045, 'a': 0.5, "type": 1}, |
| 24 | + {'alpha': 0, 'theta': 0, 'd': 0, 'a': 1.3, "type": 1}, |
| 25 | + {'alpha': -np.pi / 2, 'theta': 0, 'd': 0, 'a': 0.055, "type": 1}, |
| 26 | + {'alpha': np.pi / 2, 'theta': 0, 'd': -1.025, 'a': 0, "type": 1}, |
| 27 | + {'alpha': -np.pi / 2, 'theta': 0, 'd': 0, 'a': 0, "type": 1}, |
| 28 | + {'alpha': np.pi, 'theta': 0, 'd': -0.290, 'a': 0, "type": 1}, |
| 29 | + ] |
| 30 | + return dh |
| 31 | + |
| 32 | +def puma560(): |
| 33 | + """Get PUMA560 MDH model.""" |
| 34 | + return [ |
| 35 | + {'alpha': 0, 'a': 0, 'theta': 0, 'd': 0, "type": 1}, |
| 36 | + {'alpha': -np.pi / 2, 'a': 0, 'theta': 0, 'd': 0, "type": 1}, |
| 37 | + {'alpha': 0, 'a': 0.6127, 'theta': 0, 'd': 0, "type": 1}, |
| 38 | + {'alpha': 0, 'a': 0.5716, 'theta': 0, 'd': 0.1639, "type": 1}, |
| 39 | + {'alpha': -np.pi / 2, 'a': 0, 'theta': 0, 'd': 0.1157, "type": 1}, |
| 40 | + {'alpha': np.pi / 2, 'a': 0, 'theta': np.pi, 'd': 0.0922, "type": 1} |
| 41 | + ] |
| 42 | + |
| 43 | + |
| 44 | +# def mecademic_meca500(): |
| 45 | +# """Get Meca500 MDH model.""" |
| 46 | +# return np.array( |
| 47 | +# { |
| 48 | +# {0, 0, 0, 135}, |
| 49 | +# {-np.pi / 2, 0, -np.pi / 2, 0}, |
| 50 | +# {0, 135, 0, 0}, |
| 51 | +# {-np.pi / 2, 38, 0, 120}, |
| 52 | +# {np.pi / 2, 0, 0, 0}, |
| 53 | +# {-np.pi / 2, 0, np.pi, 72}, |
| 54 | +# } |
| 55 | +# ) |
| 56 | +# |
| 57 | +# ] |
| 58 | +# |
| 59 | +# |
| 60 | +# def ur10(): |
| 61 | +# """Get UR10 MDH model.""" |
| 62 | +# return np.array( |
| 63 | +# { |
| 64 | +# {0, 0, 0, 118}, |
| 65 | +# {np.pi / 2, 0, np.pi, 0}, |
| 66 | +# {0, 612.7, 0, 0}, |
| 67 | +# {0, 571.6, 0, 163.9}, |
| 68 | +# {-np.pi / 2, 0, 0, 115.7}, |
| 69 | +# {np.pi / 2, 0, np.pi, 92.2}, |
| 70 | +# } |
| 71 | +# ) |
0 commit comments