1
1
"""
2
- Revolute(; name, phi = 0.0, tau = 0.0, use_flange = false)
2
+ Revolute(; name, phi = 0.0, tau = 0.0, axisflange = false)
3
3
A revolute joint
4
4
5
5
# parameters
6
- - `use_flange =false`: If `true`, a force flange is enabled, otherwise implicitly grounded"
6
+ - `axisflange =false`: If `true`, a force flange is enabled, otherwise implicitly grounded"
7
7
- `phi`: [rad] Initial angular position for the flange
8
8
- `tau`: [N.m] Initial Cut torque in the flange
9
9
@@ -16,22 +16,22 @@ A revolute joint
16
16
# Connectors
17
17
- `frame_a` [Frame](@ref)
18
18
- `frame_b` [Frame](@ref)
19
- - `fixed` [Fixed](@ref) if `use_flange == false`
20
- - `flange_a` [Flange](@ref) if `use_flange == true`
21
- - `support` [Support](@ref) if `use_flange == true`
19
+ - `fixed` [Fixed](@ref) if `axisflange == false`
20
+ - `flange_a` [Flange](@ref) if `axisflange == true`
21
+ - `support` [Support](@ref) if `axisflange == true`
22
22
23
23
https://github.com/dzimmer/PlanarMechanics/blob/743462f58858a808202be93b708391461cbe2523/PlanarMechanics/Joints/Revolute.mo
24
24
"""
25
25
@component function Revolute (;
26
26
name,
27
- use_flange = false , render = true , radius = 0.1 , color = [1.0 , 0.0 , 0.0 , 1.0 ])
27
+ axisflange = false , render = true , radius = 0.1 , color = [1.0 , 0.0 , 0.0 , 1.0 ], phi = 0 , w = 0 )
28
28
@named partial_frames = PartialTwoFrames ()
29
29
@unpack frame_a, frame_b = partial_frames
30
30
systems = [frame_a, frame_b]
31
31
32
32
vars = @variables begin
33
- (phi (t) = 0.0 ), [state_priority= 10 ]
34
- (ω (t) = 0.0 ), [state_priority= 10 ]
33
+ (phi (t) = phi ), [state_priority= 10 ]
34
+ (w (t) = w ), [state_priority= 10 ]
35
35
α (t)
36
36
tau (t)
37
37
end
@@ -43,8 +43,8 @@ https://github.com/dzimmer/PlanarMechanics/blob/743462f58858a808202be93b70839146
43
43
end
44
44
45
45
eqs = [
46
- ω ~ D (phi),
47
- α ~ D (ω ),
46
+ w ~ D (phi),
47
+ α ~ D (w ),
48
48
# rigidly connect positions
49
49
frame_a. x ~ frame_b. x,
50
50
frame_a. y ~ frame_b. y,
@@ -57,7 +57,7 @@ https://github.com/dzimmer/PlanarMechanics/blob/743462f58858a808202be93b70839146
57
57
frame_a. tau ~ tau
58
58
]
59
59
60
- if use_flange
60
+ if axisflange
61
61
@named fixed = Rotational. Fixed ()
62
62
push! (systems, fixed)
63
63
@named flange_a = Rotational. Flange (; phi, tau)
0 commit comments