IRBCAM plugins
Developer reference for IRBCAM plugins
|
Public Interface for Extending IRBCAM using QML Plugins. More...
#include <irbcaminterfacepublic.h>
Public Types | |
enum | RotationSequence |
Enum representing different rotation sequences. More... | |
enum | CoordinateFrame |
Enum representing different coordinate frames. More... | |
enum | MotionType |
Type of move operation. More... | |
enum | SpeedMode |
Target speed mode. More... | |
enum | KinSolution |
Solution status. More... | |
Signals | |
void | mainWindowChanged () |
Signal emitted when the main window size has changed. | |
Public Member Functions | |
Q_INVOKABLE QQuaternion | eulerToQuaternion (double rx, double ry, double rz, RotationSequence seq) |
Converts Euler angles to a Quaternion using the specified rotation sequence. | |
Q_INVOKABLE QVector3D | quaternionToEuler (QQuaternion quat, RotationSequence seq) |
Converts a Quaternion to Euler angles using the specified rotation sequence. | |
Q_INVOKABLE double | degToRad (double val) |
Converts an angle from degrees to radians. | |
Q_INVOKABLE double | radToDeg (double val) |
Converts an angle from radians to degrees. | |
Q_INVOKABLE QQuaternion | matrixToQuaternion (QMatrix4x4 mat) |
Converts transformation matrix to a quaternion. | |
Q_INVOKABLE QMatrix4x4 | quaternionToMatrix (QQuaternion quat) |
Converts quaternion to transformation matrix. | |
Q_INVOKABLE QVector3D | quaternionToRpy (QQuaternion quat) |
Converts a quaternion to Roll Pitch Yaw (RPY) angles. This function converts a rotation expressed in terms of a quaternion, to a roll-pitch-yaw representation and checks for singulatities. In the returned vector3d, the components are mapped like this: | |
Q_INVOKABLE void | setCoordinateFrame (CoordinateFrame frame, QVector3D position, QQuaternion quat) |
Sets position and orientation of a given coordinate frame. | |
Properties | |
QString | pluginName |
Q_PROPERTY for accessing the name of the plugin. | |
TargetProxyModel * | pathModel |
Access the Cartesian path in the station. | |
QRect | mainWindow |
Q_PROPERTY for accessing the main window's geometry as a QRect. | |
Public Interface for Extending IRBCAM using QML Plugins.
The IrbcamInterfacePublic
class serves as the public interface for extending IRBCAM with custom plugins. This interface allows plugin developers to access and interact with the core functionality of IRBCAM through QML, making it easier to create feature-rich and customizable extensions.
C++ types defined here are converted into QML types. See the official documentation on type conversion.
To utilize this interface in your QML plugins, include the following import statement at the beginning of your QML files:
Enum representing different coordinate frames.
This enum defines different coordinate frames used in IRBCAM.
Example usage in QML:
Solution status.
This enum describes the kinematic solution status for a target. The status is reset to KinSolution::NotSolved when changing the path.
Example usage in QML:
Type of move operation.
This enum describes which a target's kind of move operation.
Example usage in QML:
Enum representing different rotation sequences.
The RotationSequence enum defines different sequences for rotating objects in 3D space. Each sequence specifies the order in which rotations around X, Y, and Z axes are applied.
Example usage in QML:
Target speed mode.
This enum describes which speed mode a target follows.
Example usage in QML:
Q_INVOKABLE double IrbcamInterfacePublic::degToRad | ( | double | val | ) |
Converts an angle from degrees to radians.
val | The angle in degrees to be converted. |
Example usage in QML:
Q_INVOKABLE QQuaternion IrbcamInterfacePublic::eulerToQuaternion | ( | double | rx, |
double | ry, | ||
double | rz, | ||
RotationSequence | seq | ||
) |
Converts Euler angles to a Quaternion using the specified rotation sequence.
rx | The rotation angle around the x axis in radians. |
ry | The rotation angle around the y axis in radians. |
rz | The rotation angle around the z axis in radians. |
seq | The rotation sequence to be used for conversion. |
Example usage in QML:
|
signal |
Signal emitted when the main window size has changed.
This signal is emitted whenever the size of the application main window changes. Connect to this signal to perform actions when the main window size is updated.
Q_INVOKABLE QQuaternion IrbcamInterfacePublic::matrixToQuaternion | ( | QMatrix4x4 | mat | ) |
Converts transformation matrix to a quaternion.
mat | The 4x4 transformation matrix |
Example usage in QML:
Q_INVOKABLE QVector3D IrbcamInterfacePublic::quaternionToEuler | ( | QQuaternion | quat, |
RotationSequence | seq | ||
) |
Converts a Quaternion to Euler angles using the specified rotation sequence.
quat | The input Quaternion to be converted to Euler angles. |
seq | The rotation sequence to be used for conversion. |
Example usage in QML:
Q_INVOKABLE QMatrix4x4 IrbcamInterfacePublic::quaternionToMatrix | ( | QQuaternion | quat | ) |
Converts quaternion to transformation matrix.
quat | quaternion |
Example usage in QML:
Q_INVOKABLE QVector3D IrbcamInterfacePublic::quaternionToRpy | ( | QQuaternion | quat | ) |
Converts a quaternion to Roll Pitch Yaw (RPY) angles. This function converts a rotation expressed in terms of a quaternion, to a roll-pitch-yaw representation and checks for singulatities. In the returned vector3d, the components are mapped like this:
Rotation | Vector3D component |
---|---|
roll | Vector3D.z |
pitch | Vector3D.y |
yaw | Vector3D.x |
quat | The input quaternion to be converted to RPY. |
Example usage in QML:
Q_INVOKABLE double IrbcamInterfacePublic::radToDeg | ( | double | val | ) |
Converts an angle from radians to degrees.
val | The angle in radians to be converted. |
Example usage in QML:
Q_INVOKABLE void IrbcamInterfacePublic::setCoordinateFrame | ( | CoordinateFrame | frame, |
QVector3D | position, | ||
QQuaternion | quat | ||
) |
Sets position and orientation of a given coordinate frame.
frame | The coordinate frame whose position and orientation will be set/overwritten. |
position | The position of the coordinate frame in mm |
quat | The rotation representation by the quaternion of the coordinate frame. |
Example usage in QML:
|
read |
Q_PROPERTY for accessing the main window's geometry as a QRect.
Example usage in QML:
|
read |
Access the Cartesian path in the station.
This property provides access to the Cartesian path of the robot's motion. The Cartesian path is represented as a model with various access roles. Each component contains specific information related to the robot's motion.
Available role names are:
Role name | Type | Description |
---|---|---|
px | double | X-position |
py | double | Y-position |
pz | double | Z-position |
rz1 | double | First euler rotation (z-axis) |
ry | double | Second euler rotation (y-axis) |
rz2 | double | Third euler rotation (z-axis) |
velocityMode | SpeedMode | Speed mode |
velocity | double | Speed |
velocityChange | bool | Speed change |
toolNumber | int | Tool index |
toolChange | bool | Tool index change |
spindleSpeed | double | Spindle speed |
spindleChange | bool | Spindle speed change |
motionType | MotionType | Motion type |
status | KinSolution | The current solution state of this target |
These can be accessed either via the Qt Model/View interface or can be read directly using the dataAt(index, roleName)
method
Example usage in QML:
|
read |
Q_PROPERTY for accessing the name of the plugin.
Example usage in QML: