You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functioncompute_angle(L::Real, e, r_a, r_b, positive_branch)
725
726
e_r_a = e'r_a
726
727
e_r_b = e'r_b
727
728
A =-2*(r_b'r_a - e_r_b'e_r_a)
@@ -730,7 +731,7 @@ function compute_angle(L::Real, e::AbstractVector, r_a::AbstractVector, r_b::Abs
730
731
k1 = A^2+ B^2
731
732
k1a = k1 - C^2
732
733
if k1a isa AbstractFloat
733
-
k1a >1e-10||error("Singular position of loop (either no or two analytic solutions; the mechanism has lost one-degree-of freedom in this position). Try to use another joint-assembly component. In most cases it is best to let joints outside of the JointXXX component be revolute and _not_ prismatic joints. If this also leads to singular positions, it could be that this kinematic loop cannot be solved analytically. In this case you have to build up the loop with basic joints (_no_ aggregation JointXXX components) and rely on dynamic state selection, i.e., during simulation the states will be dynamically selected in such a way that in no position a degree of freedom is lost.")
734
+
#k1a > 1e-10 || error("Singular position of loop (either no or two analytic solutions; the mechanism has lost one-degree-of freedom in this position). Try to use another joint-assembly component. In most cases it is best to let joints outside of the JointXXX component be revolute and _not_ prismatic joints. If this also leads to singular positions, it could be that this kinematic loop cannot be solved analytically. In this case you have to build up the loop with basic joints (_no_ aggregation JointXXX components) and rely on dynamic state selection, i.e., during simulation the states will be dynamically selected in such a way that in no position a degree of freedom is lost.")
734
735
end
735
736
k1b =max(k1a, 1.0e-12)
736
737
k2 =sqrt(k1b)
@@ -747,7 +748,7 @@ function compute_angle2(L::Real, e::AbstractVector, r_a::AbstractVector, r_b::Ab
747
748
C = r_a'r_a + r_b'r_b - L^2-2*e_r_b'e_r_a
748
749
k1 = A^2+ B^2
749
750
k1a = k1 - C^2
750
-
k1a >1e-10||error("Singular position of loop (either no or two analytic solutions; the mechanism has lost one-degree-of freedom in this position). Try to use another joint-assembly component. In most cases it is best to let joints outside of the JointXXX component be revolute and _not_ prismatic joints. If this also leads to singular positions, it could be that this kinematic loop cannot be solved analytically. In this case you have to build up the loop with basic joints (_no_ aggregation JointXXX components) and rely on dynamic state selection, i.e., during simulation the states will be dynamically selected in such a way that in no position a degree of freedom is lost.")
751
+
#k1a > 1e-10 || error("Singular position of loop (either no or two analytic solutions; the mechanism has lost one-degree-of freedom in this position). Try to use another joint-assembly component. In most cases it is best to let joints outside of the JointXXX component be revolute and _not_ prismatic joints. If this also leads to singular positions, it could be that this kinematic loop cannot be solved analytically. In this case you have to build up the loop with basic joints (_no_ aggregation JointXXX components) and rely on dynamic state selection, i.e., during simulation the states will be dynamically selected in such a way that in no position a degree of freedom is lost.")
0 commit comments