Skip to content
Snippets Groups Projects
Commit 1741ed76 authored by Fabian Reister's avatar Fabian Reister
Browse files

cleanup

parent 1a5754e5
No related branches found
No related tags found
2 merge requests!170ArMem Viewer: Resolve Memory IDs,!169bugfix: platform position controller is turning into wrong direction
......@@ -80,24 +80,10 @@ namespace armarx
return;
}
const float measuredOrientation = rtGetControlStruct().globalOrientation;
const Eigen::Vector2f measuredPosition = rtGetControlStruct().globalPosition;// + relativeCurrentPosition;
const float measuredOrientation = rtGetControlStruct().globalOrientation;//+ relativeOrientation;
const float targetOrientation = rtGetControlStruct().targetOrientation;
// measured and target orientation are now within bounds [-pi, pi]
// in which orientation to rotate? => angleBetween is not reliable yet!
// float angleBetween = targetOrientation - measuredOrientation;
// angleBetween = simox::math::periodic_clamp(angleBetween, -M_PIf32, M_PIf32);
// targetOrientation = measuredOrientation + angleBetween;
// -> now angleBetween is reliable
pid.update(timeSinceLastIteration.toSecondsDouble(), measuredPosition, rtGetControlStruct().target);
//opid.update(timeSinceLastIteration.toSecondsDouble(), static_cast<double>(updatedOrientation), rtGetControlStruct().targetOrientation);
opid.update(timeSinceLastIteration.toSecondsDouble(), static_cast<double>(measuredOrientation), targetOrientation);
pid.update(timeSinceLastIteration.toSecondsDouble(), rtGetControlStruct().globalPosition, rtGetControlStruct().target);
opid.update(timeSinceLastIteration.toSecondsDouble(), static_cast<double>(measuredOrientation), rtGetControlStruct().targetOrientation);
const Eigen::Rotation2Df global_R_local(-measuredOrientation);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment