Class LBRState
Defined in File friLBRState.h
Class Documentation
-
class LBRState
Wrapper class for the FRI monitoring message for a KUKA LBR (lightweight) robot.
Public Types
Public Functions
-
LBRState()
-
double 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
-
ESessionState getSessionState() const
Get the current FRI session state.
- Returns:
current FRI session state
-
EConnectionQuality getConnectionQuality() const
Get the current FRI connection quality.
- Returns:
current FRI connection quality
-
ESafetyState getSafetyState() const
Get the current safety state of the KUKA Sunrise controller.
- Returns:
current safety state
-
EOperationMode getOperationMode() const
Get the current operation mode of the KUKA Sunrise controller.
- Returns:
current operation mode
-
EDriveState 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
-
EClientCommandMode getClientCommandMode() const
Get the client command mode specified by the client.
- Returns:
the client command mode specified by the client.
-
EOverlayType getOverlayType() const
Get the overlay type specified by the client.
- Returns:
the overlay type specified by the client.
-
EControlMode getControlMode() const
Get the control mode of the KUKA LBR robot.
- Returns:
current control mode of the KUKA LBR robot.
-
unsigned int 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)
-
unsigned int 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)
-
const double *getMeasuredJointPosition() const
Get the currently measured joint positions of the robot.
- Returns:
array of the measured joint positions in radians
-
const double *getCommandedJointPosition() const
Get the last commanded joint positions of the robot.
- Returns:
array of the commanded joint positions in radians
-
const double *getMeasuredTorque() const
Get the currently measured joint torques of the robot.
- Returns:
array of the measured torques in Nm
-
const double *getCommandedTorque() const
Get the last commanded joint torques of the robot.
- Returns:
array of the commanded torques in Nm
-
const double *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
-
const double *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.
- Throws:
FRIException – This method will throw an FRIException during monitoring mode.
- Returns:
array of the ipo joint positions in radians
-
double 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
-
bool getBooleanIOValue(const char *name) const
Get boolean IO value.
- Throws:
FRIException – May throw an FRIException if the IO is of wrong type or unknown.
- Parameters:
name – Full name of the IO (Syntax “IOGroupName.IOName”).
- Returns:
Returns IO’s boolean value.
-
unsigned long long getDigitalIOValue(const char *name) const
Get digital IO value.
- Throws:
FRIException – May throw an FRIException if the IO is of wrong type or unknown.
- Parameters:
name – Full name of the IO (Syntax “IOGroupName.IOName”).
- Returns:
Returns IO’s digital value.
-
double getAnalogIOValue(const char *name) const
Get analog IO value.
- Throws:
FRIException – May throw an FRIException if the IO is of wrong type or unknown.
- Parameters:
name – Full name of the IO (Syntax “IOGroupName.IOName”).
- Returns:
Returns IO’s analog value.
Protected Attributes
-
FRIMonitoringMessage *_message
FRI monitoring message (protobuf struct)
Protected Static Attributes
-
static const int LBRMONITORMESSAGEID = 0x245142
type identifier for the FRI monitoring message corresponding to a KUKA LBR robot
-
LBRState()