Skip to content

Commit

Permalink
Make normalize func name more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
DrDab committed Oct 3, 2023
1 parent cc7c16b commit 0e03abe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/control/PlanarArmController.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ template <unsigned int N> class PlanarArmController {
Eigen::Vector2d newSetPoint = kin.jointPosToEEPos(targetJointPos);
std::lock_guard<std::mutex> lock(mutex);
double radius = kin.getSegLens().sum() * safetyFactor;
setpoint = normalizeVectorWithinRadius(newSetPoint, radius);
setpoint = normalizeEEWithinRadius(newSetPoint, radius);
}

/**
Expand All @@ -71,7 +71,7 @@ template <unsigned int N> class PlanarArmController {

// bounds check (new pos + vel vector <= sum of joint lengths)
double radius = kin.getSegLens().sum() * safetyFactor;
return normalizeVectorWithinRadius(pos, radius);
return normalizeEEWithinRadius(pos, radius);
}

/**
Expand Down Expand Up @@ -144,7 +144,7 @@ template <unsigned int N> class PlanarArmController {
* @param eePos The end-effector position to normalize.
* @param radius The radius to normalize the end-effector to.
*/
Eigen::Vector2d normalizeVectorWithinRadius(Eigen::Vector2d eePos, double radius) {
Eigen::Vector2d normalizeEEWithinRadius(Eigen::Vector2d eePos, double radius) {
if (eePos.norm() > radius) {
// TODO: will need to eventually shrink velocity vector until it is within radius
// instead of just normalizing it.
Expand Down

0 comments on commit 0e03abe

Please sign in to comment.