Skip to content

Commit

Permalink
Merged in bugfix/end_effector_kinematics_cppad_segmentation (pull req…
Browse files Browse the repository at this point in the history
…uest #692)

Fix segment indices bug in PinocchioEndEffectorKinematicsCppAd

Approved-by: Farbod Farshidian
  • Loading branch information
manumerous authored and farbod-farshidian committed Jan 9, 2023
2 parents ebde452 + 122529e commit 8b64496
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ auto PinocchioEndEffectorKinematicsCppAd::getOrientationError(const vector_t& st
-> std::vector<vector3_t> {
vector_t params(4 * endEffectorIds_.size());
for (int i = 0; i < endEffectorIds_.size(); i++) {
params.segment<4>(i) = referenceOrientations[i].coeffs();
params.segment<4>(4 * i) = referenceOrientations[i].coeffs();
}

const vector_t errorValues = orientationErrorCppAdInterfacePtr_->getFunctionValue(state, params);
Expand All @@ -272,7 +272,7 @@ std::vector<VectorFunctionLinearApproximation> PinocchioEndEffectorKinematicsCpp
const vector_t& state, const std::vector<quaternion_t>& referenceOrientations) const {
vector_t params(4 * endEffectorIds_.size());
for (int i = 0; i < endEffectorIds_.size(); i++) {
params.segment<4>(i) = referenceOrientations[i].coeffs();
params.segment<4>(4 * i) = referenceOrientations[i].coeffs();
}

const vector_t errorValues = orientationErrorCppAdInterfacePtr_->getFunctionValue(state, params);
Expand Down

0 comments on commit 8b64496

Please sign in to comment.