Further API Reference
PoseComposition.Pose — TypeFields:
pos::StaticArrays.StaticVector{3, var"#s1"} where var"#s1"<:RealOrigin of the object's coordinate frame.
orientation::Rotations.Rotation{3, T} where TOrientation of the object's coordinate frame.
Struct representing the pose (position and orientation) of an object.
Can represent either a relative pose (relative to some parent coordinate frame which must be supplied by context) or an absolute pose. An absolute pose is, by definition, a pose relative to the world coordinate frame.
See Operations on Poses for documentation of this data structure and the operations defined on it.
Base.:* — Method*(a::PoseComposition.Pose, bpoints::AbstractMatrix{var"#s6"} where var"#s6"<:Real) -> Any
Vectorized pose–point multiplication. Returns the matrix whose ith column is a * bpoints[:, i].
The matrix bpoints must have 3 rows, as each column represents a point in 3D space.
Base.:\ — Method\(a::PoseComposition.Pose, bpoints::AbstractMatrix{var"#s6"} where var"#s6"<:Real) -> Any
Vectorized version of pose–point left division. Returns the matrix whose ith column is a \ bpoints[:, i].
The matrix bpoints must have 3 rows, as each column represents a point in 3D space.
PoseComposition.geodesicHopf — MethodgeodesicHopf(newZ::StaticArrays.StaticVector{3, var"#s6"} where var"#s6"<:Real, planarAngle::Real) -> Any
This code mostly duplicates GenDirectionalStats.hopf. The two should probably be consolidated into one.
Returns a rotation that carries the z-axis to newZ, with the remaining degree of freedom determined by planarAngle as described below.
Start with the case planarAngle = 0. In that case, the returned rotation is the unique (except at singularities) rotation that carries [0, 0, 1] to newZ "along a great circle" (more precisely: the unique rotation that carries [0, 0, 1] to newZ and whose equator contains [0, 0, 1] and newZ; "equator" means the unique great circle that is fixed setwise by the rotation).
Next consider the general case. This works the same as the above special case, except that we precede that rotation with a rotation by angle planarAngle around [0, 0, 1] (or equivalently, we follow that rotation with a rotation by planarAngle around newZ).
The name of this function comes from the fact that we are using geodesics (great circles) to define a coordinate chart on the fiber over newZ in the Hopf fibration.
See also: invGeodesicHopf
PoseComposition.interp — Methodinterp(a::PoseComposition.Pose, b::PoseComposition.Pose, t::Real) -> Any
Like interp, but interpolates between two given poses rather than always starting at the identity. That is,
interp(a, b, 0) == a
interp(a, b, 1) == band as a special case, we have
interp(b, t) == interp(IDENTITY_POSE, b, t)PoseComposition.interp — Methodinterp(b::PoseComposition.Pose, t::Real) -> Any
Interpolates between the identity pose and b.
Namely, interp(b, 0) == IDENTITY_POSE and interp(b, 1) == b. The position is interpolated linearly and the orientation is interpolated by quaternion SLERP. That is, this interpolation treats position and orientation independently, as in the ⊗ operation (not the * operation).
PoseComposition.invGeodesicHopf — MethodinvGeodesicHopf(r::Rotations.Rotation{3, T} where T) -> NamedTuple{(:newZ, :planarAngle), _A} where _A<:Tuple{Any, Any}
Inverse function of geodesicHopf.
Satisfies the round-trip conditions
geodesicHopf(invGeodesicHopf(r)...) == rand
invGeodesicHopf(geodesicHopf(newZ, planarAngle))
== (newZ=newZ, planarAngle=planarAngle)PoseComposition.isapproxIncludingQuaternionSign — MethodisapproxIncludingQuaternionSign(a::PoseComposition.Pose, b::PoseComposition.Pose; kwargs)
Like isapprox, but does not consider a quaternion to be equivalent to its negative (even though they correspond to the same rotation matrix). Note that this is stricter than Base.isapprox, since for a Rotations.QuatRotation q, we have -q ≈ q and in fact -q == q.