38 template <
int dimensions = Eigen::Dynamic>
68 stackAllocations.zeroVec = PIDVectorX::Zero(size);
69 stackAllocations.errorVec = stackAllocations.zeroVec;
70 stackAllocations.direction = stackAllocations.zeroVec;
71 stackAllocations.oldControlValue = stackAllocations.zeroVec;
83 ScopedRecursiveLockPtr lock = getLock();
84 if (stackAllocations.zeroVec.rows() == 0)
98 for (
size_t i = 0; i <
limitless.size(); i++)
102 stackAllocations.errorVec(i) =
109 double error = stackAllocations.errorVec.norm();
124 stackAllocations.direction = targetValue;
128 stackAllocations.direction = stackAllocations.errorVec.normalized();
132 stackAllocations.direction.setZero();
141 stackAllocations.oldControlValue = stackAllocations.zeroVec;
149 float maxNewJointAcc = accVec.maxCoeff();
150 float minNewJointAcc = accVec.minCoeff();
151 maxNewJointAcc = std::max<float>(fabs(minNewJointAcc), fabs(maxNewJointAcc));
154 auto newValue = stackAllocations.oldControlValue +
158 <<
VAROUT(stackAllocations.oldControlValue) <<
VAROUT(newValue);
166 max = std::max<float>(fabs(
min), fabs(
max));
178 <<
" dt: " << deltaSec;
187 ScopedRecursiveLockPtr lock = getLock();
196 update(
dt, measuredValue, targetValue);
209 ScopedRecursiveLockPtr lock = getLock();
216 ScopedRecursiveLockPtr lock = getLock();
245 struct StackAllocationHelper
265 return ScopedRecursiveLockPtr();