Reference
KinematicCoordinateTransformations.ConstantAffineMap
— TypeConstantAffineMap
A struct
describing a transformation of the form x_target = A*x_source + b
, and time derivatives of x_source
, where A
and b
are constant in time.
ConstantAffineMap
s are typically constructed internally from other KinematicTransformation
s.
KinematicCoordinateTransformations.ConstantLinearMap
— TypeConstantLinearMap(A)
Construct a reference frame transformation of the form x_target = A*x_source
, where A
is constant with time.
KinematicCoordinateTransformations.ConstantVelocityTransformation
— TypeConstantVelocityTransformation(t0, x0, v)
Construct a transformation of a reference frame moving with a constant velocity, i.e., x_target = x_source + x0 .+ (t - t0)*v
.
Arguments
t0
: Time at which the position of the source coordinate system's origin in the target coordinate system is equal tox0
.x0
: Position of the source coordinate system's origin in the target coordinate system's frame of reference at timet0
.v
: (Constant) velocity of the source coordinate system relative to the target coordinate system.
KinematicCoordinateTransformations.KinematicTransformation
— TypeKinematicTransformation
An abstract type representing a transformation of kinematic quantities.
(trans::KinematicTransformation)(t, x, [v, [a, [j]]], linear_only::Bool=false)
Transform vector x
, and optionally v
, a
, and j
from the source coordinate system to the target coordinate system at time t
according to the transformation trans
, returning x
and optionally v
, a
, and j
in the target coordinate system.
v
, a
, and j
are the first through third time derivatives of x
.
If linear_only
is true
, the constant part (if any) of the transformation will not be applied. For example, with a ConstantAffineMap
, which represents a transformation of the form x_target = A*x_source + b
, the b
will not be used. This is useful for properly transforming vectors that don't represent the position of a point and time derivatives of the same (e.g. force).
KinematicCoordinateTransformations.SteadyRotXTransformation
— TypeSteadyRotXTransformation(t0, ω, θ)
Construct a transformation of a reference frame rotating about the x axis at a constant rate ω
.
The rotation angle as a function of time will be angle = ω*(t - t0) + θ
.
Arguments
t0
: Time at which the angle between the target and source coordinate systems' y and z axes is θ.ω
: Rotation rate of the target coordinate system, in units ofrad/<time>
.θ
: Angle between the target and source coordinate systems' y and z axes at timet0
.
KinematicCoordinateTransformations.SteadyRotYTransformation
— TypeSteadyRotYTransformation(t0, ω, θ)
Construct a transformation of a reference frame rotating about the y axis at a constant rate ω
.
The rotation angle as a function of time will be angle = ω*(t - t0) + θ
.
Arguments
t0
: Time at which the angle between the target and source coordinate systems' x and z axes is θ.ω
: Rotation rate of the target coordinate system, in units ofrad/<time>
.θ
: Angle between the target and source coordinate systems' x and z axes at timet0
.
KinematicCoordinateTransformations.SteadyRotZTransformation
— TypeSteadyRotZTransformation(t0, ω, θ)
Construct a transformation of a reference frame rotating about the z axis at a constant rate ω
.
The rotation angle as a function of time will be angle = ω*(t - t0) + θ
.
Arguments
t0
: Time at which the angle between the target and source coordinate systems' x and y axes is θ.ω
: Rotation rate of the target coordinate system, in units ofrad/<time>
.θ
: Angle between the target and source coordinate systems' x and y axes at timet0
.
KinematicCoordinateTransformations.compose
— Functioncompose(t, trans1::KinematicTransformation, trans2::KinematicTransformation)
Return a transformation resulting from applying trans2
and then trans1
at time t
.
This will likely return a ConstantAffineMap
, but may return a more specific transformation. For example, combining two ConstantLinearMap
s will result in a new ConstantLinearMap
.
KinematicCoordinateTransformations.transform
— Functiontransform(trans::KinematicTransformation, t, x, [v, [a, [j]]], linear_only::Bool=false)
Transform vector x
, and optionally v
, a
, and j
from the source coordinate system to the target coordinate system at time t
according to the transformation trans
, returning x
and optionally v
, a
, and j
in the target coordinate system.
v
, a
, and j
are the first through third time derivatives of x
.
If linear_only
is true
, the constant part (if any) of the transformation will not be applied. For example, with a ConstantAffineMap
, which represents a transformation of the form x_target = A*x_source + b
, the b
will not be used. This is useful for properly transforming vectors that don't represent the position of a point and time derivatives of the same (e.g. force).
KinematicCoordinateTransformations.transform!
— Functiontransform!(x_new, [v_new, [a_new, [j_new]]], trans::KinematicTransformation, t, x, [v, [a, [j]]], linear_only::Bool=false)
Transform vector x
, and optionally v
, a
, and j
from the source coordinate system to the target coordinate system at time t
according to the transformation trans
, returning the results in x_new
and optionally v_new
, a_new
, and j_new
in the target coordinate system.
v
, a
, and j
are the first through third time derivatives of x
.
If linear_only
is true
, the constant part (if any) of the transformation will not be applied. For example, with a ConstantAffineMap
, which represents a transformation of the form x_target = A*x_source + b
, the b
will not be used. This is useful for properly transforming vectors that don't represent the position of a point and time derivatives of the same (e.g. force).