25inline bool isValidElbow(
const std::array<double, 2>& elbow)
noexcept {
26 return elbow[1] == -1.0 || elbow[1] == 1.0;
37 constexpr double kOrthonormalThreshold = 1e-5;
39 if (transform[3] != 0.0 || transform[7] != 0.0 || transform[11] != 0.0 || transform[15] != 1.0) {
42 for (
size_t j = 0; j < 3; ++j) {
43 if (std::abs(std::sqrt(std::pow(transform[j * 4 + 0], 2) + std::pow(transform[j * 4 + 1], 2) +
44 std::pow(transform[j * 4 + 2], 2)) -
45 1.0) > kOrthonormalThreshold) {
49 for (
size_t i = 0; i < 3; ++i) {
50 if (std::abs(std::sqrt(std::pow(transform[0 * 4 + i], 2) + std::pow(transform[1 * 4 + i], 2) +
51 std::pow(transform[2 * 4 + i], 2)) -
52 1.0) > kOrthonormalThreshold) {
87 if (!std::all_of(array.begin(), array.end(),
88 [](
double array_element) { return std::isfinite(array_element); })) {
89 throw std::invalid_argument(
"Commanding value is infinite or NaN.");
99inline void checkMatrix(
const std::array<double, 16>& transform) {
102 throw std::invalid_argument(
103 "libfranka: Attempt to set invalid transformation in motion generator. Has to be column "
116 throw std::invalid_argument(
117 "Invalid elbow configuration given! Only +1 or -1 are allowed for the sign of the 4th "