Physsim::FSABAlgorithm Class Reference

Class for an articulated body using Featherstone's algorithm for forward dynamics. More...

#include <FSABAlgorithm.h>

Inheritance diagram for Physsim::FSABAlgorithm:

Physsim::RCArticulatedBodyFwdDynAlgo Physsim::Base List of all members.

Public Member Functions

virtual void load_state (BasePtr object, bimap< BasePtr, BasePtr > *correspondence)
 Implements Base::load_state().
virtual void save_state (BasePtr object, bimap< BasePtr, BasePtr > *correspondence) const
 Implements Base::save_state().
virtual void clone (BasePtr &cloned, bimap< BasePtr, BasePtr > *obj_map=NULL) const
 Implements Base::clone().
virtual void calc_fwd_dyn (RCArticulatedBodyPtr body, ReferenceFrameType rftype)
 Computes the joint accelerations (forward dynamics) for a manipulator.
virtual void apply_impulse (RCArticulatedBodyPtr body, const Vector3 &j, const Vector3 &k, const Vector3 &contact_point, RigidBodyPtr link)
 Implements RCArticulatedBodyFwdDynAlgo::apply_impulse().
virtual void load_from_xml (XMLTreeConstPtr node, std::map< std::string, BasePtr > &id_map)
 Implements Base::load_from_xml().
virtual void save_to_xml (XMLTreePtr node, std::list< BaseConstPtr > &shared_objects) const
 Implements Base::save_to_xml().

Public Attributes

ReferenceFrameType _rftype
 The reference frame all quantities are computed in.
std::vector< SVector6_v
 The spatial velocities.
std::vector< SVector6_a
 The spatial accelerations.
std::vector< SMatrix6_Iiso
 The spatial isolated inertias.
std::vector< SMatrix6_I
 The articulated body inertias.
std::vector< SVector6_Z
 The articulated body spatial zero accelerations.
std::vector< SVector6_c
 The spatial coriolis vectors.
std::vector< SMatrixN_Is
 The expression I*s.
std::vector< MatrixNN_sIs
 The temporary quantity sIs.
std::vector< VectorN_mu
 The temporary expression Q - I*s'*c - s'*Z.

Detailed Description

Class for an articulated body using Featherstone's algorithm for forward dynamics.

Implements Featherstone's algorithm for articulated bodies. Featherstone's algorithm runs in O(n) time [n = # of joints]. This implementation is based on Brian Mirtich's Ph. D. thesis, and remains pretty consistent with it. There are a couple of changes, to produce a nice implementation. The user need not be concerned with these issues, but they are useful to know for debugging.

  1. Mirtich labels his links from 1..n, and considers the base to be link 0; the total number of links is considered to be n, rather than n+1. I make the total number of links n+1 and treat the links the same as the base. I do this so that the user thinks of the base as a link for purposes of link connectivity.
  2. Mirtich labels his joints from 0..n-1. When labeling the link in Mirtich's style, link i and joint i match up (joint i is link i's inner joint). When labeling the link in my style, joint i-1 is the corresponding joint for link i.
Note that one critical note for manipulator setup is that the base is the first link in the list of links.


Member Function Documentation

void FSABAlgorithm::calc_fwd_dyn ( RCArticulatedBodyPtr  body,
ReferenceFrameType  rftype 
) [virtual]

Computes the joint accelerations (forward dynamics) for a manipulator.

Featherstone Algorithm taken from Mirtich's thesis (p. 113). Note that Mirtich's numbering is a little funny; I decrement his joint indices by one, while leaving his link indices intact.

Implements Physsim::RCArticulatedBodyFwdDynAlgo.

void FSABAlgorithm::apply_impulse ( RCArticulatedBodyPtr  body,
const Vector3 j,
const Vector3 k,
const Vector3 contact_point,
RigidBodyPtr  link 
) [virtual]

Implements RCArticulatedBodyFwdDynAlgo::apply_impulse().

Precondition:
forward dynamics have been computed already by calc_fwd_dyn()

Implements Physsim::RCArticulatedBodyFwdDynAlgo.


The documentation for this class was generated from the following files:
Generated on Wed Oct 24 14:54:22 2007 for Physsim by  doxygen 1.5.1