Skip to content

Commit

Permalink
Add normalize functionality to set_setpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
DrDab committed Oct 3, 2023
1 parent affcec0 commit 9d0cdfe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/control/PlanarArmController.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ template <unsigned int N> class PlanarArmController {
void set_setpoint(const navtypes::Vectord<N>& targetJointPos) {
Eigen::Vector2d newSetPoint = kin.jointPosToEEPos(targetJointPos);
std::lock_guard<std::mutex> lock(mutex);
setpoint = newSetPoint;
double radius = kin.getSegLens().sum() * safetyFactor;
setpoint = normalizeVectorWithinRadius(newSetPoint, radius);
}

/**
Expand Down

0 comments on commit 9d0cdfe

Please sign in to comment.