iDynTree::Axis class

Class representing an axis (a directed line) in space.

The axis is represented as a origin plus a direction.

Constructors, destructors, conversion operators

Axis()
Default constructor.
Axis(const Direction& _direction, const Position& _origin)
Constructor from a Direction and an origin, represented by a Position object.
Axis(const Axis& other)
Copy constructor: create a Axis from another Axis.

Public functions

auto operator=(const Axis& other) -> Axis&
Assignment operator: assign a Axis from another Axis.
auto getDirection() const -> const Direction&
Get the direction of the axis.
auto getOrigin() const -> const Position&
Get the origin of the axis.
void setDirection(const Direction& _direction)
Set the direction of the axis.
void setOrigin(const Position& _position)
Set the origin of the axis.
auto getRotationTransform(const double theta) const -> Transform
Get the transform induced by a rotation of an angle theta around this axis.
auto getRotationTransformDerivative(const double theta) const -> TransformDerivative
Get the derivative of the getRotationTransform function with respect to the theta argument.
auto getRotationTwist(const double dtheta) const -> Twist
auto getRotationSpatialAcc(const double d2theta) const -> SpatialAcc
auto getTranslationTransform(const double dist) const -> Transform
Get the transform induced by a translation of a distance dist along this axis.
auto getTranslationTransformDerivative(const double) const -> TransformDerivative
Get the derivative of the getTranslationTransform function with respect to the dist argument.
auto getTranslationTwist(const double ddist) const -> Twist
auto getTranslationSpatialAcc(const double d2dist) const -> SpatialAcc
auto isParallel(const Axis& otherAxis, const double tolerance) const -> bool
Check if two axes are parallel (i.e.
auto reverse() const -> Axis
Return the axis with the same origin, but reversed direction.
auto getPointOnAxisClosestToGivenPoint(const iDynTree::Position& point) const -> Position
Compute the point on the axis that is closest to a given opoint.
auto getDistanceBetweenAxisAndPoint(const iDynTree::Position& point) const -> double
Compute distance between the axis and a given point.

Output helpers.

Output helpers.

auto toString() const -> std::string
auto reservedToString() const -> std::string

Function documentation

iDynTree::Axis::Axis()

Default constructor.

The data is not reset to the default for perfomance reason. Please initialize the data in the class before any use.

Transform iDynTree::Axis::getRotationTransform(const double theta) const

Get the transform induced by a rotation of an angle theta around this axis.

The returned transform is the nonRotated_T_rotated, such that if we have a quantity expressed in the frame obtained by the rotation v_rotated, we can transform it back in the non-rotated frame using the returned transform: v_nonRotated = nonRotated_T_rotated*v_rotated

Transform iDynTree::Axis::getTranslationTransform(const double dist) const

Get the transform induced by a translation of a distance dist along this axis.

The returned transform is the nonTranslated_T_translated, such that if we have a quantity expressed in the frame obtained by the translation v_translated, we can transform it back in the non-translated frame using the returned transform: v_nonTranslated = nonTranslated_T_translated*v_translated

bool iDynTree::Axis::isParallel(const Axis& otherAxis, const double tolerance) const

Check if two axes are parallel (i.e.

Parameters
otherAxis the axes to check for parallelism.
tolerance tolerance to use in the parallelism check.

their direction are parallel).