Ravelin
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
Ravelin::RC_ARTICULATED_BODY Class Reference

Defines an articulated body for use with reduced-coordinate dynamics algorithms. More...

#include <RCArticulatedBodyd.h>

Inheritance diagram for Ravelin::RC_ARTICULATED_BODY:
Ravelin::ARTICULATED_BODY Ravelin::ARTICULATED_BODY Ravelin::DYNAMIC_BODY Ravelin::DYNAMIC_BODY Ravelin::DYNAMIC_BODY Ravelin::DYNAMIC_BODY Ravelin::virtual_enable_shared_from_this< DYNAMIC_BODY > Ravelin::virtual_enable_shared_from_this< DYNAMIC_BODY > Ravelin::virtual_enable_shared_from_this< DYNAMIC_BODY > Ravelin::virtual_enable_shared_from_this< DYNAMIC_BODY > Ravelin::virtual_enable_shared_from_this< DYNAMIC_BODY > Ravelin::virtual_enable_shared_from_this< DYNAMIC_BODY > Ravelin::virtual_enable_shared_from_this< DYNAMIC_BODY > Ravelin::virtual_enable_shared_from_this< DYNAMIC_BODY >

Public Types

enum  ForwardDynamicsAlgorithmType { eFeatherstone, eCRB, eFeatherstone, eCRB }
 
enum  ForwardDynamicsAlgorithmType { eFeatherstone, eCRB, eFeatherstone, eCRB }
 
- Public Types inherited from Ravelin::DYNAMIC_BODY
enum  GeneralizedCoordinateType { eEuler, eSpatial, eEuler, eSpatial }
 
enum  GeneralizedCoordinateType { eEuler, eSpatial, eEuler, eSpatial }
 

Public Member Functions

virtual void reset_accumulators ()
 Method for resetting the force and torque accumulators on all links.
 
virtual void update_link_poses ()
 
virtual void update_link_velocities ()
 
virtual void apply_impulse (const SMOMENTUM &w, boost::shared_ptr< RIGIDBODY > link)
 Abstract method for applying an impulse to this articulated body. More...
 
virtual void calc_fwd_dyn ()
 Forces a recalculation of forward dynamics.
 
boost::shared_ptr
< RC_ARTICULATED_BODY
get_this ()
 
boost::shared_ptr< const
RC_ARTICULATED_BODY
get_this () const
 
virtual void set_generalized_forces (const SHAREDVECTORN &gf)
 Sets the generalized forces on the body.
 
virtual void set_generalized_forces (const VECTORN &gf)
 Sets the generalized forces on the body.
 
virtual void add_generalized_force (const SHAREDVECTORN &gf)
 Adds a generalized force to the body.
 
virtual void add_generalized_force (const VECTORN &gf)
 Adds a generalized force to the body.
 
virtual void apply_generalized_impulse (const SHAREDVECTORN &gj)
 Applies a generalized impulse to the body.
 
virtual void apply_generalized_impulse (const VECTORN &gj)
 Applies a generalized impulse to the body.
 
virtual void set_generalized_coordinates_euler (const SHAREDVECTORN &gc)
 Sets the generalized coordinates of this body (using Euler parameters for any rigid body orientations, if relevant)
 
virtual void set_generalized_coordinates_euler (const VECTORN &gc)
 Sets the generalized coordinates of this body (using Euler parameters for any rigid body orientations, if relevant)
 
virtual void set_generalized_velocity (DYNAMIC_BODY::GeneralizedCoordinateType gctype, const SHAREDVECTORN &gv)
 Sets the generalized velocity of this body. More...
 
virtual void set_generalized_velocity (DYNAMIC_BODY::GeneralizedCoordinateType gctype, const VECTORN &gv)
 Sets the generalized velocity of this body.
 
virtual SHAREDMATRIXNget_generalized_inertia (SHAREDMATRIXN &M)
 Gets the generalized inertia of this body.
 
virtual MATRIXNget_generalized_inertia (MATRIXN &M)
 
virtual SHAREDVECTORNget_generalized_forces (SHAREDVECTORN &f)
 Gets the external forces on this body. More...
 
virtual VECTORNget_generalized_forces (VECTORN &f)
 Gets the external forces on this body. More...
 
virtual SHAREDVECTORNconvert_to_generalized_force (boost::shared_ptr< SINGLE_BODY > body, const SFORCE &w, SHAREDVECTORN &gf)
 Converts a force to a generalized force. More...
 
virtual VECTORNconvert_to_generalized_force (boost::shared_ptr< SINGLE_BODY > body, const SFORCE &w, VECTORN &gf)
 Converts a force to a generalized force. More...
 
virtual unsigned num_generalized_coordinates (DYNAMIC_BODY::GeneralizedCoordinateType gctype) const
 Gets the number of generalized coordinates.
 
virtual void set_links_and_joints (const std::vector< boost::shared_ptr< RIGIDBODY > > &links, const std::vector< boost::shared_ptr< JOINT > > &joints)
 
virtual unsigned num_joint_dof_implicit () const
 Gets the number of degrees-of-freedom permitted by implicit constraints.
 
virtual unsigned num_joint_dof_explicit () const
 Gets the number of degrees-of-freedom permitted by explicit constraints.
 
void set_floating_base (bool flag)
 
virtual void set_computation_frame_type (ReferenceFrameType rftype)
 Sets the computation frame type for this body.
 
virtual VECTORNsolve_generalized_inertia (const VECTORN &b, VECTORN &x)
 Solves using the inverse generalized inertia.
 
virtual SHAREDMATRIXNtranspose_solve_generalized_inertia (const SHAREDMATRIXN &B, SHAREDMATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
virtual SHAREDVECTORNsolve_generalized_inertia (const SHAREDVECTORN &v, SHAREDVECTORN &result)
 Solves using the inverse generalized inertia.
 
virtual SHAREDMATRIXNsolve_generalized_inertia (const SHAREDMATRIXN &m, SHAREDMATRIXN &result)
 Solves using the inverse generalized inertia.
 
virtual boost::shared_ptr
< const POSE3
get_gc_pose () const
 Gets the frame for generalized coordinates.
 
virtual void validate_position_variables ()
 Validates position-based variables (potentially dangerous for a user to call)
 
virtual SHAREDVECTORNget_generalized_coordinates_euler (SHAREDVECTORN &gc)
 Gets the generalized coordinates of this body (using Euler parameters for any rigid body orientations, if relevant)
 
virtual VECTORNget_generalized_coordinates_euler (VECTORN &gc)
 Gets the generalized coordinates of this body (using Euler parameters for any rigid body orientations, if relevant)
 
virtual SHAREDVECTORNget_generalized_velocity (DYNAMIC_BODY::GeneralizedCoordinateType gctype, SHAREDVECTORN &gv)
 Gets the generalized velocity of this body.
 
virtual VECTORNget_generalized_velocity (DYNAMIC_BODY::GeneralizedCoordinateType gctype, VECTORN &gv)
 Gets the generalized velocity of this body.
 
virtual SHAREDVECTORNget_generalized_acceleration (SHAREDVECTORN &ga)
 Gets the generalized velocity of this body.
 
void set_generalized_acceleration (const SHAREDVECTORN &a)
 Sets the generalized velocity of this body.
 
virtual VECTORNget_generalized_acceleration (VECTORN &ga)
 Gets the generalized acceleration of this body.
 
template<class V >
void get_generalized_acceleration_generic (V &ga)
 Gets the derivative of the velocity state vector for this articulated body. More...
 
template<class V >
void get_generalized_coordinates_euler_generic (V &gc)
 Gets the generalized coordinates of this body.
 
template<class V >
void set_generalized_coordinates_euler_generic (V &gc)
 Sets the generalized position of this body.
 
template<class V >
void set_generalized_velocity_generic (DYNAMIC_BODY::GeneralizedCoordinateType gctype, V &gv)
 Sets the generalized velocity of this body.
 
template<class V >
void get_generalized_velocity_generic (DYNAMIC_BODY::GeneralizedCoordinateType gctype, V &gv)
 Gets the generalized velocity of this body.
 
virtual bool is_floating_base () const
 Gets whether the base of this body is fixed or "floating".
 
virtual unsigned num_joint_dof () const
 Gets the number of DOF of the explicit joints in the body, not including floating base DOF.
 
virtual boost::shared_ptr
< RIGIDBODY
get_base_link () const
 Gets the base link.
 
virtual const std::vector
< boost::shared_ptr< JOINT > > & 
get_explicit_joints () const
 Gets the vector of explicit joint constraints.
 
virtual const std::vector
< boost::shared_ptr< JOINT > > & 
get_implicit_joints () const
 Gets the vector of explicit joint constraints.
 
virtual void reset_accumulators ()
 Method for resetting the force and torque accumulators on all links.
 
virtual void update_link_poses ()
 
virtual void update_link_velocities ()
 
virtual void apply_impulse (const SMOMENTUM &w, boost::shared_ptr< RIGIDBODY > link)
 Abstract method for applying an impulse to this articulated body. More...
 
virtual void calc_fwd_dyn ()
 Forces a recalculation of forward dynamics.
 
boost::shared_ptr
< RC_ARTICULATED_BODY
get_this ()
 
boost::shared_ptr< const
RC_ARTICULATED_BODY
get_this () const
 
virtual void set_generalized_forces (const SHAREDVECTORN &gf)
 Sets the generalized forces on the body.
 
virtual void set_generalized_forces (const VECTORN &gf)
 Sets the generalized forces on the body.
 
virtual void add_generalized_force (const SHAREDVECTORN &gf)
 Adds a generalized force to the body.
 
virtual void add_generalized_force (const VECTORN &gf)
 Adds a generalized force to the body.
 
virtual void apply_generalized_impulse (const SHAREDVECTORN &gj)
 Applies a generalized impulse to the body.
 
virtual void apply_generalized_impulse (const VECTORN &gj)
 Applies a generalized impulse to the body.
 
virtual void set_generalized_coordinates_euler (const SHAREDVECTORN &gc)
 Sets the generalized coordinates of this body (using Euler parameters for any rigid body orientations, if relevant)
 
virtual void set_generalized_coordinates_euler (const VECTORN &gc)
 Sets the generalized coordinates of this body (using Euler parameters for any rigid body orientations, if relevant)
 
virtual void set_generalized_velocity (DYNAMIC_BODY::GeneralizedCoordinateType gctype, const SHAREDVECTORN &gv)
 Sets the generalized velocity of this body. More...
 
virtual void set_generalized_velocity (DYNAMIC_BODY::GeneralizedCoordinateType gctype, const VECTORN &gv)
 Sets the generalized velocity of this body.
 
virtual SHAREDMATRIXNget_generalized_inertia (SHAREDMATRIXN &M)
 Gets the generalized inertia of this body.
 
virtual MATRIXNget_generalized_inertia (MATRIXN &M)
 
virtual SHAREDVECTORNget_generalized_forces (SHAREDVECTORN &f)
 Gets the external forces on this body. More...
 
virtual VECTORNget_generalized_forces (VECTORN &f)
 Gets the external forces on this body. More...
 
virtual SHAREDVECTORNconvert_to_generalized_force (boost::shared_ptr< SINGLE_BODY > body, const SFORCE &w, SHAREDVECTORN &gf)
 Converts a force to a generalized force. More...
 
virtual VECTORNconvert_to_generalized_force (boost::shared_ptr< SINGLE_BODY > body, const SFORCE &w, VECTORN &gf)
 Converts a force to a generalized force. More...
 
virtual unsigned num_generalized_coordinates (DYNAMIC_BODY::GeneralizedCoordinateType gctype) const
 Gets the number of generalized coordinates.
 
virtual void set_links_and_joints (const std::vector< boost::shared_ptr< RIGIDBODY > > &links, const std::vector< boost::shared_ptr< JOINT > > &joints)
 
virtual unsigned num_joint_dof_implicit () const
 Gets the number of degrees-of-freedom permitted by implicit constraints.
 
virtual unsigned num_joint_dof_explicit () const
 Gets the number of degrees-of-freedom permitted by explicit constraints.
 
void set_floating_base (bool flag)
 
virtual void set_computation_frame_type (ReferenceFrameType rftype)
 Sets the computation frame type for this body.
 
virtual VECTORNsolve_generalized_inertia (const VECTORN &b, VECTORN &x)
 Solves using the inverse generalized inertia.
 
virtual SHAREDMATRIXNtranspose_solve_generalized_inertia (const SHAREDMATRIXN &B, SHAREDMATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
virtual SHAREDVECTORNsolve_generalized_inertia (const SHAREDVECTORN &v, SHAREDVECTORN &result)
 Solves using the inverse generalized inertia.
 
virtual SHAREDMATRIXNsolve_generalized_inertia (const SHAREDMATRIXN &m, SHAREDMATRIXN &result)
 Solves using the inverse generalized inertia.
 
virtual boost::shared_ptr
< const POSE3
get_gc_pose () const
 Gets the frame for generalized coordinates.
 
virtual void validate_position_variables ()
 Validates position-based variables (potentially dangerous for a user to call)
 
virtual SHAREDVECTORNget_generalized_coordinates_euler (SHAREDVECTORN &gc)
 Gets the generalized coordinates of this body (using Euler parameters for any rigid body orientations, if relevant)
 
virtual VECTORNget_generalized_coordinates_euler (VECTORN &gc)
 Gets the generalized coordinates of this body (using Euler parameters for any rigid body orientations, if relevant)
 
virtual SHAREDVECTORNget_generalized_velocity (DYNAMIC_BODY::GeneralizedCoordinateType gctype, SHAREDVECTORN &gv)
 Gets the generalized velocity of this body.
 
virtual VECTORNget_generalized_velocity (DYNAMIC_BODY::GeneralizedCoordinateType gctype, VECTORN &gv)
 Gets the generalized velocity of this body.
 
virtual SHAREDVECTORNget_generalized_acceleration (SHAREDVECTORN &ga)
 Gets the generalized velocity of this body.
 
void set_generalized_acceleration (const SHAREDVECTORN &a)
 Sets the generalized velocity of this body.
 
virtual VECTORNget_generalized_acceleration (VECTORN &ga)
 Gets the generalized acceleration of this body.
 
template<class V >
void get_generalized_acceleration_generic (V &ga)
 
template<class V >
void get_generalized_coordinates_euler_generic (V &gc)
 
template<class V >
void set_generalized_coordinates_euler_generic (V &gc)
 
template<class V >
void set_generalized_velocity_generic (DYNAMIC_BODY::GeneralizedCoordinateType gctype, V &gv)
 
template<class V >
void get_generalized_velocity_generic (DYNAMIC_BODY::GeneralizedCoordinateType gctype, V &gv)
 
virtual bool is_floating_base () const
 Gets whether the base of this body is fixed or "floating".
 
virtual unsigned num_joint_dof () const
 Gets the number of DOF of the explicit joints in the body, not including floating base DOF.
 
virtual boost::shared_ptr
< RIGIDBODY
get_base_link () const
 Gets the base link.
 
virtual const std::vector
< boost::shared_ptr< JOINT > > & 
get_explicit_joints () const
 Gets the vector of explicit joint constraints.
 
virtual const std::vector
< boost::shared_ptr< JOINT > > & 
get_implicit_joints () const
 Gets the vector of explicit joint constraints.
 
- Public Member Functions inherited from Ravelin::ARTICULATED_BODY
unsigned num_constraint_eqns_explicit () const
 
unsigned num_constraint_eqns_implicit () const
 
virtual void rotate (const QUAT &q)
 Rotates the dynamic body by the given orientation.
 
virtual void translate (const ORIGIN3 &o)
 Translates the dynamic body by the given translation.
 
virtual REAL calc_kinetic_energy (boost::shared_ptr< const POSE3 > P=boost::shared_ptr< const POSE3 >())
 Calculates the kinetic energy of the body in an arbitrary frame.
 
boost::shared_ptr< RIGIDBODYfind_link (const std::string &id) const
 
boost::shared_ptr< JOINTfind_joint (const std::string &id) const
 
void get_adjacent_links (std::list< sorted_pair< boost::shared_ptr< RIGIDBODY > > > &links) const
 
void find_loops (std::vector< unsigned > &loop_indices, std::vector< std::vector< unsigned > > &loop_links) const
 
virtual MATRIXNcalc_jacobian (boost::shared_ptr< const POSE3 > source_pose, boost::shared_ptr< const POSE3 > target_pose, boost::shared_ptr< DYNAMIC_BODY > body, MATRIXN &J)
 The Jacobian transforms from the generalized coordinate from to the given frame.
 
virtual MATRIXNcalc_jacobian_dot (boost::shared_ptr< const POSE3 > source_pose, boost::shared_ptr< const POSE3 > target_pose, boost::shared_ptr< DYNAMIC_BODY > body, MATRIXN &J)
 
virtual MATRIXNcalc_jacobian (boost::shared_ptr< const POSE3 > target_pose, boost::shared_ptr< DYNAMIC_BODY > body, MATRIXN &J)
 
virtual MATRIXNcalc_jacobian_dot (boost::shared_ptr< const POSE3 > target_pose, boost::shared_ptr< DYNAMIC_BODY > body, MATRIXN &J)
 
virtual bool is_enabled () const
 Articulated bodies are always enabled.
 
virtual const std::vector
< boost::shared_ptr< RIGIDBODY > > & 
get_links () const
 Gets the set of links.
 
virtual const std::vector
< boost::shared_ptr< JOINT > > & 
get_joints () const
 Gets the set of joints.
 
boost::shared_ptr
< ARTICULATED_BODY
get_this ()
 Gets shared pointer to this object as type ARTICULATED_BODY.
 
boost::shared_ptr< const
ARTICULATED_BODY
get_this () const
 Gets shared pointer to this object as type const ArticulateBody.
 
unsigned num_constraint_eqns_explicit () const
 
unsigned num_constraint_eqns_implicit () const
 
virtual void rotate (const QUAT &q)
 Rotates the dynamic body by the given orientation.
 
virtual void translate (const ORIGIN3 &o)
 Translates the dynamic body by the given translation.
 
virtual REAL calc_kinetic_energy (boost::shared_ptr< const POSE3 > P=boost::shared_ptr< const POSE3 >())
 Calculates the kinetic energy of the body in an arbitrary frame.
 
boost::shared_ptr< RIGIDBODYfind_link (const std::string &id) const
 
boost::shared_ptr< JOINTfind_joint (const std::string &id) const
 
void get_adjacent_links (std::list< sorted_pair< boost::shared_ptr< RIGIDBODY > > > &links) const
 
void find_loops (std::vector< unsigned > &loop_indices, std::vector< std::vector< unsigned > > &loop_links) const
 
virtual MATRIXNcalc_jacobian (boost::shared_ptr< const POSE3 > source_pose, boost::shared_ptr< const POSE3 > target_pose, boost::shared_ptr< DYNAMIC_BODY > body, MATRIXN &J)
 The Jacobian transforms from the generalized coordinate from to the given frame.
 
virtual MATRIXNcalc_jacobian_dot (boost::shared_ptr< const POSE3 > source_pose, boost::shared_ptr< const POSE3 > target_pose, boost::shared_ptr< DYNAMIC_BODY > body, MATRIXN &J)
 
virtual MATRIXNcalc_jacobian (boost::shared_ptr< const POSE3 > target_pose, boost::shared_ptr< DYNAMIC_BODY > body, MATRIXN &J)
 
virtual MATRIXNcalc_jacobian_dot (boost::shared_ptr< const POSE3 > target_pose, boost::shared_ptr< DYNAMIC_BODY > body, MATRIXN &J)
 
virtual bool is_enabled () const
 Articulated bodies are always enabled.
 
virtual const std::vector
< boost::shared_ptr< RIGIDBODY > > & 
get_links () const
 Gets the set of links.
 
virtual const std::vector
< boost::shared_ptr< JOINT > > & 
get_joints () const
 Gets the set of joints.
 
boost::shared_ptr
< ARTICULATED_BODY
get_this ()
 Gets shared pointer to this object as type ARTICULATED_BODY.
 
boost::shared_ptr< const
ARTICULATED_BODY
get_this () const
 Gets shared pointer to this object as type const ArticulateBody.
 
- Public Member Functions inherited from Ravelin::DYNAMIC_BODY
virtual void validate_velocity_variables ()
 Validates velocity-based variables (potentially dangerous for a user to call)
 
ReferenceFrameType get_computation_frame_type () const
 Gets the computation frame type for this body.
 
virtual void set_generalized_acceleration (const VECTORN &ga)
 Sets the generalized acceleration of this body.
 
MATRIXNget_generalized_inertia (MATRIXN &M)
 Gets the generalized inertia of this body.
 
virtual MATRIXNsolve_generalized_inertia (const MATRIXN &B, MATRIXN &X)
 Solves using the inverse generalized inertia.
 
virtual MATRIXNsolve_generalized_inertia (const SHAREDMATRIXN &B, MATRIXN &X)
 Solves using the inverse generalized inertia.
 
virtual SHAREDMATRIXNsolve_generalized_inertia (const MATRIXN &B, SHAREDMATRIXN &X)
 Solves using the inverse generalized inertia.
 
virtual VECTORNsolve_generalized_inertia (const SHAREDVECTORN &b, VECTORN &x)
 Solves using the inverse generalized inertia.
 
virtual SHAREDVECTORNsolve_generalized_inertia (const VECTORN &b, SHAREDVECTORN &x)
 Solves using the inverse generalized inertia.
 
virtual MATRIXNtranspose_solve_generalized_inertia (const MATRIXN &B, MATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
virtual MATRIXNtranspose_solve_generalized_inertia (const SHAREDMATRIXN &B, MATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
virtual SHAREDMATRIXNtranspose_solve_generalized_inertia (const MATRIXN &B, SHAREDMATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
virtual void validate_velocity_variables ()
 Validates velocity-based variables (potentially dangerous for a user to call)
 
ReferenceFrameType get_computation_frame_type () const
 Gets the computation frame type for this body.
 
virtual void set_generalized_acceleration (const VECTORN &ga)
 Sets the generalized acceleration of this body.
 
MATRIXNget_generalized_inertia (MATRIXN &M)
 Gets the generalized inertia of this body.
 
virtual MATRIXNsolve_generalized_inertia (const MATRIXN &B, MATRIXN &X)
 Solves using the inverse generalized inertia.
 
virtual MATRIXNsolve_generalized_inertia (const SHAREDMATRIXN &B, MATRIXN &X)
 Solves using the inverse generalized inertia.
 
virtual SHAREDMATRIXNsolve_generalized_inertia (const MATRIXN &B, SHAREDMATRIXN &X)
 Solves using the inverse generalized inertia.
 
virtual VECTORNsolve_generalized_inertia (const SHAREDVECTORN &b, VECTORN &x)
 Solves using the inverse generalized inertia.
 
virtual SHAREDVECTORNsolve_generalized_inertia (const VECTORN &b, SHAREDVECTORN &x)
 Solves using the inverse generalized inertia.
 
virtual MATRIXNtranspose_solve_generalized_inertia (const MATRIXN &B, MATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
virtual MATRIXNtranspose_solve_generalized_inertia (const SHAREDMATRIXN &B, MATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
virtual SHAREDMATRIXNtranspose_solve_generalized_inertia (const MATRIXN &B, SHAREDMATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
- Public Member Functions inherited from Ravelin::virtual_enable_shared_from_this< DYNAMIC_BODY >
boost::shared_ptr< DYNAMIC_BODYshared_from_this ()
 
boost::shared_ptr< const
DYNAMIC_BODY
shared_from_this () const
 

Public Attributes

ForwardDynamicsAlgorithmType algorithm_type
 The forward dynamics algorithm.
 
- Public Attributes inherited from Ravelin::DYNAMIC_BODY
std::string body_id
 The identifier for this body.
 

Protected Member Functions

virtual void compile ()
 Method for "compiling" the body. More...
 
virtual void compile ()
 Method for "compiling" the body. More...
 

Protected Attributes

bool _floating_base
 Whether this body uses a floating base.
 
unsigned _n_joint_DOF_explicit
 The number of DOF of the explicit joint constraints in the body (does not include floating base DOF!)
 
std::vector< boost::shared_ptr
< JOINT > > 
_ejoints
 The vector of explicit joint constraints.
 
std::vector< boost::shared_ptr
< JOINT > > 
_ijoints
 The vector of implicit joint constraints.
 
bool _position_invalidated
 Indicates when position data has been invalidated.
 
CRB_ALGORITHM _crb
 The CRB algorithm.
 
FSAB_ALGORITHM _fsab
 The FSAB algorithm.
 
boost::shared_ptr< LINALG_LA
 Linear algebra object.
 
- Protected Attributes inherited from Ravelin::ARTICULATED_BODY
std::vector< unsigned > _processed
 Vector for processing links.
 
std::vector< boost::shared_ptr
< RIGIDBODY > > 
_links
 The set of links for this articulated body.
 
std::vector< boost::shared_ptr
< JOINT > > 
_joints
 The set of joints for this articulated body.
 
- Protected Attributes inherited from Ravelin::DYNAMIC_BODY
ReferenceFrameType _rftype
 The computation frame type.
 
VECTORN gc
 Temporaries for use with integration.
 
VECTORN gv
 
VECTORN gcgv
 
VECTORN xp
 
VECTORN xv
 
VECTORN xa
 

Friends

class CRB_ALGORITHM
 
class FSAB_ALGORITHM
 

Detailed Description

Defines an articulated body for use with reduced-coordinate dynamics algorithms.

Reduced-coordinate articulated bodies cannot rely upon the integrator to automatically update the states (i.e., positions, velocities) of the links, as is done with maximal-coordinate articulated bodies. Rather, the integrator updates the joint positions and velocities; the states are obtained from this reduced-coordinate representation. Notes about concurrency:

It is generally desirable to be able to run forward dynamics and inverse dynamics algorithms concurrently to simulate actual robotic systems. In general, derived classes should not operate on state variables (joint positions, velocities, accelerations and floating base positions, velocites, and accelerations) directly during execution of the algorithm. Rather, derived classes should operate on copies of the state variables, updating the state variables on conclusion of the algorithms.

Member Function Documentation

virtual void Ravelin::RC_ARTICULATED_BODY::apply_impulse ( const SMOMENTUM w,
boost::shared_ptr< RIGIDBODY link 
)
virtual

Abstract method for applying an impulse to this articulated body.

Parameters
wthe impulsive force
linklink in the articulated body where the impulse is applied

Implements Ravelin::ARTICULATED_BODY.

virtual void Ravelin::RC_ARTICULATED_BODY::apply_impulse ( const SMOMENTUM w,
boost::shared_ptr< RIGIDBODY link 
)
virtual

Abstract method for applying an impulse to this articulated body.

Parameters
wthe impulsive force
linklink in the articulated body where the impulse is applied

Implements Ravelin::ARTICULATED_BODY.

virtual void Ravelin::RC_ARTICULATED_BODY::compile ( )
protectedvirtual

Method for "compiling" the body.

Compilation is necessary anytime the structure or topolgy of the body changes. Generally, this will only be necessary once - after a call to set_links() or set_joints().

Reimplemented from Ravelin::ARTICULATED_BODY.

virtual void Ravelin::RC_ARTICULATED_BODY::compile ( )
protectedvirtual

Method for "compiling" the body.

Compilation is necessary anytime the structure or topolgy of the body changes. Generally, this will only be necessary once - after a call to set_links() or set_joints().

Reimplemented from Ravelin::ARTICULATED_BODY.

virtual SHAREDVECTORN& Ravelin::RC_ARTICULATED_BODY::convert_to_generalized_force ( boost::shared_ptr< SINGLE_BODY body,
const SFORCE w,
SHAREDVECTORN gf 
)
virtual

Converts a force to a generalized force.

Parameters
bodythe actual rigid body to which the force/torque is applied (at the center-of-mass)
wthe force
gfthe generalized force, on return
Note
uses the current generalized coordinates

Implements Ravelin::DYNAMIC_BODY.

virtual SHAREDVECTORN& Ravelin::RC_ARTICULATED_BODY::convert_to_generalized_force ( boost::shared_ptr< SINGLE_BODY body,
const SFORCE w,
SHAREDVECTORN gf 
)
virtual

Converts a force to a generalized force.

Parameters
bodythe actual rigid body to which the force/torque is applied (at the center-of-mass)
wthe force
gfthe generalized force, on return
Note
uses the current generalized coordinates

Implements Ravelin::DYNAMIC_BODY.

virtual VECTORN& Ravelin::RC_ARTICULATED_BODY::convert_to_generalized_force ( boost::shared_ptr< SINGLE_BODY body,
const SFORCE w,
VECTORN gf 
)
inlinevirtual

Converts a force to a generalized force.

Parameters
bodythe actual rigid body to which the force/torque is applied (at the center-of-mass)
wthe force
gfthe generalized force, on return
Note
uses the current generalized coordinates

Reimplemented from Ravelin::DYNAMIC_BODY.

virtual VECTORN& Ravelin::RC_ARTICULATED_BODY::convert_to_generalized_force ( boost::shared_ptr< SINGLE_BODY body,
const SFORCE w,
VECTORN gf 
)
inlinevirtual

Converts a force to a generalized force.

Parameters
bodythe actual rigid body to which the force/torque is applied (at the center-of-mass)
wthe force
gfthe generalized force, on return
Note
uses the current generalized coordinates

Reimplemented from Ravelin::DYNAMIC_BODY.

template<class V >
void RC_ARTICULATED_BODY::get_generalized_acceleration_generic ( V &  ga)

Gets the derivative of the velocity state vector for this articulated body.

The state vector consists of the joint-space velocities of the robot as well as the base momentum; therefore, the derivative of the state vector is composed of the joint-space accelerations and base forces (and torques).

virtual SHAREDVECTORN& Ravelin::RC_ARTICULATED_BODY::get_generalized_forces ( SHAREDVECTORN f)
virtual

Gets the external forces on this body.

Note
uses the current generalized coordinates

Implements Ravelin::DYNAMIC_BODY.

virtual SHAREDVECTORN& Ravelin::RC_ARTICULATED_BODY::get_generalized_forces ( SHAREDVECTORN f)
virtual

Gets the external forces on this body.

Note
uses the current generalized coordinates

Implements Ravelin::DYNAMIC_BODY.

virtual VECTORN& Ravelin::RC_ARTICULATED_BODY::get_generalized_forces ( VECTORN f)
inlinevirtual

Gets the external forces on this body.

Note
uses the current generalized coordinates

Reimplemented from Ravelin::DYNAMIC_BODY.

virtual VECTORN& Ravelin::RC_ARTICULATED_BODY::get_generalized_forces ( VECTORN f)
inlinevirtual

Gets the external forces on this body.

Note
uses the current generalized coordinates

Reimplemented from Ravelin::DYNAMIC_BODY.

virtual void Ravelin::RC_ARTICULATED_BODY::set_generalized_velocity ( DYNAMIC_BODY::GeneralizedCoordinateType  gctype,
const SHAREDVECTORN gv 
)
virtual

Sets the generalized velocity of this body.

Parameters
gvthe generalized velocity
Note
uses the current generalized coordinates

Implements Ravelin::DYNAMIC_BODY.

virtual void Ravelin::RC_ARTICULATED_BODY::set_generalized_velocity ( DYNAMIC_BODY::GeneralizedCoordinateType  gctype,
const SHAREDVECTORN gv 
)
virtual

Sets the generalized velocity of this body.

Parameters
gvthe generalized velocity
Note
uses the current generalized coordinates

Implements Ravelin::DYNAMIC_BODY.


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