22 inline bool isValidElbow(
const std::array<double, 2>& elbow) noexcept {
23 return elbow[1] == -1.0 || elbow[1] == 1.0;
34 constexpr
double kOrthonormalThreshold = 1e-5;
36 if (transform[3] != 0.0 || transform[7] != 0.0 || transform[11] != 0.0 || transform[15] != 1.0) {
39 for (
size_t j = 0; j < 3; ++j) {
40 if (std::abs(std::sqrt(std::pow(transform[j * 4 + 0], 2) + std::pow(transform[j * 4 + 1], 2) +
41 std::pow(transform[j * 4 + 2], 2)) -
42 1.0) > kOrthonormalThreshold) {
46 for (
size_t i = 0; i < 3; ++i) {
47 if (std::abs(std::sqrt(std::pow(transform[0 * 4 + i], 2) + std::pow(transform[1 * 4 + i], 2) +
48 std::pow(transform[2 * 4 + i], 2)) -
49 1.0) > kOrthonormalThreshold) {
bool isHomogeneousTransformation(const std::array< double, 16 > &transform) noexcept
Determines whether the given array represents a valid homogeneous transformation matrix.
bool setCurrentThreadToHighestSchedulerPriority(std::string *error_message)
Sets the current thread to the highest possible scheduler priority.
bool isValidElbow(const std::array< double, 2 > &elbow) noexcept
Determines whether the given elbow configuration is valid or not.
bool hasRealtimeKernel()
Determines whether the current OS kernel is a realtime kernel.