Skip to content

Commit

Permalink
[mc_rbdyn::Robot] the convexes location is updated at each forward ki…
Browse files Browse the repository at this point in the history
…nematics
  • Loading branch information
antodld committed Aug 28, 2023
1 parent 8afa04d commit c01eda4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/mc_rbdyn/Robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,11 +1169,18 @@ unsigned int mc_rbdyn::Robot::robotIndex() const

void Robot::forwardKinematics()
{
rbd::forwardKinematics(mb(), mbc());
forwardKinematics(mbc());
}
void Robot::forwardKinematics(rbd::MultiBodyConfig & mbc) const
{
rbd::forwardKinematics(mb(), mbc);

for(auto & cvx : convexes_)
{
unsigned int index = static_cast<unsigned int>(mb().bodyIndexByName(cvx.second.first));
sch::mc_rbdyn::transform(*(cvx.second.second.get()), mbc.bodyPosW[index]);
}

}

void Robot::forwardVelocity()
Expand Down

0 comments on commit c01eda4

Please sign in to comment.