@@ -184,8 +184,8 @@ Joint with 3 constraints that define that the origin of `frame_a` and the origin
184
184
dnum = d
185
185
@named begin
186
186
ptf = PartialTwoFrames ()
187
- R_rel = NumRotationMatrix ()
188
- R_rel_inv = NumRotationMatrix ()
187
+ Rrel = NumRotationMatrix ()
188
+ Rrel_inv = NumRotationMatrix ()
189
189
end
190
190
pars = @parameters begin
191
191
radius = radius, [description = " radius of the joint in animations" ]
@@ -209,14 +209,14 @@ Joint with 3 constraints that define that the origin of `frame_a` and the origin
209
209
else
210
210
fric = d* w_rel
211
211
eqs = [- fric .~ collect (frame_a. tau)
212
- fric .~ resolve1 (R_rel , collect (frame_b. tau))
212
+ fric .~ resolve1 (Rrel , collect (frame_b. tau))
213
213
collect (frame_b. r_0) .~ collect (frame_a. r_0)]
214
214
end
215
215
216
216
if state
217
217
if quat
218
- append! (eqs, nonunit_quaternion_equations (R_rel , w_rel))
219
- # append!(eqs, collect(w_rel) .~ angularVelocity2(R_rel ))
218
+ append! (eqs, nonunit_quaternion_equations (Rrel , w_rel))
219
+ # append!(eqs, collect(w_rel) .~ angularVelocity2(Rrel ))
220
220
else
221
221
@variables begin
222
222
(phi (t)[1 : 3 ] = phi),
@@ -227,20 +227,20 @@ Joint with 3 constraints that define that the origin of `frame_a` and the origin
227
227
[state_priority = 10 , description = " 3 angle second derivatives" ]
228
228
end
229
229
append! (eqs,
230
- [R_rel ~ axes_rotations (sequence, phi, phi_d)
231
- collect (w_rel) .~ angular_velocity2 (R_rel )
230
+ [Rrel ~ axes_rotations (sequence, phi, phi_d)
231
+ collect (w_rel) .~ angular_velocity2 (Rrel )
232
232
collect (phi_d .~ D .(phi))
233
233
collect (phi_dd .~ D .(phi_d))])
234
234
end
235
235
if isroot
236
236
append! (eqs,
237
- [connect_orientation (ori (frame_b), absolute_rotation (frame_a, R_rel ); iscut)
238
- zeros (3 ) .~ collect (frame_a. f) + resolve1 (R_rel , frame_b. f)])
237
+ [connect_orientation (ori (frame_b), absolute_rotation (frame_a, Rrel ); iscut)
238
+ zeros (3 ) .~ collect (frame_a. f) + resolve1 (Rrel , frame_b. f)])
239
239
else
240
240
append! (eqs,
241
- [connect_orientation (R_rel_inv , inverse_rotation (R_rel ); iscut)
242
- ori (frame_a) ~ absolute_rotation (frame_b, R_rel_inv )
243
- zeros (3 ) .~ collect (frame_b. f) + resolve2 (R_rel , frame_a. f)])
241
+ [connect_orientation (Rrel_inv , inverse_rotation (Rrel ); iscut)
242
+ ori (frame_a) ~ absolute_rotation (frame_b, Rrel_inv )
243
+ zeros (3 ) .~ collect (frame_b. f) + resolve2 (Rrel , frame_a. f)])
244
244
end
245
245
246
246
else
@@ -727,10 +727,10 @@ The relative position vector `r_rel_a` from the origin of `frame_a` to the origi
727
727
(a_rel_a (t)[1 : 3 ] = a_rel_a), [description = " = der(v_rel_a)" ]
728
728
end
729
729
730
- @named R_rel_f = Frame ()
731
- @named R_rel_inv_f = Frame ()
732
- R_rel = ori (R_rel_f )
733
- R_rel_inv = ori (R_rel_inv_f )
730
+ @named Rrel_f = Frame ()
731
+ @named Rrel_inv_f = Frame ()
732
+ Rrel = ori (Rrel_f )
733
+ Rrel_inv = ori (Rrel_inv_f )
734
734
735
735
eqs = [
736
736
# Cut-forces and cut-torques are zero
@@ -747,22 +747,22 @@ The relative position vector `r_rel_a` from the origin of `frame_a` to the origi
747
747
if state
748
748
if isroot
749
749
append! (eqs,
750
- connect_orientation (ori (frame_b), absolute_rotation (frame_a, R_rel ); iscut))
750
+ connect_orientation (ori (frame_b), absolute_rotation (frame_a, Rrel ); iscut))
751
751
else
752
752
append! (eqs,
753
- [R_rel_inv ~ inverse_rotation (R_rel )
754
- connect_orientation (ori (frame_a), absolute_rotation (frame_b, R_rel_inv ); iscut)])
753
+ [Rrel_inv ~ inverse_rotation (Rrel )
754
+ connect_orientation (ori (frame_a), absolute_rotation (frame_b, Rrel_inv ); iscut)])
755
755
end
756
756
757
757
if quat
758
- append! (eqs, nonunit_quaternion_equations (R_rel , w_rel_b))
758
+ append! (eqs, nonunit_quaternion_equations (Rrel , w_rel_b))
759
759
760
760
else
761
761
append! (eqs,
762
762
[phi_d .~ D .(phi)
763
763
phi_dd .~ D .(phi_d)
764
- R_rel ~ axes_rotations (sequence, phi, phi_d)
765
- w_rel_b .~ angular_velocity2 (R_rel )])
764
+ Rrel ~ axes_rotations (sequence, phi, phi_d)
765
+ w_rel_b .~ angular_velocity2 (Rrel )])
766
766
end
767
767
768
768
else
@@ -774,9 +774,9 @@ The relative position vector `r_rel_a` from the origin of `frame_a` to the origi
774
774
end
775
775
end
776
776
if state && ! isroot
777
- compose (ODESystem (eqs, t; name), frame_a, frame_b, R_rel_f, R_rel_inv_f )
777
+ compose (ODESystem (eqs, t; name), frame_a, frame_b, Rrel_f, Rrel_inv_f )
778
778
else
779
- compose (ODESystem (eqs, t; name), frame_a, frame_b, R_rel_f , )
779
+ compose (ODESystem (eqs, t; name), frame_a, frame_b, Rrel_f , )
780
780
end
781
781
end
782
782
@@ -819,11 +819,11 @@ If a planar loop is present, e.g., consisting of 4 revolute joints where the joi
819
819
@variables n (t)[1 : 3 ]
820
820
821
821
822
- # @named R_rel = NumRotationMatrix()
822
+ # @named Rrel = NumRotationMatrix()
823
823
824
824
Rrel0 = planar_rotation (n, 0 , 0 )
825
825
varw = false
826
- @named R_rel = NumRotationMatrix (; R = Rrel0. R, w = Rrel0. w, varw)
826
+ @named Rrel = NumRotationMatrix (; R = Rrel0. R, w = Rrel0. w, varw)
827
827
828
828
n = collect (n)
829
829
ey_a = collect (ey_a)
@@ -834,14 +834,14 @@ If a planar loop is present, e.g., consisting of 4 revolute joints where the joi
834
834
Rb = ori (frame_b)
835
835
836
836
eqs = [
837
- R_rel ~ relative_rotation (ori (frame_a), ori (frame_b))
837
+ Rrel ~ relative_rotation (ori (frame_a), ori (frame_b))
838
838
r_rel_a .~ resolve2 (ori (frame_a), collect (frame_b. r_0 - frame_a. r_0))
839
839
0 ~ (ex_a' r_rel_a)[]
840
840
0 ~ (ey_a' r_rel_a)[]
841
841
collect (frame_a. tau) .~ zeros (3 )
842
842
collect (frame_b. tau) .~ zeros (3 )
843
843
collect (frame_a. f) .~ vec ([ex_a ey_a]* f_c)
844
- collect (frame_b. f) .~ - resolve2 (R_rel , frame_a. f)
844
+ collect (frame_b. f) .~ - resolve2 (Rrel , frame_a. f)
845
845
collect (n) .~ n0
846
846
]
847
847
ODESystem (eqs, t; name, systems= [frame_a, frame_b])
0 commit comments