//============================================================================== Eigen::VectorXd Recording::getConfig(int _frameIdx, int _skelIdx) const { int index = 0; for (int i = 0; i < _skelIdx; i++) index += mNumGenCoordsForSkeletons[i]; return mBakedStates[_frameIdx].segment(index, getNumGenCoords(_skelIdx)); }
void Joint::setDampingCoefficient(int _idx, double _d) { assert(0 <= _idx && _idx < getNumGenCoords()); assert(_d >= 0.0); mDampingCoefficient[_idx] = _d; }
Eigen::VectorXd Joint::getDampingForces() const { int numDofs = getNumGenCoords(); Eigen::VectorXd dampingForce(numDofs); for (int i = 0; i < numDofs; ++i) dampingForce(i) = -mDampingCoefficient[i] * getGenCoord(i)->get_dq(); return dampingForce; }
double Joint::getDampingCoefficient(int _idx) const { assert(0 <= _idx && _idx < getNumGenCoords()); return mDampingCoefficient[_idx]; }