libfranka  0.8.0
FCI C++ API
Functions
control_tools.h File Reference

Contains helper functions for writing control loops. More...

#include <array>
#include <cmath>
#include <string>
Include dependency graph for control_tools.h:

Go to the source code of this file.

Functions

bool franka::isValidElbow (const std::array< double, 2 > &elbow) noexcept
 Determines whether the given elbow configuration is valid or not. More...
 
bool franka::isHomogeneousTransformation (const std::array< double, 16 > &transform) noexcept
 Determines whether the given array represents a valid homogeneous transformation matrix. More...
 
bool franka::hasRealtimeKernel ()
 Determines whether the current OS kernel is a realtime kernel. More...
 
bool franka::setCurrentThreadToHighestSchedulerPriority (std::string *error_message)
 Sets the current thread to the highest possible scheduler priority. More...
 

Detailed Description

Contains helper functions for writing control loops.

Function Documentation

◆ 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]transform4x4 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]elbowElbow 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_messageContains an error message if the scheduler priority cannot be set successfully.
Returns
True if successful, false otherwise.