chrono::ChBodyFrame Class Referenceabstract
Description
Class for objects that represent moving frames in space and contain state variables.
#include <ChBodyFrame.h>
Inheritance diagram for chrono::ChBodyFrame:
Collaboration diagram for chrono::ChBodyFrame:
Public Member Functions | |
ChBodyFrame (const ChBodyFrame &other) | |
virtual ChVariables & | Variables ()=0 |
Return a reference to the encapsulated variables, representing states (pos, speed or accel.) and forces. | |
void | To_abs_forcetorque (const ChVector<> &force, const ChVector<> &appl_point, bool local, ChVector<> &resultforce, ChVector<> &resulttorque) |
Transform a force applied at a point on the body into a force and moment applied to the COM and expressed in the absolute frame. More... | |
virtual void | ArchiveOUT (ChArchiveOut &marchive) override |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIN (ChArchiveIn &marchive) override |
Method to allow deserialization of transient data from archives. | |
Public Member Functions inherited from chrono::ChFrameMoving< double > | |
ChFrameMoving (const ChVector< double > &mv=ChVector< double >(0, 0, 0), const ChQuaternion< double > &mq=ChQuaternion< double >(1, 0, 0, 0)) | |
Construct from pos and rot (as a quaternion) | |
ChFrameMoving (const ChVector< double > &mv, const ChMatrix33< double > &ma) | |
Construct from pos and rotation (as a 3x3 matrix) | |
ChFrameMoving (const ChCoordsys< double > &mc) | |
Construct from a coordsys. | |
ChFrameMoving (const ChFrame< double > &mc) | |
Construct from a frame. | |
ChFrameMoving (const ChFrameMoving< double > &other) | |
Copy constructor, build from another moving frame. | |
virtual | ~ChFrameMoving () |
Destructor. | |
ChFrameMoving< double > & | operator= (const ChFrameMoving< double > &other) |
Assignment operator: copy from another moving frame. | |
ChFrameMoving< double > & | operator= (const ChFrame< double > &other) |
Assignment operator: copy from another frame. | |
bool | operator== (const ChFrameMoving< double > &other) const |
Returns true for identical frames. | |
bool | operator!= (const ChFrameMoving< double > &other) const |
Returns true for different frames. | |
ChFrameMoving< double > | operator>> (const ChFrameMoving< double > &Fb) const |
The '>>' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = old_frame >> tr_frame; For a sequence of transformations, i.e. More... | |
ChFrameMoving< double > | operator* (const ChFrameMoving< double > &Fb) const |
The '*' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = tr_frame * old_frame; For a sequence of transformations, i.e. More... | |
ChFrameMoving< double > & | operator>>= (const ChFrameMoving< double > &T) |
Performs pre-multiplication of this frame by another frame, for example: A>>=T means A'=T*A ; or A'=A >> T. | |
ChFrameMoving< double > & | operator>>= (const ChVector< double > &D) |
Performs pre-multiplication of this frame by a vector D, to 'move' by a displacement D: | |
ChFrameMoving< double > & | operator>>= (const ChQuaternion< double > &R) |
Performs pre-multiplication of this frame by a quaternion R, to 'rotate' it by R: | |
ChFrameMoving< double > & | operator>>= (const ChCoordsys< double > &F) |
Performs pre-multiplication of this frame by a ChCoordsys F: | |
ChFrameMoving< double > & | operator>>= (const ChFrame< double > &F) |
Performs pre-multiplication of this frame by a ChFrame F: | |
ChFrameMoving< double > & | operator%= (const ChFrameMoving< double > &T) |
Performs pre-multiplication of this frame by another frame, for example: A%=T means A'=T*A ; or A'=A >> T Note: DEPRECATED, use >>= instead. | |
ChFrameMoving< double > & | operator*= (const ChFrameMoving< double > &T) |
Performs post-multiplication of this frame by another frame, for example: A*=T means A'=A*T ; or A'=T >> A. | |
ChCoordsys< double > & | GetCoord_dt () |
Return both current rotation and translation speeds as a coordsystem object, with vector and quaternion. | |
const ChCoordsys< double > & | GetCoord_dt () const |
ChCoordsys< double > & | GetCoord_dtdt () |
Return both current rotation and translation accelerations as a coordsystem object, with vector and quaternion. | |
const ChCoordsys< double > & | GetCoord_dtdt () const |
ChVector< double > & | GetPos_dt () |
Return the current speed as a 3d vector. | |
const ChVector< double > & | GetPos_dt () const |
ChVector< double > & | GetPos_dtdt () |
Return the current acceleration as a 3d vector. | |
const ChVector< double > & | GetPos_dtdt () const |
ChQuaternion< double > & | GetRot_dt () |
Return the current rotation speed as a quaternion. | |
const ChQuaternion< double > & | GetRot_dt () const |
ChQuaternion< double > & | GetRot_dtdt () |
Return the current rotation acceleration as a quaternion. | |
const ChQuaternion< double > & | GetRot_dtdt () const |
ChVector< double > | GetWvel_loc () const |
Computes the actual angular speed (expressed in local coords) | |
ChVector< double > | GetWvel_par () const |
Computes the actual angular speed (expressed in parent coords) | |
ChVector< double > | GetWacc_loc () const |
Computes the actual angular acceleration (expressed in local coords) | |
ChVector< double > | GetWacc_par () const |
Computes the actual angular acceleration (expressed in parent coords) | |
virtual void | SetCoord_dt (const ChCoordsys< double > &mcoord_dt) |
Set both linear speed and rotation speed as a single ChCoordsys derivative. | |
virtual void | SetPos_dt (const ChVector< double > &mvel) |
Set the linear speed. | |
virtual void | SetRot_dt (const ChQuaternion< double > &mrot_dt) |
Set the rotation speed as a quaternion. More... | |
virtual void | SetWvel_loc (const ChVector< double > &wl) |
Set the rotation speed from given angular speed (expressed in local csys) | |
virtual void | SetWvel_par (const ChVector< double > &wp) |
Set the rotation speed from given angular speed (expressed in parent csys) | |
virtual void | SetCoord_dtdt (const ChCoordsys< double > &mcoord_dtdt) |
Set both linear acceleration and rotation acceleration as a single ChCoordsys derivative. | |
virtual void | SetPos_dtdt (const ChVector< double > &macc) |
Set the linear acceleration. | |
virtual void | SetRot_dtdt (const ChQuaternion< double > &mrot_dtdt) |
Set the rotation acceleration as a quaternion derivative. More... | |
virtual void | SetWacc_loc (const ChVector< double > &al) |
Set the rotation acceleration from given angular acceleration (expressed in local csys) | |
virtual void | SetWacc_par (const ChVector< double > &ap) |
Set the rotation speed from given angular speed (expressed in parent csys) | |
void | Compute_Adt (ChMatrix33< double > &mA_dt) const |
Computes the time derivative of rotation matrix, mAdt. | |
void | Compute_Adtdt (ChMatrix33< double > &mA_dtdt) |
Computes the 2nd time derivative of rotation matrix, mAdtdt. | |
ChMatrix33< double > | GetA_dt () |
Computes and returns an Adt matrix (-note: prefer using Compute_Adt() directly for better performance) | |
ChMatrix33< double > | GetA_dtdt () |
Computes and returns an Adt matrix (-note: prefer using Compute_Adtdt() directly for better performance) | |
void | ConcatenatePreTransformation (const ChFrameMoving< double > &T) |
Apply a transformation (rotation and translation) represented by another ChFrameMoving T. More... | |
void | ConcatenatePostTransformation (const ChFrameMoving< double > &T) |
Apply a transformation (rotation and translation) represented by another ChFrameMoving T in local coordinate. More... | |
ChVector< double > | PointSpeedLocalToParent (const ChVector< double > &localpos) const |
Given the position of a point in local frame coords, and assuming it is sticky to frame, return the speed in parent coords. | |
ChVector< double > | PointSpeedLocalToParent (const ChVector< double > &localpos, const ChVector< double > &localspeed) const |
Given the position localpos of a point in the local reference frame, assuming that the point moves in the local reference frame with localspeed, return the speed in the parent reference frame. | |
ChVector< double > | PointAccelerationLocalToParent (const ChVector< double > &localpos) const |
Given the position of a point in local frame coords, and assuming it is sticky to frame, return the acceleration in parent coords. | |
ChVector< double > | PointAccelerationLocalToParent (const ChVector< double > &localpos, const ChVector< double > &localspeed, const ChVector< double > &localacc) const |
Given the position of a point in local frame coords, and assuming it has a frame-relative speed localspeed and frame-relative acceleration localacc, return the acceleration in parent coords. | |
ChVector< double > | PointSpeedParentToLocal (const ChVector< double > &parentpos, const ChVector< double > &parentspeed) const |
Given the position of a point in parent frame coords, and assuming it has an absolute speed parentspeed, return the speed in local coords. | |
ChVector< double > | PointAccelerationParentToLocal (const ChVector< double > &parentpos, const ChVector< double > &parentspeed, const ChVector< double > &parentacc) const |
Given the position of a point in parent frame coords, and assuming it has an absolute speed parentspeed and absolute acceleration parentacc, return the acceleration in local coords. | |
void | TransformLocalToParent (const ChFrameMoving< double > &local, ChFrameMoving< double > &parent) const |
This function transforms a frame from 'this' local coordinate system to parent frame coordinate system, and also transforms the speed and acceleration of the frame. More... | |
void | TransformParentToLocal (const ChFrameMoving< double > &parent, ChFrameMoving< double > &local) const |
This function transforms a frame from the parent coordinate system to 'this' local frame coordinate system. More... | |
bool | Equals (const ChFrameMoving< double > &other) const |
Returns true if coordsys is identical to other coordsys. | |
bool | Equals (const ChFrameMoving< double > &other, double tol) const |
Returns true if coordsys is equal to other coordsys, within a tolerance 'tol'. | |
virtual void | Invert () override |
The transformation (also for speeds, accelerations) is inverted in place. More... | |
ChFrameMoving< double > | GetInverse () const |
Public Member Functions inherited from chrono::ChFrame< double > | |
ChFrame (const ChVector< double > &mv=ChVector< double >(0, 0, 0), const ChQuaternion< double > &mq=ChQuaternion< double >(1, 0, 0, 0)) | |
Default constructor, or construct from pos and rot (as a quaternion) | |
ChFrame (const ChVector< double > &mv, const ChMatrix33< double > &ma) | |
Construct from pos and rotation (as a 3x3 matrix) | |
ChFrame (const ChCoordsys< double > &mc) | |
Construct from a coordsys. | |
ChFrame (const ChVector< double > &mv, const double alpha, const ChVector< double > &mu) | |
Construct from position mv and rotation of angle alpha around unit vector mu. | |
ChFrame (const ChFrame< double > &other) | |
Copy constructor, build from another frame. | |
ChFrame< double > & | operator= (const ChFrame< double > &other) |
Assignment operator: copy from another frame. | |
virtual bool | operator== (const ChFrame< double > &other) const |
Returns true for identical frames. | |
virtual bool | operator!= (const ChFrame< double > &other) const |
Returns true for different frames. | |
ChFrame< double > | operator>> (const ChFrame< double > &Fb) const |
The '>>' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = old_frame >> tr_frame; For a sequence of transformations, i.e. More... | |
ChFrame< double > | operator* (const ChFrame< double > &Fb) const |
The '>>' operator transforms a vector, so transformations can be represented with this syntax: new_v = old_v >> tr_frame; For a sequence of transformations, i.e. More... | |
ChVector< double > | operator* (const ChVector< double > &V) const |
The '*' operator transforms a vector, so transformations can be represented with this syntax: new_v = tr_frame * old_v; For a sequence of transformations, i.e. More... | |
ChVector< double > | operator/ (const ChVector< double > &V) const |
The '/' is like the '*' operator (see), but uses the inverse transformation for A, in A/b. More... | |
ChFrame< double > & | operator>>= (const ChFrame< double > &T) |
Performs pre-multiplication of this frame by another frame, for example: A>>=T means A'=T*A ; or A'=A >> T. | |
ChFrame< double > & | operator>>= (const ChVector< double > &D) |
Performs pre-multiplication of this frame by a vector D, to 'move' by a displacement D: | |
ChFrame< double > & | operator>>= (const ChQuaternion< double > &R) |
Performs pre-multiplication of this frame by a quaternion R, to 'rotate' it by R: | |
ChFrame< double > & | operator>>= (const ChCoordsys< double > &F) |
Performs pre-multiplication of this frame by a ChCoordsys F, to transform it: | |
ChFrame< double > & | operator%= (const ChFrame< double > &T) |
Performs pre-multiplication of this frame by another frame, for example: A%=T means A'=T*A ; or A'=A >> T Note: DEPRECATED, use >>= instead. | |
ChFrame< double > & | operator*= (const ChFrame< double > &T) |
Performs post-multiplication of this frame by another frame, for example: A*=T means A'=A*T ; or A'=T >> A. | |
ChCoordsys< double > & | GetCoord () |
Return both current rotation and translation as a coordsystem object, with vector and quaternion. | |
const ChCoordsys< double > & | GetCoord () const |
ChVector< double > & | GetPos () |
Return the current translation as a 3d vector. | |
const ChVector< double > & | GetPos () const |
ChQuaternion< double > & | GetRot () |
Return the current rotation as a quaternion. | |
const ChQuaternion< double > & | GetRot () const |
ChMatrix33< double > & | GetA () |
Return the current rotation as a 3x3 matrix. | |
const ChMatrix33< double > & | GetA () const |
ChVector< double > | GetRotAxis () |
Get axis of finite rotation, in parent space. | |
double | GetRotAngle () |
Get angle of rotation about axis of finite rotation. | |
virtual void | SetCoord (const ChCoordsys< double > &mcoord) |
Impose both translation and rotation as a single ChCoordsys. More... | |
virtual void | SetCoord (const ChVector< double > &mv, const ChQuaternion< double > &mq) |
Impose both translation and rotation. More... | |
virtual void | SetRot (const ChQuaternion< double > &mrot) |
Impose the rotation as a quaternion. More... | |
virtual void | SetRot (const ChMatrix33< double > &mA) |
Impose the rotation as a 3x3 matrix. More... | |
virtual void | SetPos (const ChVector< double > &mpos) |
Impose the translation. | |
void | ConcatenatePreTransformation (const ChFrame< double > &T) |
Apply a transformation (rotation and translation) represented by another ChFrame T. More... | |
void | ConcatenatePostTransformation (const ChFrame< double > &T) |
Apply a transformation (rotation and translation) represented by another ChFrame T in local coordinate. More... | |
void | Move (const ChVector< double > &V) |
An easy way to move the frame by the amount specified by vector V, (assuming V expressed in parent coordinates) | |
void | Move (const ChCoordsys< double > &VR) |
Apply both translation and rotation, assuming both expressed in parent coordinates, as a vector for translation and quaternion for rotation,. | |
virtual ChVector< double > | TransformLocalToParent (const ChVector< double > &local) const |
This function transforms a point from the local frame coordinate system to the parent coordinate system. More... | |
virtual void | TransformLocalToParent (const ChFrame< double > &local, ChFrame< double > &parent) const |
This function transforms a frame from 'this' local coordinate system to parent frame coordinate system. More... | |
virtual ChVector< double > | TransformPointLocalToParent (const ChVector< double > &local) const |
virtual ChVector< double > | TransformParentToLocal (const ChVector< double > &parent) const |
This function transforms a point from the parent coordinate system to local frame coordinate system. More... | |
virtual void | TransformParentToLocal (const ChFrame< double > &parent, ChFrame< double > &local) const |
This function transforms a frame from the parent coordinate system to 'this' local frame coordinate system. More... | |
virtual ChVector< double > | TransformPointParentToLocal (const ChVector< double > &parent) const |
virtual ChVector< double > | TransformDirectionParentToLocal (const ChVector< double > &mdirection) const |
This function transforms a direction from 'this' local coordinate system to parent frame coordinate system. More... | |
virtual ChVector< double > | TransformDirectionLocalToParent (const ChVector< double > &mdirection) const |
This function transforms a direction from the parent frame coordinate system to 'this' local coordinate system. More... | |
bool | Equals (const ChFrame< double > &other) const |
Returns true if coordsys is identical to other coordsys. | |
bool | Equals (const ChFrame< double > &other, double tol) const |
Returns true if coordsys is equal to other coordsys, within a tolerance 'tol'. | |
void | Normalize () |
Normalize the rotation, so that quaternion has unit length. | |
virtual void | SetIdentity () |
Sets to no translation and no rotation. | |
ChFrame< double > | GetInverse () const |
Additional Inherited Members | |
Public Attributes inherited from chrono::ChFrameMoving< double > | |
ChCoordsys< double > | coord_dt |
Rotation and position speed, as vector+quaternion. | |
ChCoordsys< double > | coord_dtdt |
Rotation and position acceleration, as vector+quaternion. | |
Public Attributes inherited from chrono::ChFrame< double > | |
ChCoordsys< double > | coord |
Rotation and position, as vector+quaternion. | |
ChMatrix33< double > | Amatrix |
3x3 orthogonal rotation matrix | |
Member Function Documentation
◆ To_abs_forcetorque()
void chrono::ChBodyFrame::To_abs_forcetorque | ( | const ChVector<> & | force, |
const ChVector<> & | appl_point, | ||
bool | local, | ||
ChVector<> & | resultforce, | ||
ChVector<> & | resulttorque | ||
) |
Transform a force applied at a point on the body into a force and moment applied to the COM and expressed in the absolute frame.
If local = true, the provided applied force and point are assumed to be expressed in body coordinates. If local = false, the provided applied force and point is assumed to be expressed in absolute coordinates.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/physics/ChBodyFrame.h
- /builds/uwsbel/chrono/src/chrono/physics/ChBodyFrame.cpp