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
besides the existing `parent, translation, rotation, feature`. A freely moving Object3D is defined with
103
+
`Object3D(..., fixedInParent=false, ...)`, where `velocity=.., angularVelocity=..`
104
+
are the initial conditions (resolved in the parent frame). The states and other code for such Object3Ds are
105
+
*not* part of the generated code (so compilation is faster, and the objects can be changed after code generation).\
106
+
If `fixedToParent=false`, vectors `translation, rotation, velocity, angularVelocity` (all resolved in `parent`)
107
+
are used as states and are available in the result for plotting.
108
+
`rotation` is vector `[angleX, angleY, angleZ]` to rotate the parent coordinate system
109
+
along the x-axis with `angleX`, the y-axis with `angleY` and the z-axis with `angleZ` to arrive at the Object3D
110
+
coordinate system. If `rotation[2]` is close to its singular position (= 90u"°" or -90u"°"),
111
+
an event is triggered and the rotation sequence is changed from `[angleX, angleY, angleZ]` to `[angleX, angleZ, angleY]`.
112
+
In the new rotation sequence, `rotation[2]` is far from its singular position at this time instant.
113
+
Variable `rotationXYZ::Bool` in the result signals whether rotation is defined with rotation
114
+
sequence `[angleX, angleY, angleZ]` (`rotationXYZ=true`) or with rotation sequence
115
+
`[angleX, angleZ, angleY]` (`rotationXYZ=false`). See, example `Modia3D/test/Basic/ShaftFreeMotionAdaptiveRotSequence.jl`.
116
+
Note, the initial conditions (so `rotation=...` as key/value pair in the Object3D constructor)
117
+
are always with `rotationXYZ=true`.\
118
+
With respect to an approach where the rotation is described with *quaternions*, the
119
+
adaptive rotation sequence handling has the benefits, that (1) all integrators can be used
120
+
(a quaternion description works with an overdetermined set of states and therefore standard
121
+
integrators with step size control need code changes) and that (2) integrators with step size control can usually
122
+
perform larger steps.
123
+
124
+
- The `FreeMotion` joints in all test models have been removed and replaced by Object3Ds with `fixedInParent=false`.
125
+
A new test model test/Basic/FreeShaftAdaptiveRotSequenceWithFreeMotion.jl has been introduced with a `FreeMotion`
126
+
joint, to still have one test for a `FreeMotion` joint.
104
127
105
128
-`Revolute(..)` and `Prismatic(..)` joints can define axis of rotation/translation optionally as vector, e.g., `axis = [1.0, 2.0, 3.0]`.
106
129
107
-
- New variants of functions: `Modia3D.rot1(angle,v), Modia3D.rot2(angle,v), Modia3D.rot3(angle,v), Modia3D.resolve1(rotation,v2), Modia3D.resolve2(rotation,v1)`.
130
+
- New function `Modia3D.rot1(angle,v)` which is an efficient implementation of `Modia3D.rot1(angle)*v` where `rot1(angle)` returns
131
+
a transformation matrix and `v` is a vector and `rot1(angle,v)` returns the product of the transformation matrix and a vector
132
+
in an efficient way. Correspondingly, there are new functions
Copy file name to clipboardExpand all lines: src/Composition/object3D.jl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -79,8 +79,8 @@ If `fixedToParent=false`, the Object3D is moving freely relatively to `parent`.
79
79
Vectors `translation`, `rotation`, `velocity`, `angularVelocity` (all resolved in `parent`) are used as states and are available in the result for plotting.
80
80
81
81
If `rotation[2]` is close to its singular position (= 90u"°" or -90u"°"), an event is triggered and the rotation sequence is changed from `[angleX, angleY, angleZ]` to
82
-
`[angleX, angleZ, angleY]`. In the new rotation sequence, `rotation[2]` is far from its singular position at this time instant. Variable `rotation123::Bool` in the result
83
-
signals whether `rotation` is defined with rotation sequence `[angleX, angleY, angleZ]` (`rotation123=true`) or with rotation sequence `[angleX, angleZ, angleY]` (`rotation123=false`).
82
+
`[angleX, angleZ, angleY]`. In the new rotation sequence, `rotation[2]` is far from its singular position at this time instant. Variable `rotationXYZ::Bool` in the result
83
+
signals whether `rotation` is defined with rotation sequence `[angleX, angleY, angleZ]` (`rotationXYZ=true`) or with rotation sequence `[angleX, angleZ, angleY]` (`rotationXYZ=false`).
84
84
See, example `Modia3D/test/Basic/ShaftFreeMotionAdaptiveRotSequence.jl`.
0 commit comments