8 #error This class is not to be included by the user directly. Use FSABAlgorithmd.h or FSABAlgorithmf.h instead.
42 boost::shared_ptr<RC_ARTICULATED_BODY> get_body()
const {
return boost::shared_ptr<RC_ARTICULATED_BODY>(
_body); }
43 void set_body(boost::shared_ptr<RC_ARTICULATED_BODY> body) {
_body = body; }
50 void calc_spatial_inertias(boost::shared_ptr<RC_ARTICULATED_BODY> body);
53 boost::weak_ptr<RC_ARTICULATED_BODY>
_body;
56 std::vector<SACCEL>
_a;
59 std::vector<SPATIAL_AB_INERTIA>
_I;
62 std::vector<SFORCE>
_Z;
65 std::vector<SVELOCITY>
_dv;
68 std::vector<SACCEL>
_c;
71 std::vector<std::vector<SMOMENTUM> >
_Is;
77 std::vector<MATRIXN>
_usIs, _vsIs;
78 std::vector<VECTORN> _ssIs;
84 std::vector<VECTORN>
_mu;
88 boost::shared_ptr<LINALG>
_LA;
91 VECTORN _workv, _workv2, _sTY, _qd_delta, _sIsmu, _Qi, _Q;
93 std::vector<SMOMENTUM> _Y;
98 void calc_fwd_dyn_special();
99 static REAL sgn(REAL x);
100 static void push_children(boost::shared_ptr<RIGIDBODY> link, std::queue<boost::shared_ptr<RIGIDBODY> >& q);
101 void apply_coulomb_joint_friction(boost::shared_ptr<RC_ARTICULATED_BODY> body);
103 void set_spatial_velocities(boost::shared_ptr<RC_ARTICULATED_BODY> body);
104 void calc_spatial_accelerations(boost::shared_ptr<RC_ARTICULATED_BODY> body);
105 void calc_spatial_zero_accelerations(boost::shared_ptr<RC_ARTICULATED_BODY> body);
106 void calc_spatial_coriolis_vectors(boost::shared_ptr<RC_ARTICULATED_BODY> body);
109 MATRIXN& transpose_solve_sIs(
unsigned idx,
const std::vector<SVELOCITY>& m,
MATRIXN& result)
const;
std::vector< MATRIXN > _sIs
Cholesky factorizations sIs.
Definition: FSABAlgorithm.h:74
boost::shared_ptr< LINALG > _LA
Linear algebra object.
Definition: RCArticulatedBody.h:139
void calc_fwd_dyn()
Computes the joint accelerations (forward dynamics) for an articulated body.
Definition: FSABAlgorithm.cpp:1034
A spatial (six dimensional) momentum.
Definition: SMomentum.h:12
void solve_generalized_inertia_noprecalc(SHAREDVECTORN &v)
Solves the equation Mx = b, where M is the generalized inertia matrix.
Definition: FSABAlgorithm.cpp:74
std::vector< std::vector< SMOMENTUM > > _Is
The expressions I*s.
Definition: FSABAlgorithm.h:71
std::vector< SFORCE > _Z
The articulated body spatial zero accelerations.
Definition: FSABAlgorithm.h:62
A generic, possibly non-square matrix.
Definition: MatrixN.h:18
std::vector< SPATIAL_AB_INERTIA > _I
The articulated body inertias.
Definition: FSABAlgorithm.h:59
virtual void apply_impulse(const SMOMENTUM &w, boost::shared_ptr< RIGIDBODY > link)
Abstract method for applying an impulse to this articulated body.
A generic, possibly non-square matrix using shared data.
Definition: SharedMatrixN.h:59
std::vector< SACCEL > _c
The spatial coriolis vectors.
Definition: FSABAlgorithm.h:68
Defines an articulated body for use with reduced-coordinate dynamics algorithms.
Definition: RCArticulatedBody.h:29
A generic N-dimensional floating point vector.
Definition: SharedVectorN.h:15
std::vector< SACCEL > _a
The spatial accelerations.
Definition: FSABAlgorithm.h:56
Implements Featherstone's algorithm for forward dynamics.
Definition: FSABAlgorithm.h:35
A generic N-dimensional floating point vector.
Definition: VectorN.h:16
std::vector< unsigned > _processed
Vector for processing links.
Definition: ArticulatedBody.h:77
std::vector< MATRIXN > _usIs
SVDs of sIs.
Definition: FSABAlgorithm.h:77
std::vector< bool > _rank_deficient
Determines whether the equations for a joint are rank deficient.
Definition: FSABAlgorithm.h:81
std::vector< SVELOCITY > _dv
Vector of link velocity updates.
Definition: FSABAlgorithm.h:65
boost::weak_ptr< RC_ARTICULATED_BODY > _body
The body that this algorithm operates on.
Definition: FSABAlgorithm.h:53
void apply_generalized_impulse(const VECTORN &gj)
Applies a generalized impulse using the algorithm of Drumwright.
Definition: FSABAlgorithm.cpp:376
std::vector< VECTORN > _mu
The temporary expression Q - I*s'*c - s'*Z.
Definition: FSABAlgorithm.h:84
void calc_inverse_generalized_inertia_noprecalc(MATRIXN &iM)
Calculates the inverse generalized inertia matrix.
Definition: FSABAlgorithm.cpp:100