Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mbc member 'bodyAccW' #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/RBDyn/MultiBodyConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace rbd
MultiBodyConfig::MultiBodyConfig(const MultiBody & mb)
: q(mb.nrJoints()), alpha(mb.nrJoints()), alphaD(mb.nrJoints()), force(mb.nrBodies()), jointConfig(mb.nrJoints()),
jointVelocity(mb.nrJoints()), jointTorque(mb.nrJoints()), motionSubspace(mb.nrJoints()), bodyPosW(mb.nrBodies()),
parentToSon(mb.nrBodies()), bodyVelW(mb.nrBodies()), bodyVelB(mb.nrBodies()), bodyAccB(mb.nrBodies()),
parentToSon(mb.nrBodies()), bodyVelW(mb.nrBodies()), bodyAccW(mb.nrBodies()), bodyVelB(mb.nrBodies()), bodyAccB(mb.nrBodies()),
gravity(0., 9.81, 0.)
{
for(int i = 0; i < static_cast<int>(q.size()); ++i)
Expand Down Expand Up @@ -367,6 +367,7 @@ void checkMatchBodyVel(const MultiBody & mb, const MultiBodyConfig & mbc)

void checkMatchBodyAcc(const MultiBody & mb, const MultiBodyConfig & mbc)
{
checkMatchBodiesVector(mb, mbc.bodyAccW, "bodyAccW");
checkMatchBodiesVector(mb, mbc.bodyAccB, "bodyAccB");
}

Expand Down
6 changes: 5 additions & 1 deletion src/RBDyn/RBDyn/MultiBodyConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ struct RBDYN_DLLAPI MultiBodyConfig
/// Bodies speed in world coordinate.
std::vector<sva::MotionVecd> bodyVelW;

/// Bodies acceleration in world coordinate.
std::vector<sva::MotionVecd> bodyAccW;

/// Bodies speed in Body coordinate.
std::vector<sva::MotionVecd> bodyVelB;

Expand Down Expand Up @@ -220,7 +223,8 @@ RBDYN_DLLAPI void checkMatchParentToSon(const MultiBody & mb, const MultiBodyCon
/// (mbc.bodyVelW, mbc.bodyVelB).
RBDYN_DLLAPI void checkMatchBodyVel(const MultiBody & mb, const MultiBodyConfig & mbc);

/// @throw std::domain_error If there is a mismatch between mb and mbc.bodyAccB.
/// @throw std::domain_error If there is a mismatch between mb and
/// (mbc.bodyAccW, mbc.bodyAccB).
RBDYN_DLLAPI void checkMatchBodyAcc(const MultiBody & mb, const MultiBodyConfig & mbc);

/// @throw std::domain_error If there is a mismatch between mb and mbc.jointConfig.
Expand Down