Closed wuv-ogre closed 6 years ago
Hi @wuv-ogre
This is indeed a nice improvement. That's pretty much the implementation of fullJacobian
but the result is accumulated rather than zero-ed. I think it is relevant to add this function in the Jacobian
class (something like addFullJacobian
) and use it in RBDyn (although it also seems to be only useful in Momentum.cpp
)
Would you have time to submit a PR?
done a quick check with
void Jacobian::addFullJacobian(const MultiBody& mb,
const Eigen::Ref
and the momentum code going to
jacWork_[i] = proj*jac;
jacVec_[i].addFullJacobian(mb, jacWork_[i], cmMat_); // uses joint paths of jacVec_[i] adds jacWork_[i] to cmMat_
jacWork_[i] = proj*jacDot;
jacVec_[i].addFullJacobian(mb, jacWork_[i], cmMatDot_);
jacWork_[i] = projDot*jac;
jacVec_[i].addFullJacobian(mb, jacWork_[i], cmMatDot_);
which gives the same results as the previous method. I'll have a go at doing pull request later, probably tomorrow, thanks gergondet
Closed by #49
If I'm not mis-understanding, code like
jacWork[i] = proj*jac; jacVec[i].fullJacobian(mb, jacWork[i], jacFull); cmMat.block(0, 0, 6, mb.nrDof()) += jacFull;
could turn into
doing so bumped my frame rate from about 7 to 20 fps for a 50 something dof multibody