File tree 2 files changed +16
-8
lines changed
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ def __init__(
57
57
else init_joint_angles
58
58
)
59
59
60
+ self .reset_robot ()
61
+
60
62
# Robot setup
61
63
self .robot = None
62
64
# Load robot URDF config
@@ -306,16 +308,20 @@ def _get_sensor_attributes(self) -> dict:
306
308
sensor_attributes .update ({Path (file ).stem : yamlcontent })
307
309
return sensor_attributes
308
310
309
- def reset_robot (self ) :
311
+ def reset_robot (self , joint_angles : tuple = None ) -> None :
310
312
if self .robot is None :
311
313
return
312
314
self .init_joint_angles = (
313
- - np .pi / 2 ,
314
- - np .pi * 2 / 3 ,
315
- np .pi * 2 / 3 ,
316
- - np .pi ,
317
- - np .pi / 2 ,
318
- np .pi ,
315
+ (
316
+ - np .pi / 2 + np .pi / 4 ,
317
+ - np .pi * 2 / 3 ,
318
+ np .pi * 2 / 3 ,
319
+ - np .pi ,
320
+ - np .pi / 2 ,
321
+ 0 ,
322
+ )
323
+ if joint_angles is None
324
+ else joint_angles
319
325
)
320
326
self .set_joint_angles_no_collision (self .init_joint_angles )
321
327
return
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
import math
3
3
4
+
4
5
def roundup (x ):
5
6
return math .ceil (x / 10.0 ) * 10
6
7
8
+
7
9
def rounddown (x ):
8
- return math .floor (x / 10.0 ) * 10
10
+ return math .floor (x / 10.0 ) * 10
You can’t perform that action at this time.
0 commit comments