chrono::ChFunctionRotation Class Referenceabstract

Description

Interface base class for scalar->quaternion functions of the type:

q= f(s)

where q is a unit quaternion (i.e. a rotation in 3D) and s is a scalar (ex. time) Classes inherited from ChFunctionRotation are often used to set time-dependent rotation, for example to set the imposed alignment of a rigid body in space. Inherited classes must override at least the Get_q() method, in order to represent more complex functions.

#include <ChFunctionRotation.h>

Inheritance diagram for chrono::ChFunctionRotation:

Public Member Functions

 ChFunctionRotation (const ChFunctionRotation &other)
 
virtual ChFunctionRotationClone () const =0
 "Virtual" copy constructor.
 
virtual ChQuaternion Get_q (double s) const =0
 Return the rotation as a quaternion, function of s, as q=f(s).
 
virtual ChVector Get_w_loc (double s) const
 Return the derivative of the rotation function, at s, expressed as angular velocity w in local frame. More...
 
virtual ChVector Get_a_loc (double s) const
 Return the derivative of the rotation function, at s, expressed as angular acceleration in local frame. More...
 
virtual void Estimate_s_domain (double &smin, double &smax) const
 Return an estimate of the domain of the function argument. More...
 
virtual void Update (const double t)
 Update could be implemented by children classes, ex. to launch callbacks.
 
virtual void ArchiveOUT (ChArchiveOut &marchive)
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive)
 Method to allow de-serialization of transient data from archives.
 

Member Function Documentation

◆ Estimate_s_domain()

virtual void chrono::ChFunctionRotation::Estimate_s_domain ( double &  smin,
double &  smax 
) const
inlinevirtual

Return an estimate of the domain of the function argument.

(ex. can be used for automatic zooming in a GUI, or for computing the bounding box)

◆ Get_a_loc()

ChVector chrono::ChFunctionRotation::Get_a_loc ( double  s) const
virtual

Return the derivative of the rotation function, at s, expressed as angular acceleration in local frame.

Note that inherited classes may also avoid overriding this method, because this base method already provide a general-purpose numerical differentiation to get angular acceleration only from the Get_q() function. (however, if the analytical derivative is known, it may be better to implement a custom method).

Reimplemented in chrono::ChFunctionRotation_setpoint, and chrono::ChFunctionRotation_axis.

◆ Get_w_loc()

ChVector chrono::ChFunctionRotation::Get_w_loc ( double  s) const
virtual

Return the derivative of the rotation function, at s, expressed as angular velocity w in local frame.

Note that inherited classes may also avoid overriding this method, because this base method already provide a general-purpose numerical differentiation to get w only from the Get_p() function. (however, if the analytical derivative is known, it may better to implement a custom method).

Reimplemented in chrono::ChFunctionRotation_setpoint, and chrono::ChFunctionRotation_axis.


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