File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ def __init__(
55
55
ets = ETS (),
56
56
v = None ,
57
57
parent = None ,
58
+ jindex = None ,
58
59
** kwargs ):
59
60
60
61
# process common options
@@ -81,7 +82,7 @@ def __init__(
81
82
self ._parent = parent
82
83
self ._child = []
83
84
self ._joint_name = None
84
- self ._jindex = None
85
+ self ._jindex = jindex
85
86
86
87
# Initialise the static transform representing the constant
87
88
# component of the ETS
Original file line number Diff line number Diff line change 11
11
import spatialmath as sm
12
12
13
13
14
- class TestETS (unittest .TestCase ):
14
+ class TestERobot (unittest .TestCase ):
15
+
16
+ def test_ets_init (self ):
17
+ ets = rp .ETS .tx (- 0.0825 ) * rp .ETS .rz () * rp .ETS .tx (- 0.0825 ) \
18
+ * rp .ETS .rz () * rp .ETS .tx (0.1 )
19
+
20
+ rp .ERobot (ets )
21
+
22
+ def test_init_bases (self ):
23
+ e1 = rp .ELink ()
24
+ e2 = rp .ELink ()
25
+ e3 = rp .ELink (parent = e1 )
26
+ e4 = rp .ELink (parent = e2 )
27
+
28
+ with self .assertRaises (ValueError ):
29
+ rp .ERobot ([e1 , e2 , e3 , e4 ])
30
+
31
+ # def test_jindex(self):
32
+ # e1 = rp.ELink(rp.ETS.rz(), jindex=0)
33
+ # e2 = rp.ELink(rp.ETS.rz(), jindex=1, parent=e1)
34
+ # e3 = rp.ELink(rp.ETS.rz(), jindex=2, parent=e2)
35
+ # e4 = rp.ELink(rp.ETS.rz(), jindex=3, parent=e3)
36
+
37
+
38
+
39
+ # # with self.assertRaises(ValueError):
40
+ # rp.ERobot([e1, e2, e3, e4])
15
41
16
42
def test_panda (self ):
17
43
panda = rp .models .ETS .Panda ()
You can’t perform that action at this time.
0 commit comments