LBRState Class Reference

fri: KUKA::FRI::LBRState Class Reference
fri

Wrapper class for the FRI monitoring message for a KUKA LBR (leightweight) robot. More...

#include <friLBRState.h>

Collaboration diagram for KUKA::FRI::LBRState:
[legend]

Public Types

enum  { NUMBER_OF_JOINTS = 7 }
 

Public Member Functions

double getSampleTime () const
 Get the sample time in seconds.
 
ESessionState getSessionState () const
 Get the current FRI session state.
 
EConnectionQuality getConnectionQuality () const
 Get the current FRI connection quality.
 
ESafetyState getSafetyState () const
 Get the current safety state of the KUKA Sunrise controller.
 
EOperationMode getOperationMode () const
 Get the current operation mode of the KUKA Sunrise controller.
 
EDriveState getDriveState () const
 Get the accumulated drive state over all drives of the KUKA LBR controller.
 
EClientCommandMode getClientCommandMode () const
 Get the client command mode specified by the client.
 
EOverlayType getOverlayType () const
 Get the overlay type specified by the client.
 
EControlMode getControlMode () const
 Get the control mode of the KUKA LBR robot.
 
unsigned int getTimestampSec () const
 Get the timestamp of the current robot state in Unix time.
 
unsigned int getTimestampNanoSec () const
 Get the nanoseconds elapsed since the last second (in Unix time).
 
const double * getMeasuredJointPosition () const
 Get the currently measured joint positions of the robot.
 
const double * getCommandedJointPosition () const
 Get the last commanded joint positions of the robot.
 
const double * getMeasuredTorque () const
 Get the currently measured joint torques of the robot.
 
const double * getCommandedTorque () const
 Get the last commanded joint torques of the robot.
 
const double * getExternalTorque () const
 Get the currently measured external joint torques of the robot.
 
const double * getIpoJointPosition () const
 Get the joint positions commanded by the interpolator.
 
double getTrackingPerformance () const
 Get an indicator for the current tracking performance of the commanded robot.
 
bool getBooleanIOValue (const char *name) const
 Get boolean IO value.
 
unsigned long long getDigitalIOValue (const char *name) const
 Get digital IO value.
 
double getAnalogIOValue (const char *name) const
 Get analog IO value.
 

Protected Attributes

FRIMonitoringMessage_message
 FRI monitoring message (protobuf struct)
 

Static Protected Attributes

static const int LBRMONITORMESSAGEID = 0x245142
 type identifier for the FRI monitoring message corresponding to a KUKA LBR robot
 

Friends

class LBRClient
 

Detailed Description

Wrapper class for the FRI monitoring message for a KUKA LBR (leightweight) robot.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NUMBER_OF_JOINTS 

number of axes of the KUKA LBR robot

Member Function Documentation

◆ getAnalogIOValue()

double LBRState::getAnalogIOValue ( const char *  name) const

Get analog IO value.

Exceptions
FRIExceptionMay throw an FRIException if the IO is of wrong type or unknown.
Parameters
nameFull name of the IO (Syntax "IOGroupName.IOName").
Returns
Returns IO's analog value.

◆ getBooleanIOValue()

bool LBRState::getBooleanIOValue ( const char *  name) const

Get boolean IO value.

Exceptions
FRIExceptionMay throw an FRIException if the IO is of wrong type or unknown.
Parameters
nameFull name of the IO (Syntax "IOGroupName.IOName").
Returns
Returns IO's boolean value.

◆ getClientCommandMode()

EClientCommandMode LBRState::getClientCommandMode ( ) const

Get the client command mode specified by the client.

Returns
the client command mode specified by the client.

◆ getCommandedJointPosition()

const double * LBRState::getCommandedJointPosition ( ) const

Get the last commanded joint positions of the robot.

Returns
array of the commanded joint positions in radians

◆ getCommandedTorque()

const double * LBRState::getCommandedTorque ( ) const

Get the last commanded joint torques of the robot.

Returns
array of the commanded torques in Nm

◆ getConnectionQuality()

EConnectionQuality LBRState::getConnectionQuality ( ) const

Get the current FRI connection quality.

Returns
current FRI connection quality

◆ getControlMode()

EControlMode LBRState::getControlMode ( ) const

Get the control mode of the KUKA LBR robot.

Returns
current control mode of the KUKA LBR robot.

◆ getDigitalIOValue()

unsigned long long LBRState::getDigitalIOValue ( const char *  name) const

Get digital IO value.

Exceptions
FRIExceptionMay throw an FRIException if the IO is of wrong type or unknown.
Parameters
nameFull name of the IO (Syntax "IOGroupName.IOName").
Returns
Returns IO's digital value.

◆ getDriveState()

EDriveState LBRState::getDriveState ( ) const

Get the accumulated drive state over all drives of the KUKA LBR controller.

If the drive states differ between drives, the following rule applies: 1) The drive state is OFF if all drives are OFF. 2) The drive state is ACTIVE if all drives are ACTIVE. 3) otherwise the drive state is TRANSITIONING.

Returns
accumulated drive state

◆ getExternalTorque()

const double * LBRState::getExternalTorque ( ) const

Get the currently measured external joint torques of the robot.

The external torques corresponds to the measured torques when removing the torques induced by the robot itself.

Returns
array of the external torques in Nm

◆ getIpoJointPosition()

const double * LBRState::getIpoJointPosition ( ) const

Get the joint positions commanded by the interpolator.

When commanding a motion overlay in your robot application, this method will give access to the joint positions currently commanded by the motion interpolator.

Exceptions
FRIExceptionThis method will throw an FRIException during monitoring mode.
Returns
array of the ipo joint positions in radians

◆ getMeasuredJointPosition()

const double * LBRState::getMeasuredJointPosition ( ) const

Get the currently measured joint positions of the robot.

Returns
array of the measured joint positions in radians

◆ getMeasuredTorque()

const double * LBRState::getMeasuredTorque ( ) const

Get the currently measured joint torques of the robot.

Returns
array of the measured torques in Nm

◆ getOperationMode()

EOperationMode LBRState::getOperationMode ( ) const

Get the current operation mode of the KUKA Sunrise controller.

Returns
current operation mode

◆ getOverlayType()

EOverlayType LBRState::getOverlayType ( ) const

Get the overlay type specified by the client.

Returns
the overlay type specified by the client.

◆ getSafetyState()

ESafetyState LBRState::getSafetyState ( ) const

Get the current safety state of the KUKA Sunrise controller.

Returns
current safety state

◆ getSampleTime()

double LBRState::getSampleTime ( ) const

Get the sample time in seconds.

This is the period in which the KUKA Sunrise controller is sending FRI packets.

Returns
sample time in seconds

◆ getSessionState()

ESessionState LBRState::getSessionState ( ) const

Get the current FRI session state.

Returns
current FRI session state

◆ getTimestampNanoSec()

unsigned int LBRState::getTimestampNanoSec ( ) const

Get the nanoseconds elapsed since the last second (in Unix time).

This method complements getTimestampSec() to get a high resolution timestamp.

Returns
timestamp encoded as Unix time (nanoseconds part)

◆ getTimestampSec()

unsigned int LBRState::getTimestampSec ( ) const

Get the timestamp of the current robot state in Unix time.

This method returns the seconds since 0:00, January 1st, 1970 (UTC). Use getTimestampNanoSec() to increase your timestamp resolution when seconds are insufficient.

Returns
timestamp encoded as Unix time (seconds)

◆ getTrackingPerformance()

double LBRState::getTrackingPerformance ( ) const

Get an indicator for the current tracking performance of the commanded robot.

The tracking performance is an indicator on how well the commanded robot is able to follow the commands of the FRI client. The best possible value 1.0 is reached when the robot executes the given commands instantaneously. The tracking performance drops towards 0 when latencies are induced, e.g. when the commanded velocity, acceleration or jerk exceeds the capabilities of the robot. The tracking performance will always be 0 when the session state does not equal COMMANDING_ACTIVE.

Returns
current tracking performance

The documentation for this class was generated from the following files:
  • fri/FRI-Client-SDK_Cpp/include/friLBRState.h
  • fri/FRI-Client-SDK_Cpp/src/client_lbr/friLBRState.cpp