Contains helper functions for writing control loops.
More...
#include <algorithm>
#include <array>
#include <cmath>
#include <stdexcept>
#include <string>
Go to the source code of this file.
|
bool | franka::isValidElbow (const std::array< double, 2 > &elbow) noexcept |
| Determines whether the given elbow configuration is valid or not.
|
|
bool | franka::isHomogeneousTransformation (const std::array< double, 16 > &transform) noexcept |
| Determines whether the given array represents a valid homogeneous transformation matrix.
|
|
bool | franka::hasRealtimeKernel () |
| Determines whether the current OS kernel is a realtime kernel.
|
|
bool | franka::setCurrentThreadToHighestSchedulerPriority (std::string *error_message) |
| Sets the current thread to the highest possible scheduler priority.
|
|
template<size_t N> |
void | franka::checkFinite (const std::array< double, N > &array) |
| Checks if all elements of an array of the size N have a finite value.
|
|
void | franka::checkMatrix (const std::array< double, 16 > &transform) |
| Checks if all elements of the transformation matrix are finite and if it is a homogeneous transformation.
|
|
void | franka::checkElbow (const std::array< double, 2 > &elbow) |
| Checks if all elements of the elbow vector are finite and if the elbow configuration is valid.
|
|
Contains helper functions for writing control loops.
◆ checkElbow()
void franka::checkElbow |
( |
const std::array< double, 2 > & |
elbow | ) |
|
|
inline |
Checks if all elements of the elbow vector are finite and if the elbow configuration is valid.
- Parameters
-
elbow | the elbow vector to check |
◆ checkFinite()
template<size_t N>
void franka::checkFinite |
( |
const std::array< double, N > & |
array | ) |
|
|
inline |
Checks if all elements of an array of the size N have a finite value.
- Template Parameters
-
- Parameters
-
array | the array to be checked |
◆ checkMatrix()
void franka::checkMatrix |
( |
const std::array< double, 16 > & |
transform | ) |
|
|
inline |
Checks if all elements of the transformation matrix are finite and if it is a homogeneous transformation.
- Parameters
-
transform | the transformation matrix to check |
◆ hasRealtimeKernel()
bool franka::hasRealtimeKernel |
( |
| ) |
|
Determines whether the current OS kernel is a realtime kernel.
On Linux, this checks for the existence of /sys/kernel/realtime
. On Windows, this always returns true.
- Returns
- True if running a realtime kernel, false otherwise.
◆ isHomogeneousTransformation()
bool franka::isHomogeneousTransformation |
( |
const std::array< double, 16 > & |
transform | ) |
|
|
inlinenoexcept |
Determines whether the given array represents a valid homogeneous transformation matrix.
- Parameters
-
[in] | transform | 4x4 matrix in column-major format. |
- Returns
- True if the array represents a homogeneous transformation matrix, otherwise false.
◆ isValidElbow()
bool franka::isValidElbow |
( |
const std::array< double, 2 > & |
elbow | ) |
|
|
inlinenoexcept |
Determines whether the given elbow configuration is valid or not.
- Parameters
-
[in] | elbow | Elbow configuration. |
- Returns
- True if valid, otherwise false.
◆ setCurrentThreadToHighestSchedulerPriority()
bool franka::setCurrentThreadToHighestSchedulerPriority |
( |
std::string * |
error_message | ) |
|
Sets the current thread to the highest possible scheduler priority.
- Parameters
-
[out] | error_message | Contains an error message if the scheduler priority cannot be set successfully. |
- Returns
- True if successful, false otherwise.