Esempio n. 1
0
//==============================================================================
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));
}
Esempio n. 2
0
void Joint::setDampingCoefficient(int _idx, double _d)
{
    assert(0 <= _idx && _idx < getNumGenCoords());
    assert(_d >= 0.0);

    mDampingCoefficient[_idx] = _d;
}
Esempio n. 3
0
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;
}
Esempio n. 4
0
double Joint::getDampingCoefficient(int _idx) const
{
    assert(0 <= _idx && _idx < getNumGenCoords());

    return mDampingCoefficient[_idx];
}