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

Represents a single rigid body. More...

#include <RigidBodyd.h>

Inheritance diagram for Ravelin::RIGIDBODY:
Ravelin::SINGLE_BODY Ravelin::SINGLE_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  Compliance { eRigid, eCompliant, eRigid, eCompliant }
 
enum  Compliance { eRigid, eCompliant, eRigid, eCompliant }
 
- Public Types inherited from Ravelin::DYNAMIC_BODY
enum  GeneralizedCoordinateType { eEuler, eSpatial, eEuler, eSpatial }
 
enum  GeneralizedCoordinateType { eEuler, eSpatial, eEuler, eSpatial }
 

Public Member Functions

void add_force (const SFORCE &w)
 
void set_pose (const POSE3 &pose)
 
void apply_impulse (const SMOMENTUM &w)
 Applies an impulse at a point on the body.
 
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 void calc_fwd_dyn ()
 Forces a recalculation of forward dynamics.
 
const SPATIAL_RB_INERTIAget_inertia ()
 
void set_inertia (const SPATIAL_RB_INERTIA &J)
 
bool is_child_link (boost::shared_ptr< const RIGIDBODY > query) const
 
bool is_descendant_link (boost::shared_ptr< const RIGIDBODY > query) const
 
const SVELOCITYget_velocity ()
 Gets the velocity of the body.
 
void set_velocity (const SVELOCITY &xd)
 
void set_accel (const SACCEL &xdd)
 
virtual const SACCELget_accel ()
 Gets the acceleration of the body.
 
void set_velocity (const SACCEL &xdd)
 
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 SHAREDMATRIXNget_generalized_inertia (SHAREDMATRIXN &M)
 Gets the generalized inertia of this body.
 
virtual MATRIXNget_generalized_inertia (MATRIXN &M)
 
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.
 
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 &gf)
 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_acceleration (const SHAREDVECTORN &ga)
 Sets the generalized velocity of this body.
 
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 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 SHAREDMATRIXNtranspose_solve_generalized_inertia (const SHAREDMATRIXN &B, SHAREDMATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
SHAREDMATRIXNtranspose_solve_generalized_inertia_single (const SHAREDMATRIXN &B, SHAREDMATRIXN &X)
 
virtual SHAREDMATRIXNsolve_generalized_inertia (const SHAREDMATRIXN &B, SHAREDMATRIXN &X)
 Solves using the inverse generalized inertia.
 
virtual SHAREDVECTORNsolve_generalized_inertia (const SHAREDVECTORN &b, SHAREDVECTORN &x)
 Solves using the inverse generalized inertia.
 
boost::shared_ptr< RIGIDBODYget_parent_link () const
 
boost::shared_ptr< JOINTget_inner_joint_explicit () const
 
void add_inner_joint (boost::shared_ptr< JOINT > j)
 
void add_outer_joint (boost::shared_ptr< JOINT > j)
 
void remove_inner_joint (boost::shared_ptr< JOINT > joint)
 
void remove_outer_joint (boost::shared_ptr< JOINT > joint)
 
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.
 
virtual VECTOR3 calc_point_vel (const VECTOR3 &p) const
 Calculates the velocity at a point on the body in the body frame
 
bool is_base () const
 
bool is_ground () const
 
virtual boost::shared_ptr
< const POSE3
get_computation_frame () const
 Gets the computation frame for the body.
 
virtual void set_computation_frame_type (ReferenceFrameType rftype)
 Sets the computation frame type for this body.
 
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)
 
const SFORCEsum_forces ()
 
void reset_accumulators ()
 Resets the force and torque accumulators on the dynamic body.
 
SFORCE calc_euler_torques ()
 
void set_enabled (bool flag)
 
void invalidate_pose_vectors ()
 
template<class OutputIterator >
OutputIterator get_parent_links (OutputIterator begin) const
 
template<class OutputIterator >
OutputIterator get_child_links (OutputIterator begin) const
 
boost::shared_ptr< RIGIDBODYget_this ()
 Gets the shared pointer for this
 
boost::shared_ptr< const
RIGIDBODY
get_this () const
 Gets the shared const pointer for this
 
boost::shared_ptr< const POSE3get_pose () const
 Gets the current pose of this body.
 
boost::shared_ptr< const POSE3get_gc_pose () const
 Gets the frame for generalized coordinates.
 
boost::shared_ptr< const POSE3get_mixed_pose () const
 
REAL calc_mass () const
 Synonym for get_mass() (implements SingleBody::calc_mass())
 
virtual REAL get_mass () const
 Gets the mass of this body.
 
virtual bool is_enabled () const
 Gets whether this body is enabled.
 
boost::shared_ptr
< ARTICULATED_BODY
get_articulated_body () const
 Gets the articulated body corresponding to this body. More...
 
virtual void set_articulated_body (boost::shared_ptr< ARTICULATED_BODY > body)
 Sets the articulated body corresponding to this body. More...
 
unsigned num_child_links () const
 Gets the number of child links of this link.
 
bool is_end_effector () const
 Gets whether this body is an end-effector (i.e., the number of child links is zero) in an articulated body.
 
void clear_inner_joints ()
 Removes all inner joints from this link.
 
void clear_outer_joints ()
 Removes all outer joints from this link.
 
unsigned get_index () const
 Gets the link index (returns std::numeric_limits<unsigned>::max() if not set)
 
void set_index (unsigned index)
 Sets the link index. More...
 
const std::set
< boost::shared_ptr< JOINT > > & 
get_inner_joints () const
 Gets the set of inner joints for this link.
 
const std::set
< boost::shared_ptr< JOINT > > & 
get_outer_joints () const
 Gets the list of outer joints for this link.
 
void add_force (const SFORCE &w)
 
void set_pose (const POSE3 &pose)
 
void apply_impulse (const SMOMENTUM &w)
 Applies an impulse at a point on the body.
 
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 void calc_fwd_dyn ()
 Forces a recalculation of forward dynamics.
 
const SPATIAL_RB_INERTIAget_inertia ()
 
void set_inertia (const SPATIAL_RB_INERTIA &J)
 
bool is_child_link (boost::shared_ptr< const RIGIDBODY > query) const
 
bool is_descendant_link (boost::shared_ptr< const RIGIDBODY > query) const
 
const SVELOCITYget_velocity ()
 Gets the velocity of the body.
 
void set_velocity (const SVELOCITY &xd)
 
void set_accel (const SACCEL &xdd)
 
virtual const SACCELget_accel ()
 Gets the acceleration of the body.
 
void set_velocity (const SACCEL &xdd)
 
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 SHAREDMATRIXNget_generalized_inertia (SHAREDMATRIXN &M)
 Gets the generalized inertia of this body.
 
virtual MATRIXNget_generalized_inertia (MATRIXN &M)
 
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.
 
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 &gf)
 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_acceleration (const SHAREDVECTORN &ga)
 Sets the generalized velocity of this body.
 
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 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 SHAREDMATRIXNtranspose_solve_generalized_inertia (const SHAREDMATRIXN &B, SHAREDMATRIXN &X)
 Solves the transpose matrix using the inverse generalized inertia.
 
SHAREDMATRIXNtranspose_solve_generalized_inertia_single (const SHAREDMATRIXN &B, SHAREDMATRIXN &X)
 
virtual SHAREDMATRIXNsolve_generalized_inertia (const SHAREDMATRIXN &B, SHAREDMATRIXN &X)
 Solves using the inverse generalized inertia.
 
virtual SHAREDVECTORNsolve_generalized_inertia (const SHAREDVECTORN &b, SHAREDVECTORN &x)
 Solves using the inverse generalized inertia.
 
boost::shared_ptr< RIGIDBODYget_parent_link () const
 
boost::shared_ptr< JOINTget_inner_joint_explicit () const
 
void add_inner_joint (boost::shared_ptr< JOINT > j)
 
void add_outer_joint (boost::shared_ptr< JOINT > j)
 
void remove_inner_joint (boost::shared_ptr< JOINT > joint)
 
void remove_outer_joint (boost::shared_ptr< JOINT > joint)
 
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.
 
virtual VECTOR3 calc_point_vel (const VECTOR3 &p) const
 Calculates the velocity at a point on the body in the body frame
 
bool is_base () const
 
bool is_ground () const
 
virtual boost::shared_ptr
< const POSE3
get_computation_frame () const
 Gets the computation frame for the body.
 
virtual void set_computation_frame_type (ReferenceFrameType rftype)
 Sets the computation frame type for this body.
 
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)
 
const SFORCEsum_forces ()
 
void reset_accumulators ()
 Resets the force and torque accumulators on the dynamic body.
 
SFORCE calc_euler_torques ()
 
void set_enabled (bool flag)
 
void invalidate_pose_vectors ()
 
template<class OutputIterator >
OutputIterator get_parent_links (OutputIterator begin) const
 
template<class OutputIterator >
OutputIterator get_child_links (OutputIterator begin) const
 
boost::shared_ptr< RIGIDBODYget_this ()
 Gets the shared pointer for this
 
boost::shared_ptr< const
RIGIDBODY
get_this () const
 Gets the shared const pointer for this
 
boost::shared_ptr< const POSE3get_pose () const
 Gets the current pose of this body.
 
boost::shared_ptr< const POSE3get_gc_pose () const
 Gets the frame for generalized coordinates.
 
boost::shared_ptr< const POSE3get_mixed_pose () const
 
REAL calc_mass () const
 Synonym for get_mass() (implements SingleBody::calc_mass())
 
virtual REAL get_mass () const
 Gets the mass of this body.
 
virtual bool is_enabled () const
 Gets whether this body is enabled.
 
boost::shared_ptr
< ARTICULATED_BODY
get_articulated_body () const
 Gets the articulated body corresponding to this body. More...
 
virtual void set_articulated_body (boost::shared_ptr< ARTICULATED_BODY > body)
 Sets the articulated body corresponding to this body. More...
 
unsigned num_child_links () const
 Gets the number of child links of this link.
 
bool is_end_effector () const
 Gets whether this body is an end-effector (i.e., the number of child links is zero) in an articulated body.
 
void clear_inner_joints ()
 Removes all inner joints from this link.
 
void clear_outer_joints ()
 Removes all outer joints from this link.
 
unsigned get_index () const
 Gets the link index (returns std::numeric_limits<unsigned>::max() if not set)
 
void set_index (unsigned index)
 Sets the link index. More...
 
const std::set
< boost::shared_ptr< JOINT > > & 
get_inner_joints () const
 Gets the set of inner joints for this link.
 
const std::set
< boost::shared_ptr< JOINT > > & 
get_outer_joints () const
 Gets the list of outer joints for this link.
 
- Public Member Functions inherited from Ravelin::SINGLE_BODY
virtual boost::shared_ptr
< DYNAMIC_BODY
get_super_body () const
 
REAL calc_point_vel (const VECTOR3 &point, const VECTOR3 &dir)
 Calculates the velocity at a point on the body in a given direction.
 
virtual boost::shared_ptr
< DYNAMIC_BODY
get_super_body () const
 
REAL calc_point_vel (const VECTOR3 &point, const VECTOR3 &dir)
 Calculates the velocity at a point on the body in a given direction.
 
- Public Member Functions inherited from Ravelin::DYNAMIC_BODY
virtual void validate_position_variables ()
 Validates position-based variables (potentially dangerous for a user to call)
 
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.
 
virtual VECTORNget_generalized_acceleration (VECTORN &ga)
 Gets 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 VECTORN &b, VECTORN &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_position_variables ()
 Validates position-based variables (potentially dangerous for a user to call)
 
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.
 
virtual VECTORNget_generalized_acceleration (VECTORN &ga)
 Gets 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 VECTORN &b, VECTORN &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

Compliance compliance
 Compliance value, determines event type.
 
- Public Attributes inherited from Ravelin::DYNAMIC_BODY
std::string body_id
 The identifier for this body.
 

Protected Member Functions

void update_mixed_pose ()
 
void update_mixed_pose ()
 

Protected Attributes

bool _xddj_valid
 Indicates whether inner joint frame acceleration is valid (up-to-date)
 
SPATIAL_RB_INERTIA _Jj
 Spatial rigid body inertia matrix (inner joint frame)
 
SVELOCITY _xdj
 Velocity (inner joint frame)
 
SFORCE _forcej
 Cumulative force on the body (inner joint frame)
 
SACCEL _xddj
 Acceleration (inner joint frame)
 
boost::shared_ptr< POSE3_F
 reference pose for this body
 
boost::shared_ptr< POSE3_F2
 secondary pose for this body
 
boost::weak_ptr< ARTICULATED_BODY_abody
 Pointer to articulated body (if this body is a link)
 
std::set< boost::shared_ptr
< JOINT > > 
_inner_joints
 Inner joints and associated data.
 
std::set< boost::shared_ptr
< JOINT > > 
_outer_joints
 Outer joints and associated data.
 
- 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 ARTICULATED_BODY
 
class RC_ARTICULATED_BODY
 
class MCARTICULATED_BODY
 
class JOINT
 

Detailed Description

Represents a single rigid body.

Contains information needed to represent a rigid body, including position and velocity (both linear and angular), mass, center of mass, inertia matrix, collision data, and visualization data. This class is used for both non-articulated and articulated rigid bodies, though not all member data may be used in the latter.

Todo:
implement rest matrix

Contains information needed to represent a rigid body, including position and velocity (both linear and angular), mass, center of mass, inertia matrix, collision data, and visualization data. This class is used for both non-articulated and articulated rigid bodies, though not all member data may be used in the latter.

Todo:
implement rest matrix

Member Function Documentation

virtual SHAREDVECTORN& Ravelin::RIGIDBODY::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::RIGIDBODY::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::RIGIDBODY::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::RIGIDBODY::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.

boost::shared_ptr<ARTICULATED_BODY> Ravelin::RIGIDBODY::get_articulated_body ( ) const
inlinevirtual

Gets the articulated body corresponding to this body.

Returns
a pointer to the articulated body, or NULL if this body is not a link an articulated body

Implements Ravelin::SINGLE_BODY.

boost::shared_ptr<ARTICULATED_BODY> Ravelin::RIGIDBODY::get_articulated_body ( ) const
inlinevirtual

Gets the articulated body corresponding to this body.

Returns
a pointer to the articulated body, or NULL if this body is not a link an articulated body

Implements Ravelin::SINGLE_BODY.

virtual SHAREDVECTORN& Ravelin::RIGIDBODY::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::RIGIDBODY::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::RIGIDBODY::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::RIGIDBODY::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::RIGIDBODY::set_articulated_body ( boost::shared_ptr< ARTICULATED_BODY body)
inlinevirtual

Sets the articulated body corresponding to this body.

Parameters
bodya pointer to the articulated body or NULL if this body is not a link in an articulated body
virtual void Ravelin::RIGIDBODY::set_articulated_body ( boost::shared_ptr< ARTICULATED_BODY body)
inlinevirtual

Sets the articulated body corresponding to this body.

Parameters
bodya pointer to the articulated body or NULL if this body is not a link in an articulated body
virtual void Ravelin::RIGIDBODY::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::RIGIDBODY::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.

void Ravelin::RIGIDBODY::set_index ( unsigned  index)
inline

Sets the link index.

This is set automatically by the articulated body. Users should not change this index or unknown behavior will result.

void Ravelin::RIGIDBODY::set_index ( unsigned  index)
inline

Sets the link index.

This is set automatically by the articulated body. Users should not change this index or unknown behavior will result.


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