Skip to content

Commit

Permalink
Actually compute unnormalized setpoint instead of magic num
Browse files Browse the repository at this point in the history
  • Loading branch information
DrDab committed Oct 3, 2023
1 parent 9d0cdfe commit 62a352a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/control/PlanarArmControllerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ TEST_CASE("Test Planar Arm Safety Factor", "[control][planararmcontroller]") {
REQUIRE(foo.get_setpoint(robot::types::dataclock::now()).norm() == 9.5);

foo.set_setpoint({2.0, 3.0});
REQUIRE(std::abs(foo.get_setpoint(robot::types::dataclock::now()).norm() - 2.1166861277) <
Eigen::Vector2d origSetPoint = kin_obj.jointPosToEEPos({2.0, 3.0});
double expectedNorm = origSetPoint.norm();

REQUIRE(std::abs(foo.get_setpoint(robot::types::dataclock::now()).norm() - expectedNorm) <
1e-6);
}

0 comments on commit 62a352a

Please sign in to comment.