8000 updated gimbal for ground · AndyLoft/robotics-toolbox-python@ff92f2d · GitHub
[go: up one dir, main page]

Skip to content

Commit ff92f2d

Browse files
committed
updated gimbal for ground
1 parent 62799c2 commit ff92f2d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

examples/gimbal.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,28 @@
2121

2222
g1 = rtb.Mesh(
2323
filename=str(path / 'gimbal-ring1.stl'),
24-
base=SE3(0, 0, 1.3),
25-
color=[34, 143, 201]
24+
color=[34, 143, 201],
25+
scale=(1./3,) * 3
2626
)
2727
# g1.v = [0, 0, 0, 0.4, 0, 0]
2828

2929
g2 = rtb.Mesh(
3030
filename=str(path / 'gimbal-ring2.stl'),
31-
base=SE3(0, 0, 1.3),
32-
color=[31, 184, 72]
31+
color=[31, 184, 72],
32+
scale=(1./3,) * 3
3333
)
3434
# g2.v = [0, 0, 0, 0.4, 0.0, 0]
3535

3636
g3 = rtb.Mesh(
3737
filename=str(path / 'gimbal-ring3.stl'),
38-
base=SE3(0, 0, 1.3),
39-
color=[240, 103, 103]
38+
color=[240, 103, 103],
39+
scale=(1./3,) * 3
4040
)
4141
# g3.v = [0, 0, 0, 0.4, 0, 0]
4242

4343
plane = rtb.Mesh(
4444
filename=str(path / 'spitfire_assy-gear_up.stl'),
45-
base=SE3(0, 0, 1.3),
46-
scale=(1./180,) * 3,
45+
scale=(1./(180*3),) * 3,
4746
color=[240, 103, 103]
4847
)
4948

@@ -57,13 +56,15 @@
5756

5857
# compute the three rotation matrices
5958

59+
BASE = SE3(0, 0, 0.5)
6060
R1 = SO3()
6161
R2 = SO3()
6262
R3 = SO3()
6363

6464
# rotation angle sequence
6565
sequence = "zyx"
6666

67+
6768
def update_gimbals(theta, ring):
6869
global R1, R2, R3
6970

@@ -89,7 +90,7 @@ def Rxyz(theta, which):
8990
# pose
9091

9192
def convert(R):
92-
return SE3.SO3(R)
93+
return BASE * SE3.SO3(R)
9394

9495
g3.base = convert(R1 * SO3.Ry(pi/2))
9596
g2.base = convert(R1 * R2 * SO3.Rz(pi/2))

0 commit comments

Comments
 (0)
0