Skip to content

Commit

Permalink
[mc_rbdyn] Always use default_attitude (closes #424)
Browse files Browse the repository at this point in the history
  • Loading branch information
gergondet committed Jan 19, 2024
1 parent ad18f7b commit 4b63e3e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/mc_rbdyn/Robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,10 @@ Robot::Robot(NewRobotToken,
initQ[i] = jQ;
}
}
if(initQ[0].size())
{
const auto & attitude = module_.default_attitude();
initQ[0] = {std::begin(attitude), std::end(attitude)};
}
mbc().q = initQ;
forwardKinematics();
const auto & attitude = module_.default_attitude();
posW({Eigen::Quaterniond(attitude[0], attitude[1], attitude[2], attitude[3]).inverse(),
Eigen::Vector3d(attitude[4], attitude[5], attitude[6])});
forwardVelocity();
forwardAcceleration();
}
Expand Down

0 comments on commit 4b63e3e

Please sign in to comment.