File tree Expand file tree Collapse file tree 2 files changed +28
-10
lines changed Expand file tree Collapse file tree 2 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -145,16 +145,16 @@ def test_dyn(self):
145
145
146
146
self .assertEqual (
147
147
s0 ,
148
- "m = 0.00 \n "
149
- "r = 0.00 0.00 0.00 \n "
150
- " | 0.00 0.00 0.00 | \n "
151
- "I = | 0.00 0. 35 0.00 | \n "
152
- " | 0.00 0.00 0.00 | \n "
153
- "Jm = 0.00 \n "
154
- "B = 0.00 \n "
155
- "Tc = 0.40 (+) -0.43(-) \n "
156
- "G = -62.61 \n "
157
- "qlim = -2.79 to 2.79 " )
148
+ """m = 0
149
+ r = 0 0 0
150
+ | 0 0 0 |
151
+ I = | 0 0.35 0 |
152
+ | 0 0 0 |
153
+ Jm = 0
154
+ B = 0
155
+ Tc = 0.4 (+) -0.43(-)
156
+ G = -63
157
+ qlim = -2.8 to 2.8"" " )
158
158
159
159
def test_properties (self ):
160
160
l0 = rp .ELink ()
Original file line number Diff line number Diff line change @@ -190,6 +190,24 @@ def test_setB(self):
190
190
with self .assertRaises (TypeError ):
191
191
l0 .B = [1 , 2 ]
192
192
193
+ def test_robot (self ):
194
+ l0 = rp .RevoluteDH ()
195
+ r = rp .Robot ([l0 ])
196
+
197
+ self .assertIs (l0 ._robot , r )
198
+
199
+ def test_copy (self ):
200
+
201
+ l0 = rp .RevoluteDH ()
202
+ r = rp .Robot ([l0 ])
203
+ l1 = l0 .copy ()
204
+ l0 .m = 4
205
+ l0 .r [1 ] = 5
206
+ self .assertEqual (l1 .m , 0 )
207
+ self .assertEqual (l1 .r [1 ], 0 )
208
+ self .assertIs (l0 ._robot , r )
209
+ self .assertIs (l1 ._robot , r )
210
+
193
211
if __name__ == '__main__' :
194
212
195
213
unittest .main ()
You can’t perform that action at this time.
0 commit comments