26 #ifndef _taoArticulatedBodyLink_h
27 #define _taoArticulatedBodyLink_h
29 #include "taoABJoint.h"
30 #include <tao/matrix/TaoDeMath.h>
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
47 virtual void setFlag(deInt v) = 0;
48 virtual const deInt getFlag()
const = 0;
70 virtual void abInertiaInit(
deMatrix6& Ia) {}
81 virtual void setInertia(
const deFloat* mass,
const deVector3* centerOfMass,
const deMatrix3* inertiaTensor) {}
102 virtual void updateLocalX(
const deFrame& homeFrame,
const deFrame& localFrame) {}
104 virtual void getFrameLocal(
deFrame& localFrame) {}
106 virtual void abImpulse(
deVector6& Yah, deInt propagate) {}
113 virtual void globalJacobian(
const deFrame& globalFrame) {}
116 virtual void plusEq_Jg_ddQ(
deVector6& Ag) {}
119 virtual void add2Tau_JgT_F(
const deVector6& Fg) {}
147 virtual deFloat potentialEnergy(
const deVector3& gh,
const deFrame& globalFrame,
const deFloat mass,
const deVector3& centerOfMass) = 0;
160 virtual void velocityDelta(
deVector6& dV,
const deVector6& dVh,
const deInt dist) = 0;
162 virtual void force(
deVector6& Fh, deInt propagate) {}
166 virtual void abBiasForceConfig(
deVector6& Pah, deInt propagate) {}
173 virtual void setABJoint(
taoABJoint* joint, deInt i = 0) {}
175 virtual taoABJoint* getABJoint(deInt i = 0) = 0;
177 virtual void setNOJ(deInt n) {}
179 virtual const deInt getNOJ()
const = 0;
191 virtual const deInt getFlag()
const {
return 0; }
192 virtual void setFlag(deInt v) {}
195 virtual const deMatrix6* I()
const {
return NULL; }
202 virtual deFloat potentialEnergy(
const deVector3& gh,
const deFrame& globalFrame,
const deFloat mass,
const deVector3& centerOfMass) {
return 0; }
206 virtual taoABJoint* getABJoint(deInt i = 0) {
return NULL; }
208 virtual const deInt getNOJ()
const {
return 0; }
220 virtual const deInt getFlag()
const {
return _flag; }
221 virtual void setFlag(deInt v) { _flag = v; }
223 virtual const deMatrix3* Ic()
const {
return &_Ic; }
224 virtual const deMatrix6* I()
const {
return &_I;}
226 virtual deVector6* Pa() {
return &(getABJoint(getNOJ() - 1)->Pa()); }
231 virtual void setInertia(
const deFloat* mass,
const deVector3* centerOfMass,
const deMatrix3* inertiaTensor);
237 virtual deFloat potentialEnergy(
const deVector3& gh,
const deFrame& globalFrame,
const deFloat mass,
const deVector3& centerOfMass);
239 virtual void setABJoint(
taoABJoint* joint, deInt i = 0) = 0;
240 virtual taoABJoint* getABJoint(deInt i = 0) = 0;
242 virtual void setNOJ(deInt n) = 0;
243 virtual const deInt getNOJ()
const = 0;
256 virtual void updateLocalX(
const deFrame& homeFrame,
const deFrame& localFrame);
257 virtual void getFrameLocal(
deFrame& localFrame);
258 virtual void abImpulse(
deVector6& Yah, deInt propagate);
259 virtual void globalJacobian(
const deFrame& globalFrame);
260 virtual void plusEq_Jg_ddQ(
deVector6& Ag);
261 virtual void add2Tau_JgT_F(
const deVector6& Fg);
273 virtual void force(
deVector6& Fh, deInt propagate);
275 virtual void abBiasForceConfig(
deVector6& Pah, deInt propagate);
279 virtual void setABJoint(
taoABJoint* joint, deInt i = 0) { _joint = joint; }
280 virtual taoABJoint* getABJoint(deInt i = 0) {
return _joint; }
282 virtual void setNOJ(deInt n) {}
283 virtual const deInt getNOJ()
const {
return 1; }
296 virtual void updateLocalX(
const deFrame& homeFrame,
const deFrame& localFrame);
297 virtual void getFrameLocal(
deFrame& localFrame);
298 virtual void abImpulse(
deVector6& Yah, deInt propagate);
299 virtual void globalJacobian(
const deFrame& globalFrame);
300 virtual void plusEq_Jg_ddQ(
deVector6& Ag);
301 virtual void add2Tau_JgT_F(
const deVector6& Fg);
313 virtual void force(
deVector6& Fh, deInt propagate);
315 virtual void abBiasForceConfig(
deVector6& Pah, deInt propagate);
319 virtual void setABJoint(
taoABJoint* joint, deInt i = 0) { _joint[i] = joint; }
320 virtual taoABJoint* getABJoint(deInt i = 0) {
return _joint[i]; }
322 virtual void setNOJ(deInt n) { _noj = n; _joint =
new taoABJoint*[_noj]; }
323 virtual const deInt getNOJ()
const {
return _noj; }
327 for (
int i = 0; i < _noj; i++)
337 #endif // DOXYGEN_SHOULD_SKIP_THIS
339 #endif // taoArticulatedBodyLink.h
3x1 vector classThis is a C++ wrapper class of deVector3f.
Definition: TaoDeVector3.h:32
virtual void abInertiaInit(deMatrix6 &Ia)
Definition: taoArticulatedBodyLink.cpp:31
Definition: taoArticulatedBodyLink.hpp:211
DE_MATH_API void crossMultiply(const deVector3 &v1, const deVector3 &v2)
this = v1 x v2
Definition: TaoDeVector3Inl.h:51
Definition: taoArticulatedBodyLink.hpp:188
Articulated body joint classThis class provides joint for articulated body.
Definition: taoABJoint.h:45
6x1 vector classThis class consists of two 3x1 vectors.
Definition: TaoDeVector6.h:33
DE_MATH_API void zero()
this = zero matrix
Definition: TaoDeMatrix3Inl.h:29
Definition: taoArticulatedBodyLink.hpp:251
DE_MATH_API void zero()
this = zero matrix
Definition: TaoDeMatrix6Inl.h:36
Articulated body node classThis class provides node for articulated body.
Definition: taoArticulatedBodyLink.hpp:40
DE_MATH_API void zero()
this = zero vector
Definition: TaoDeVector6Inl.h:36
Definition: taoArticulatedBodyLink.hpp:291
Transformation class using quaternionThis class consists of a quaternion for rotation and a vector fo...
Definition: TaoDeFrame.h:36
6x6 matrix classThis class consists of four 3x3 matrices.
Definition: TaoDeMatrix6.h:33
virtual deVector6 * getVelocity()
Definition: taoArticulatedBodyLink.hpp:65
3x3 matrix classThis is a C++ wrapper class of deMatrix3f.
Definition: TaoDeMatrix3.h:33
virtual deMatrix6 * Omega()
Definition: taoArticulatedBodyLink.hpp:61