chrono::ChBodyAuxRef Class Reference

Description

Class for rigid bodies with an auxiliary reference frame.

Unlike ChBody, where the COG frame is used as the reference frame, the auxiliary reference frame of a ChBodyAuxRef can be different from its COG frame. This specialization is provided for situations where it is more convenient to specify collision shapes, visualization assets, and marker positions with respect to a reference frame other than the COG frame. Note that, because of the auxiliary reference, this type of rigid bodies can be slightly less efficient than the base ChBody object.

Additional information can be found in the Rigid Bodies manual page.

#include <ChBodyAuxRef.h>

Inheritance diagram for chrono::ChBodyAuxRef:
Collaboration diagram for chrono::ChBodyAuxRef:

Public Member Functions

 ChBodyAuxRef (const ChBodyAuxRef &other)
 
virtual ChBodyAuxRefClone () const override
 "Virtual" copy constructor (covariant return type).
 
void SetFrame_REF_to_abs (const ChFrame<> &mfra)
 Set the auxiliary reference frame with respect to the absolute frame. More...
 
virtual const ChFrameMovingGetFrame_REF_to_abs () const override
 Get the auxiliary reference frame with respect to the absolute frame. More...
 
void SetFrame_COG_to_REF (const ChFrame<> &mloc)
 Set the COG frame with respect to the auxiliary reference frame. More...
 
ChFrame GetFrame_COG_to_REF () const
 Get the COG frame with respect to the auxiliary reference frame.
 
void SetFrame_REF_to_COG (const ChFrame<> &mloc)
 Set the auxiliary reference frame with respect to the COG frame. More...
 
const ChFrameGetFrame_REF_to_COG () const
 Get the auxiliary reference frame with respect to the COG frame.
 
virtual void Update (bool update_assets=true) override
 Update all auxiliary data of the rigid body and of its children (markers, forces..)
 
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. More...
 
- Public Member Functions inherited from chrono::ChBody
 ChBody (const ChBody &other)
 
void SetBodyFixed (bool state)
 Sets the 'fixed' state of the body. More...
 
bool GetBodyFixed () const
 Return true if this body is fixed to ground.
 
void SetCollide (bool state)
 Enable/disable the collision for this rigid body.
 
virtual bool GetCollide () const override
 Return true if collision is enabled for this body.
 
void SetLimitSpeed (bool state)
 Enable the maximum linear speed limit (beyond this limit it will be clamped). More...
 
bool GetLimitSpeed () const
 Return true if maximum linear speed is limited.
 
void SetNoGyroTorque (bool state)
 Deactivate the gyroscopic torque (quadratic term). More...
 
bool GetNoGyroTorque () const
 Return true if gyroscopic torque is deactivated.
 
void SetUseSleeping (bool state)
 Enable/disable option for setting bodies to "sleep". More...
 
bool GetUseSleeping () const
 Return true if 'sleep' mode is activated.
 
void SetSleeping (bool state)
 Force the body in sleeping mode or not. More...
 
bool GetSleeping () const
 Return true if this body is currently in 'sleep' mode.
 
bool TrySleeping ()
 Test if a body could go in sleeping state if requirements are satisfied. More...
 
virtual bool IsActive () const override
 Return true if the body is currently active and thereofre included into the system solver. More...
 
void SetId (int id)
 Set body id for indexing (internal use only).
 
unsigned int GetId ()
 Set body id for indexing (internal use only).
 
void SetGid (unsigned int id)
 Set global body index (internal use only).
 
unsigned int GetGid () const
 Get the global body index (internal use only).
 
virtual int GetDOF () override
 Number of coordinates of body: 7 because uses quaternions for rotation.
 
virtual int GetDOF_w () override
 Number of coordinates of body: 6 because derivatives use angular velocity.
 
virtual ChVariablesVariables () override
 Return a reference to the encapsulated ChVariablesBody, representing states (pos, speed, or accel.) and forces. More...
 
void SetNoSpeedNoAcceleration () override
 Set no speed and no accelerations (but does not change the position).
 
virtual void AddCollisionModelsToSystem (ChCollisionSystem *coll_sys) const override
 Add the body collision model (if any) to the provided collision system.
 
virtual void RemoveCollisionModelsFromSystem (ChCollisionSystem *coll_sys) const override
 Remove the body collision model (if any) from the provided collision system.
 
virtual void SyncCollisionModels () override
 Synchronize the position and bounding box of the body collision model (if any).
 
virtual const ChFrameMovingGetFrame_COG_to_abs () const
 Get the rigid body coordinate system that represents the GOG (Center of Gravity). More...
 
virtual ChFrame GetVisualModelFrame (unsigned int nclone=0) override
 Get the reference frame (expressed in and relative to the absolute frame) of the visual model. More...
 
virtual geometry::ChAABB GetTotalAABB () override
 Get the axis-aligned bounding (AABB) box of the object. More...
 
virtual void StreamInstate (ChStreamInBinary &mstream) override
 Method to deserialize only the state (position, speed).
 
virtual void StreamOutstate (ChStreamOutBinary &mstream) override
 Method to serialize only the state (position, speed).
 
void AddMarker (std::shared_ptr< ChMarker > amarker)
 Attach a marker to this body.
 
void AddForce (std::shared_ptr< ChForce > aforce)
 Attach a force to this body.
 
void RemoveMarker (std::shared_ptr< ChMarker > amarker)
 Remove a specific marker from this body. More...
 
void RemoveForce (std::shared_ptr< ChForce > aforce)
 Remove a specific force from this body. More...
 
void RemoveAllForces ()
 Remove all markers at once. More...
 
void RemoveAllMarkers ()
 Remove all markers at once. More...
 
std::shared_ptr< ChMarkerSearchMarker (const std::string &name) const
 Find a marker by its name.
 
std::shared_ptr< ChMarkerSearchMarker (int id) const
 Find a marker by its identifier.
 
std::shared_ptr< ChForceSearchForce (const std::string &name) const
 Find a force by its name.
 
const std::vector< std::shared_ptr< ChMarker > > & GetMarkerList () const
 Gets the list of children markers. More...
 
const std::vector< std::shared_ptr< ChForce > > & GetForceList () const
 Gets the list of children forces. More...
 
ChVector Point_World2Body (const ChVector<> &mpoint)
 
ChVector Point_Body2World (const ChVector<> &mpoint)
 
ChVector Dir_World2Body (const ChVector<> &dir)
 
ChVector Dir_Body2World (const ChVector<> &dir)
 
ChVector RelPoint_AbsSpeed (const ChVector<> &mrelpoint)
 
ChVector RelPoint_AbsAcc (const ChVector<> &mrelpoint)
 
void SetMass (double newmass)
 Set the body mass. More...
 
double GetMass ()
 Get the body mass.
 
void SetInertia (const ChMatrix33<> &newXInertia)
 Set the inertia tensor of the body. More...
 
const ChMatrix33GetInertia () const
 Get the inertia tensor, expressed in the local coordinate system. More...
 
const ChMatrix33GetInvInertia () const
 Get the inverse of the inertia matrix.
 
void SetInertiaXX (const ChVector<> &iner)
 Set the diagonal part of the inertia tensor (Ixx, Iyy, Izz values). More...
 
ChVector GetInertiaXX () const
 Get the diagonal part of the inertia tensor (Ixx, Iyy, Izz values). More...
 
void SetInertiaXY (const ChVector<> &iner)
 Set the off-diagonal part of the inertia tensor (Ixy, Ixz, Iyz values). More...
 
ChVector GetInertiaXY () const
 Get the extra-diagonal part of the inertia tensor (Ixy, Ixz, Iyz values). More...
 
void SetMaxSpeed (float m_max_speed)
 Set the maximum linear speed (beyond this limit it will be clamped). More...
 
float GetMaxSpeed () const
 
void SetMaxWvel (float m_max_wvel)
 Set the maximum angular speed (beyond this limit it will be clamped). More...
 
float GetMaxWvel () const
 
void ClampSpeed ()
 Clamp the body speed to the provided limits. More...
 
void SetSleepTime (float m_t)
 Set the amount of time which must pass before going automatically in sleep mode when the body has very small movements.
 
float GetSleepTime () const
 
void SetSleepMinSpeed (float m_t)
 Set the max linear speed to be kept for 'sleep_time' before freezing.
 
float GetSleepMinSpeed () const
 
void SetSleepMinWvel (float m_t)
 Set the max linear speed to be kept for 'sleep_time' before freezing.
 
float GetSleepMinWvel () const
 
void ComputeQInertia (ChMatrix44<> &mQInertia)
 Computes the 4x4 inertia tensor in quaternion space, if needed.
 
void ComputeGyro ()
 Computes the gyroscopic torque. More...
 
void Accumulate_force (const ChVector<> &force, const ChVector<> &appl_point, bool local)
 Add an applied force to the body's accumulator (as an increment). More...
 
void Accumulate_torque (const ChVector<> &torque, bool local)
 Add an applied torque to the body's accumulator (as an increment). More...
 
void Empty_forces_accumulators ()
 Clear the force and torque accumulators.
 
const ChVectorGet_accumulated_force () const
 Return the current value of the accumulator force. More...
 
const ChVectorGet_accumulated_torque () const
 Return the current value of the accumulator torque. More...
 
void UpdateMarkers (double mytime)
 Update all children markers of the rigid body, at current body state.
 
void UpdateForces (double mytime)
 Update all children forces of the rigid body, at current body state.
 
void UpdateTime (double mytime)
 Update local time of rigid body, and time-dependent data.
 
virtual void Update (double mytime, bool update_assets=true) override
 Update all auxiliary data of the rigid body and of its children (markers, forces..), at given time.
 
ChVector GetAppliedForce ()
 Return the resultant applied force on the body. More...
 
ChVector GetAppliedTorque ()
 Return the resultant applied torque on the body. More...
 
ChVector GetContactForce ()
 Get the resultant contact force acting on this body.
 
ChVector GetContactTorque ()
 Get the resultant contact torque acting on this body.
 
virtual ChPhysicsItemGetPhysicsItem () override
 This is only for backward compatibility.
 
virtual void LoadableGetVariables (std::vector< ChVariables * > &mvars) override
 Get the pointers to the contained ChVariables, appending to the mvars vector.
 
virtual void LoadableStateIncrement (const unsigned int off_x, ChState &x_new, const ChState &x, const unsigned int off_v, const ChStateDelta &Dv) override
 Increment all DOFs using a delta.
 
virtual void LoadableGetStateBlock_x (int block_offset, ChState &mD) override
 Gets all the DOFs packed in a single vector (position part)
 
virtual void LoadableGetStateBlock_w (int block_offset, ChStateDelta &mD) override
 Gets all the DOFs packed in a single vector (speed part)
 
virtual void ComputeNF (const double U, const double V, const double W, ChVectorDynamic<> &Qi, double &detJ, const ChVectorDynamic<> &F, ChVectorDynamic<> *state_x, ChVectorDynamic<> *state_w) override
 Evaluate Q=N'*F, for Q generalized lagrangian load, where N is some type of matrix evaluated at point P(U,V,W) assumed in absolute coordinates, and F is a load assumed in absolute coordinates. More...
 
- Public Member Functions inherited from chrono::ChPhysicsItem
 ChPhysicsItem (const ChPhysicsItem &other)
 
ChSystemGetSystem () const
 Get the pointer to the parent ChSystem().
 
virtual void SetSystem (ChSystem *m_system)
 Set the pointer to the parent ChSystem(). More...
 
void AddVisualModel (std::shared_ptr< ChVisualModel > model)
 Add an (optional) visualization model. More...
 
std::shared_ptr< ChVisualModelGetVisualModel () const
 Access the visualization model (if any). More...
 
void AddVisualShape (std::shared_ptr< ChVisualShape > shape, const ChFrame<> &frame=ChFrame<>())
 Add the specified visual shape to the visualization model. More...
 
std::shared_ptr< ChVisualShapeGetVisualShape (unsigned int i) const
 Access the specified visualization shape in the visualization model (if any). More...
 
void AddVisualShapeFEA (std::shared_ptr< ChVisualShapeFEA > shapeFEA)
 Add the specified FEA visualization object to the visualization model. More...
 
std::shared_ptr< ChVisualShapeFEAGetVisualShapeFEA (unsigned int i) const
 Access the specified FEA visualization object in the visualization model (if any). More...
 
virtual unsigned int GetNumVisualModelClones () const
 Return the number of clones of the visual model associated with this physics item. More...
 
void AddCamera (std::shared_ptr< ChCamera > camera)
 Attach a ChCamera to this physical item. More...
 
std::vector< std::shared_ptr< ChCamera > > GetCameras () const
 Get the set of cameras attached to this physics item.
 
virtual void GetCenter (ChVector<> &mcenter)
 Get a symbolic 'center' of the object. More...
 
virtual void Setup ()
 This might recompute the number of coordinates, DOFs, constraints, in case this might change (ex in ChAssembly), as well as state offsets of contained items (ex in ChMesh)
 
virtual int GetDOC ()
 Get the number of scalar constraints, if any, in this item.
 
virtual int GetDOC_c ()
 Get the number of scalar constraints, if any, in this item (only bilateral constr.) Children classes might override this.
 
virtual int GetDOC_d ()
 Get the number of scalar constraints, if any, in this item (only unilateral constr.) Children classes might override this.
 
unsigned int GetOffset_x ()
 Get offset in the state vector (position part)
 
unsigned int GetOffset_w ()
 Get offset in the state vector (speed part)
 
unsigned int GetOffset_L ()
 Get offset in the lagrangian multipliers.
 
void SetOffset_x (const unsigned int moff)
 Set offset in the state vector (position part) Note: only the ChSystem::Setup function should use this.
 
void SetOffset_w (const unsigned int moff)
 Set offset in the state vector (speed part) Note: only the ChSystem::Setup function should use this.
 
void SetOffset_L (const unsigned int moff)
 Set offset in the lagrangian multipliers Note: only the ChSystem::Setup function should use this.
 
virtual void IntStateGatherReactions (const unsigned int off_L, ChVectorDynamic<> &L)
 From item's reaction forces to global reaction vector. More...
 
virtual void IntStateScatterReactions (const unsigned int off_L, const ChVectorDynamic<> &L)
 From global reaction vector to item's reaction forces. More...
 
virtual void IntLoadResidual_CqL (const unsigned int off_L, ChVectorDynamic<> &R, const ChVectorDynamic<> &L, const double c)
 Takes the term Cq'*L, scale and adds to R at given offset: R += c*Cq'*L. More...
 
virtual void IntLoadConstraint_C (const unsigned int off, ChVectorDynamic<> &Qc, const double c, bool do_clamp, double recovery_clamp)
 Takes the term C, scale and adds to Qc at given offset: Qc += c*C. More...
 
virtual void IntLoadConstraint_Ct (const unsigned int off, ChVectorDynamic<> &Qc, const double c)
 Takes the term Ct, scale and adds to Qc at given offset: Qc += c*Ct. More...
 
virtual void InjectConstraints (ChSystemDescriptor &mdescriptor)
 Tell to a system descriptor that there are constraints of type ChConstraint in this object (for further passing it to a solver) Basically does nothing, but maybe that inherited classes may specialize this.
 
virtual void ConstraintsBiReset ()
 Sets to zero the known term (b_i) of encapsulated ChConstraints.
 
virtual void ConstraintsBiLoad_C (double factor=1, double recovery_clamp=0.1, bool do_clamp=false)
 Adds the current C (constraint violation) to the known term (b_i) of encapsulated ChConstraints.
 
virtual void ConstraintsBiLoad_Ct (double factor=1)
 Adds the current Ct (partial t-derivative, as in C_dt=0-> [Cq]*q_dt=-Ct) to the known term (b_i) of encapsulated ChConstraints.
 
virtual void ConstraintsBiLoad_Qc (double factor=1)
 Adds the current Qc (the vector of C_dtdt=0 -> [Cq]*q_dtdt=Qc ) to the known term (b_i) of encapsulated ChConstraints.
 
virtual void ConstraintsFbLoadForces (double factor=1)
 Adds the current link-forces, if any, (caused by springs, etc.) to the 'fb' vectors of the ChVariables referenced by encapsulated ChConstraints.
 
virtual void ConstraintsLoadJacobians ()
 Adds the current jacobians in encapsulated ChConstraints.
 
virtual void ConstraintsFetch_react (double factor=1)
 Fetches the reactions from the lagrangian multiplier (l_i) of encapsulated ChConstraints. More...
 
virtual void InjectKRMmatrices (ChSystemDescriptor &mdescriptor)
 Tell to a system descriptor that there are items of type ChKblock in this object (for further passing it to a solver) Basically does nothing, but maybe that inherited classes may specialize this.
 
virtual void KRMmatricesLoad (double Kfactor, double Rfactor, double Mfactor)
 Adds the current stiffness K and damping R and mass M matrices in encapsulated ChKblock item(s), if any. More...
 
- Public Member Functions inherited from chrono::ChObj
 ChObj (const ChObj &other)
 
int GetIdentifier () const
 Gets the numerical identifier of the object.
 
void SetIdentifier (int id)
 Sets the numerical identifier of the object.
 
double GetChTime () const
 Gets the simulation time of this object.
 
void SetChTime (double m_time)
 Sets the simulation time of this object.
 
const char * GetName () const
 Gets the name of the object as C Ascii null-terminated string -for reading only!
 
void SetName (const char myname[])
 Sets the name of this object, as ascii string.
 
std::string GetNameString () const
 Gets the name of the object as C Ascii null-terminated string.
 
void SetNameString (const std::string &myname)
 Sets the name of this object, as std::string.
 
void MFlagsSetAllOFF (int &mflag)
 
void MFlagsSetAllON (int &mflag)
 
void MFlagSetON (int &mflag, int mask)
 
void MFlagSetOFF (int &mflag, int mask)
 
int MFlagGet (int &mflag, int mask)
 
virtual std::string & ArchiveContainerName ()
 
- Public Member Functions inherited from chrono::ChBodyFrame
 ChBodyFrame (const ChBodyFrame &other)
 
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...
 
- 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) Note: even when the local angular acceleration is zero, you are still encouraged to call this method bacause q_dtdt might be nonzero due to nonzero q_dt in case of rotational motion.
 
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. More...
 
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.
 
bool operator== (const ChFrame< double > &other) const
 Returns true for identical frames.
 
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.
 
void SetCoord (const ChCoordsys< double > &mcoord)
 Impose both translation and rotation as a single ChCoordsys. More...
 
void SetCoord (const ChVector< double > &mv, const ChQuaternion< double > &mq)
 Impose both translation and rotation. More...
 
void SetRot (const ChQuaternion< double > &mrot)
 Impose the rotation as a quaternion. More...
 
void SetRot (const ChMatrix33< double > &mA)
 Impose the rotation as a 3x3 matrix. More...
 
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,.
 
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...
 
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...
 
ChVector< double > TransformPointLocalToParent (const ChVector< double > &local) const
 
ChVector< double > TransformParentToLocal (const ChVector< double > &parent) const
 This function transforms a point from the parent coordinate system to local frame coordinate system. More...
 
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...
 
ChVector< double > TransformPointParentToLocal (const ChVector< double > &parent) const
 
ChVector< double > TransformDirectionParentToLocal (const ChVector< double > &mdirection) const
 This function transforms a direction from 'this' local coordinate system to parent frame coordinate system. More...
 
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
 
- Public Member Functions inherited from chrono::ChLoadableUVW
virtual bool IsTetrahedronIntegrationNeeded ()
 If true, use quadrature over u,v,w in [0..1] range as tetrahedron volumetric coords (with z=1-u-v-w) otherwise use default quadrature over u,v,w in [-1..+1] as box isoparametric coords.
 
virtual bool IsTrianglePrismIntegrationNeeded ()
 If true, use quadrature over u,v in [0..1] range as triangle natural coords (with z=1-u-v), and use linear quadrature over w in [-1..+1], otherwise use default quadrature over u,v,w in [-1..+1] as box isoparametric coords.
 

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
 
- Protected Attributes inherited from chrono::ChBody
unsigned int body_id
 body-specific identifier, used for indexing (internal use only)
 
unsigned int body_gid
 body-specific identifier, used for global indexing (internal use only)
 
std::vector< std::shared_ptr< ChMarker > > marklist
 list of markers
 
std::vector< std::shared_ptr< ChForce > > forcelist
 list of forces
 
ChVector gyro
 gyroscopic torque, i.e. Qm = Wvel x (XInertia*Wvel)
 
ChVector Xforce
 force acting on body, applied to COM (in absolute coords)
 
ChVector Xtorque
 torque acting on body (in body local coords)
 
ChVector Force_acc
 force accumulator, applied to COM (in absolute coords)
 
ChVector Torque_acc
 torque accumulator (in body local coords)
 
ChVariablesBodyOwnMass variables
 interface to solver (store inertia and coordinates)
 
float max_speed
 limit on linear speed
 
float max_wvel
 limit on angular velocity
 
float sleep_time
 
float sleep_minspeed
 
float sleep_minwvel
 
float sleep_starttime
 
- Protected Attributes inherited from chrono::ChPhysicsItem
ChSystemsystem
 parent system
 
std::shared_ptr< ChVisualModelInstancevis_model_instance
 instantiated visualization model
 
std::vector< std::shared_ptr< ChCamera > > cameras
 set of cameras
 
unsigned int offset_x
 offset in vector of state (position part)
 
unsigned int offset_w
 offset in vector of state (speed part)
 
unsigned int offset_L
 offset in vector of lagrangian multipliers
 
- Protected Attributes inherited from chrono::ChObj
double ChTime
 the time of simulation for the object
 

Member Function Documentation

◆ ArchiveIn()

void chrono::ChBodyAuxRef::ArchiveIn ( ChArchiveIn marchive)
overridevirtual

Method to allow deserialization of transient data from archives.

Method to allow de serialization of transient data from archives.

Reimplemented from chrono::ChBody.

◆ GetFrame_REF_to_abs()

virtual const ChFrameMoving& chrono::ChBodyAuxRef::GetFrame_REF_to_abs ( ) const
inlineoverridevirtual

Get the auxiliary reference frame with respect to the absolute frame.

Note that, in general, this is different from GetFrame_COG_to_abs().

Reimplemented from chrono::ChBody.

◆ SetFrame_COG_to_REF()

void chrono::ChBodyAuxRef::SetFrame_COG_to_REF ( const ChFrame<> &  mloc)

Set the COG frame with respect to the auxiliary reference frame.

Note that this also moves the body absolute COG (the REF is fixed). The position of contained ChMarker objects, if any, is not changed with respect to the reference.

◆ SetFrame_REF_to_abs()

void chrono::ChBodyAuxRef::SetFrame_REF_to_abs ( const ChFrame<> &  mfra)

Set the auxiliary reference frame with respect to the absolute frame.

This moves the entire body; the body COG is rigidly moved as well.

◆ SetFrame_REF_to_COG()

void chrono::ChBodyAuxRef::SetFrame_REF_to_COG ( const ChFrame<> &  mloc)
inline

Set the auxiliary reference frame with respect to the COG frame.

Note that this does not move the body absolute COG (the COG is fixed).


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/physics/ChBodyAuxRef.h
  • /builds/uwsbel/chrono/src/chrono/physics/ChBodyAuxRef.cpp