RobWorkProject
Classes | Public Member Functions | Protected Member Functions | List of all members
RWPEIntegrator Class Referenceabstract

Interface for different motion integrators for rigid bodies. More...

#include <RWPEIntegrator.hpp>

Inherited by RWPEIntegratorEuler, and RWPEIntegratorHeun.

Classes

class  Factory
 A factory for a RWPEIntegrator. This factory also defines an extension point for RWPEIntegrator. More...
 

Public Member Functions

 RWPEIntegrator ()
 Default constructor for empty integrator.
 
virtual ~RWPEIntegrator ()
 Destructor.
 
const RWPEBodyDynamicgetBody () const
 Get the body that this integrator is associated to. More...
 
virtual const RWPEIntegratormakeIntegrator (const RWPEBodyDynamic *body) const =0
 Create a new integrator for the given body. More...
 
virtual RWPEBodyDynamic::RigidConfigurationgetConfiguration (const rw::kinematics::State &state) const
 Reset the integrator to a given position and velocity. More...
 
virtual void integrate (const std::list< const RWPEConstraint *> &constraints, const rw::math::Vector3D<> &gravity, double stepsize, RWPEBodyDynamic::RigidConfiguration &configuration, RWPEIslandState &state, const rw::kinematics::State &rwstate) const
 Integrate the motion with the given constraints. More...
 
virtual void positionUpdate (const std::list< const RWPEConstraint *> &constraints, const rw::math::Vector3D<> &gravity, double stepsize, RWPEBodyDynamic::RigidConfiguration &configuration, RWPEIslandState &state, const rw::kinematics::State &rwstate) const
 Integrate the position with the given constraints. More...
 
virtual void velocityUpdate (const std::list< const RWPEConstraint *> &constraints, const rw::math::Vector3D<> &gravity, double stepsize, const RWPEBodyDynamic::RigidConfiguration &configuration0, RWPEBodyDynamic::RigidConfiguration &configurationH, const RWPEIslandState &state0, const RWPEIslandState &stateH, const rw::kinematics::State &rwstate, class RWPELogUtil &log) const
 Integrate the velocity with the given constraints. More...
 
virtual void integrate (const rw::math::Wrench6D<> &netFT, double stepsize, RWPEBodyDynamic::RigidConfiguration &configuration) const =0
 Integrate the motion with the given net force and torque acting on the object. More...
 
virtual void positionUpdate (const rw::math::Wrench6D<> &netFT, double stepsize, RWPEBodyDynamic::RigidConfiguration &configuration) const =0
 Integrate the position and orientation with the given net force and torque acting on the object. More...
 
virtual void velocityUpdate (const rw::math::Wrench6D<> &netFTcur, const rw::math::Wrench6D<> &netFTnext, double stepsize, const RWPEBodyDynamic::RigidConfiguration &configuration0, RWPEBodyDynamic::RigidConfiguration &configurationH, class RWPELogUtil &log) const =0
 Integrate the velocity with the given net force and torque acting on the object. More...
 
virtual Eigen::Matrix< double, 6, 1 > eqPointVelIndependent (const rw::math::Vector3D<> point, double stepsize, const RWPEBodyDynamic::RigidConfiguration &configuration0, const RWPEBodyDynamic::RigidConfiguration &configurationH, const rw::math::Vector3D<> &Ftot0, const rw::math::Vector3D<> &Ntot0, const rw::math::Vector3D<> &FextH, const rw::math::Vector3D<> &NextH) const =0
 Get the socalled independent motion of the point, which is not related to a constraint wrench. More...
 
virtual Eigen::Matrix< double, 6, 6 > eqPointVelConstraintWrenchFactor (const rw::math::Vector3D<> point, double stepsize, const rw::math::Vector3D<> constraintPos, const RWPEBodyDynamic::RigidConfiguration &configuration, const RWPEBodyDynamic::RigidConfiguration &configurationGuess) const =0
 Get the dependent motion of the point, which is dependent on the applied constraint wrench. More...
 
virtual bool eqIsApproximation () const =0
 Check if the linear model is an approximation. More...
 
virtual const RWPEIntegratorgetDiscontinuityIntegrator () const =0
 Get integrator used in first step after a discontinuity. More...
 

Protected Member Functions

 RWPEIntegrator (const RWPEBodyDynamic *body)
 Create a integrator associated to a given body. More...
 

Detailed Description

Interface for different motion integrators for rigid bodies.

The integrators are responsible for doing the actual integration, but also for providing a linear model relating the applied forces and torques to the motion of a point on the object.

Constructor & Destructor Documentation

◆ RWPEIntegrator()

RWPEIntegrator ( const RWPEBodyDynamic body)
protected

Create a integrator associated to a given body.

Parameters
body[in] the body to associate to.

Member Function Documentation

◆ eqIsApproximation()

virtual bool eqIsApproximation ( ) const
pure virtual

Check if the linear model is an approximation.

If the model is an approximation to a non-linear model, the simulator should know this and solve iteratively.

Returns
true is approximation, false otherwise

Implemented in RWPEIntegratorEuler, and RWPEIntegratorHeun.

◆ eqPointVelConstraintWrenchFactor()

virtual Eigen::Matrix<double, 6, 6> eqPointVelConstraintWrenchFactor ( const rw::math::Vector3D<>  point,
double  stepsize,
const rw::math::Vector3D<>  constraintPos,
const RWPEBodyDynamic::RigidConfiguration configuration,
const RWPEBodyDynamic::RigidConfiguration configurationGuess 
) const
pure virtual

Get the dependent motion of the point, which is dependent on the applied constraint wrench.

Parameters
point[in] get the contribution for the constraint in this point.
stepsize[in] the size of the step to solve for.
constraintPos[in] get the contribution of this other constraint to the main constraint.
configuration[in] the current configuration.
configurationGuess[in] for iterative linearization.
Returns
a matrix block of size 6 times 6.

Implemented in RWPEIntegratorEuler, and RWPEIntegratorHeun.

◆ eqPointVelIndependent()

virtual Eigen::Matrix<double, 6, 1> eqPointVelIndependent ( const rw::math::Vector3D<>  point,
double  stepsize,
const RWPEBodyDynamic::RigidConfiguration configuration0,
const RWPEBodyDynamic::RigidConfiguration configurationH,
const rw::math::Vector3D<> &  Ftot0,
const rw::math::Vector3D<> &  Ntot0,
const rw::math::Vector3D<> &  FextH,
const rw::math::Vector3D<> &  NextH 
) const
pure virtual

Get the socalled independent motion of the point, which is not related to a constraint wrench.

Parameters
point[in] the point to find contribution for.
stepsize[in] the size of the step to solve for.
configuration0[in] the initial configuration.
configurationH[in] the configuration to find constraint forces for.
Ftot0[in] initial net force not related to the constraints or gravity.
Ntot0[in] initial net torque not related to the constraints.
FextH[in] external force not related to the constraints or gravity.
NextH[in] external torque not related to the constraints.
Returns
a vector of size 6.

Implemented in RWPEIntegratorEuler, and RWPEIntegratorHeun.

◆ getBody()

const RWPEBodyDynamic* getBody ( ) const

Get the body that this integrator is associated to.

Returns
a pointer to the rigid body.

◆ getConfiguration()

virtual RWPEBodyDynamic::RigidConfiguration* getConfiguration ( const rw::kinematics::State state) const
virtual

Reset the integrator to a given position and velocity.

Parameters
state[in] the state to reset the integrator to.

◆ getDiscontinuityIntegrator()

virtual const RWPEIntegrator* getDiscontinuityIntegrator ( ) const
pure virtual

Get integrator used in first step after a discontinuity.

Higher order integrators will typically need a first order method in the first step after a continuity.

Returns
a pointer to a integrator (owned by this integrator).

Implemented in RWPEIntegratorEuler, and RWPEIntegratorHeun.

◆ integrate() [1/2]

virtual void integrate ( const std::list< const RWPEConstraint *> &  constraints,
const rw::math::Vector3D<> &  gravity,
double  stepsize,
RWPEBodyDynamic::RigidConfiguration configuration,
RWPEIslandState state,
const rw::kinematics::State rwstate 
) const
virtual

Integrate the motion with the given constraints.

Parameters
constraints[in] a list of the constraints acting on the body.
gravity[in] the gravity in world coordinates.
stepsize[in] the size of the step to integrate.
configuration[in/out] the configuration to update.
state[in/out] the state with the current constraint forces, position and velocities.
rwstate[in] the current state.

◆ integrate() [2/2]

virtual void integrate ( const rw::math::Wrench6D<> &  netFT,
double  stepsize,
RWPEBodyDynamic::RigidConfiguration configuration 
) const
pure virtual

Integrate the motion with the given net force and torque acting on the object.

Parameters
netFT[in] the net force and torque acting in the center of mass of the body, given in world frame.
stepsize[in] the time to integrate.
configuration[in/out] the configuration to update.

Implemented in RWPEIntegratorEuler, and RWPEIntegratorHeun.

◆ makeIntegrator()

virtual const RWPEIntegrator* makeIntegrator ( const RWPEBodyDynamic body) const
pure virtual

Create a new integrator for the given body.

Parameters
body[in] the body to create the integrator for.
Returns
a pointer to a new RWPEIntegrator - the pointer is owned by the caller.

Implemented in RWPEIntegratorEuler, and RWPEIntegratorHeun.

◆ positionUpdate() [1/2]

virtual void positionUpdate ( const std::list< const RWPEConstraint *> &  constraints,
const rw::math::Vector3D<> &  gravity,
double  stepsize,
RWPEBodyDynamic::RigidConfiguration configuration,
RWPEIslandState state,
const rw::kinematics::State rwstate 
) const
virtual

Integrate the position with the given constraints.

The integrator must calculate the new positions explicitly from the initial position and velocity.

This function is allowed to update the velocity. This velocity will then be considered an estimate which will be taken into consideration. The net force given to the velocity update function will be calculated based on this estimate.

Parameters
constraints[in] a list of the constraints acting on the body.
gravity[in] the gravity in world coordinates.
stepsize[in] the size of the step to integrate.
configuration[in/out] the configuration to update.
state[in/out] the state with the current constraint forces, position and velocities.
rwstate[in] the current state.

◆ positionUpdate() [2/2]

virtual void positionUpdate ( const rw::math::Wrench6D<> &  netFT,
double  stepsize,
RWPEBodyDynamic::RigidConfiguration configuration 
) const
pure virtual

Integrate the position and orientation with the given net force and torque acting on the object.

Parameters
netFT[in] the net force and torque acting in the center of mass of the body, given in world frame.
stepsize[in] the time to integrate.
configuration[in/out] the configuration to update.

Implemented in RWPEIntegratorEuler, and RWPEIntegratorHeun.

◆ velocityUpdate() [1/2]

virtual void velocityUpdate ( const std::list< const RWPEConstraint *> &  constraints,
const rw::math::Vector3D<> &  gravity,
double  stepsize,
const RWPEBodyDynamic::RigidConfiguration configuration0,
RWPEBodyDynamic::RigidConfiguration configurationH,
const RWPEIslandState state0,
const RWPEIslandState stateH,
const rw::kinematics::State rwstate,
class RWPELogUtil log 
) const
virtual

Integrate the velocity with the given constraints.

Parameters
constraints[in] a list of the constraints acting on the body.
gravity[in] the gravity in world coordinates.
stepsize[in] the size of the step to integrate.
configuration0[in] the initial configuration.
configurationH[in/out] the configuration to update.
state0[in] the state with the initial constraint forces, position and velocities.
stateH[in] the state with the new constraint forces, position and velocities.
rwstate[in] the state with forces applied directly to the bodies by the user.
log[in] log utility.

◆ velocityUpdate() [2/2]

virtual void velocityUpdate ( const rw::math::Wrench6D<> &  netFTcur,
const rw::math::Wrench6D<> &  netFTnext,
double  stepsize,
const RWPEBodyDynamic::RigidConfiguration configuration0,
RWPEBodyDynamic::RigidConfiguration configurationH,
class RWPELogUtil log 
) const
pure virtual

Integrate the velocity with the given net force and torque acting on the object.

Parameters
netFTcur[in] the net force and torque acting in the center of mass of the body, given in world frame.
netFTnext[in] the net force and torque acting in the center of mass of the body after taking step of size stepsize.
stepsize[in] the time to integrate.
configuration0[in] the initial configuration.
configurationH[in/out] the configuration to update.
log[in] log utility.

Implemented in RWPEIntegratorEuler, and RWPEIntegratorHeun.


The documentation for this class was generated from the following file: