RoboDK API - Documentation
RoboDK_API Namespace Reference

AllRoboDKAPI functions are wrapped in theRoboDK_APInamespace. If you prefer to forget about theRoboDK_APIyou can define RDK_SKIP_NAMESPACE (add the define: RDK_SKIP_NAMESPACE)More...

Classes

struct Color
TheColorstruct represents an RGBA color (each color component should be in the range [0-1])More...
class Item
TheItemclass represents an item inRoboDKstation. An item can be a robot, a frame, a tool, an object, a target, ... any item visible in thestation tree. An item can also be seen as a node where other items can be attached to (child items). Every item has one parent item/node and can have one or more child items/nodes.More...
class Mat
TheMatclass represents a 4x4 pose matrix. The main purpose of this object is to represent a pose in the 3D space (position and orientation). In other words, a pose is a 4x4 matrix that represents the position and orientation of one reference frame with respect to another one, in the 3D space. Poses are commonly used in robotics to place objects, reference frames and targets with respect to each other.
\( transl(x,y,z) rotx(r) roty(p) rotz(w) = \\ \begin{bmatrix} n_x & o_x & a_x & x \\ n_y & o_y & a_y & y \\ n_z & o_z & a_z & z \\ 0 & 0 & 0 & 1 \end{bmatrix} \).More...
class RoboDK
This class is the iterface to theRoboDKAPI. With theRoboDKAPI you can automate certain tasks and operate on items. Interactions with items in the station tree are made through Items (IItem). An item is an object in theRoboDKtree (it can be either a robot, an object, a tool, a frame, a program, ...).More...
class tJoints
ThetJointsclass represents a joint position of a robot (robot axes).More...
struct tMatrix2D
ThetMatrix2Dstruct represents a variable size 2d Matrix. Use the Matrix2D_... functions to oeprate on this variable sized matrix. This type of data can be used to get/set a program as a list. This is also useful for backwards compatibility functions related to RoKiSim.More...

Typedefs

typedef double tXYZWPR[6]
Six doubles that represent robot joints (usually in degrees)More...
typedef double tXYZ[3]
tXYZ (mm) represents a position or a vector in mmMore...
typedef double tConfig[RDK_SIZE_MAX_CONFIG]
The robot configuration defines a specific state of the robot without crossing any singularities. Changing the configuration requires crossing a singularity. There are 2x2x2=8 different configurations. A robot configurations is also known by "Assembly mode" The robot configuration is defined as an array of 3 doubles: [FACING REAR, LOWER ARM, WRIST FLIP]. FACING REAR=0 means FACING FRONT LOWER ARM=0 means ELBOW UP WRIST FLIP=0 means WRIST NON FLIP the 4th value is reserved.More...

Functions

Mat transl(double x, double y, double z)
Translation matrix class:Mat::transl.More...
Mat rotx(double rx)
Translation matrix class:垫:rotx.More...
Mat roty(double ry)
Translation matrix class:Mat::roty.More...
Mat rotz(double rz)
Translation matrix class:垫:rotz.More...
void emxInit_real_T(tMatrix2D**pEmxArray, int numDimensions)
tMatrix2D* Matrix2D_Create()
Creates a new 2D matrixtMatrix2D.. UseMatrix2D_Deleteto delete the matrix (to free the memory). The ProcedureDebug_Matrix2Dshows an example to read data from atMatrix2D.More...
void emxFree_real_T(tMatrix2D**pEmxArray)
void Matrix2D_Delete(tMatrix2D**mat)
Deletes atMatrix2D.More...
void emxEnsureCapacity(tMatrix2D*emxArray, int oldNumel, unsigned int elementSize)
void Matrix2D_Set_Size(tMatrix2D*mat, int rows, int cols)
Sets the size of atMatrix2D.More...
int Matrix2D_Size(consttMatrix2D*mat, int dim)
Sets the size of atMatrix2D.More...
int Matrix2D_Get_ncols(consttMatrix2D*var)
返回数字的啊f columns of atMatrix2D.More...
int Matrix2D_Get_nrows(consttMatrix2D*var)
返回数字的啊f rows of atMatrix2D.More...
double Matrix2D_Get_ij(consttMatrix2D*var, int i, int j)
Returns the value at location [i,j] of atMatrix2D.More...
void Matrix2D_SET_ij(consttMatrix2D*var, int i, int j, double value)
double * Matrix2D_Get_col(consttMatrix2D*var, int col)
Returns the pointer of a column of atMatrix2D. A column hasMatrix2D_Get_nrowsvalues that can be accessed/modified from the returned pointer continuously.More...
void Matrix2D_Add(tMatrix2D*var, const double *array, int numel)
void Matrix2D_Add(tMatrix2D*var, consttMatrix2D*varadd)
void Debug_Array(const double *array, int arraysize)
Show an array through STDOUT Given an array of doubles, it generates a string.More...
void Debug_Matrix2D(consttMatrix2D*mat)
Display the content of atMatrix2Dthrough STDOUT. This is only intended for debug purposes.More...
QDebug operator<<(QDebug dbg, constMata&m)
Displays the content of aMatthrough STDOUT. This is only intended for debug purposes.More...
QDebug operator<<(QDebug dbg, consttJoints&jnts)
QDebug operator<<(QDebug dbg, constItem&itm)
QDebug operator<<(QDebug dbg, constMat*m)
QDebug operator<<(QDebug dbg, consttJoints*jnts)
QDebug operator<<(QDebug dbg, constItem*itm)

Detailed Description

AllRoboDKAPI functions are wrapped in theRoboDK_APInamespace. If you prefer to forget about theRoboDK_APIyou can define RDK_SKIP_NAMESPACE (add the define: RDK_SKIP_NAMESPACE)

Typedef Documentation

tConfig

typedef double tConfig[RDK_SIZE_MAX_CONFIG]

The robot configuration defines a specific state of the robot without crossing any singularities. Changing the configuration requires crossing a singularity. There are 2x2x2=8 different configurations. A robot configurations is also known by "Assembly mode" The robot configuration is defined as an array of 3 doubles: [FACING REAR, LOWER ARM, WRIST FLIP]. FACING REAR=0 means FACING FRONT LOWER ARM=0 means ELBOW UP WRIST FLIP=0 means WRIST NON FLIP the 4th value is reserved.

Definition at line310of filerobodk_api.h.

tXYZ

typedef double tXYZ[3]

tXYZ (mm) represents a position or a vector in mm

Definition at line299of filerobodk_api.h.

tXYZWPR

typedef double tXYZWPR[6]

Six doubles that represent robot joints (usually in degrees)

tXYZWPR (mm, rad) holds the same information as a tMatrix4x4 pose but represented as XYZ position (in mm) and WPR orientation (in rad) (XYZWPR = [X,Y,Z,W,P,R]) This type of variable is easier to read and it is what most robot controllers use to input a pose. However, for internal calculations it is better to use a 4x4 pose matrix as it is faster and more accurate. To calculate a 4x4 matrix: pose4x4 = transl(X,Y,Z)*rotx(W)*roty(P)*rotz(R) See POSE_2_XYZWPR and XYZWPR_2_POSE to exchange between tMatrix4x4 andtXYZWPR

Definition at line296of filerobodk_api.h.

Function Documentation

Debug_Array()

ROBODK void Debug_Array ( const double * array,
int arraysize
)

Show an array through STDOUT Given an array of doubles, it generates a string.

Definition at line4066of filerobodk_api.cpp.

Debug_Matrix2D()

ROBODK void Debug_Matrix2D ( consttMatrix2D* mat )

Display the content of atMatrix2Dthrough STDOUT. This is only intended for debug purposes.

Parameters
[in] mat Pointer to the matrix

Definition at line4080of filerobodk_api.cpp.

emxEnsureCapacity()

void RoboDK_API::emxEnsureCapacity ( tMatrix2D* emxArray,
int oldNumel,
unsigned int elementSize
)

Definition at line3960of filerobodk_api.cpp.

emxFree_real_T()

void RoboDK_API::emxFree_real_T ( tMatrix2D** pEmxArray )

Definition at line3943of filerobodk_api.cpp.

emxInit_real_T()

void RoboDK_API::emxInit_real_T ( tMatrix2D** pEmxArray,
int numDimensions
)

Definition at line3920of filerobodk_api.cpp.

Matrix2D_Add()[1/2]

void RoboDK_API::Matrix2D_Add ( tMatrix2D* var,
const double * array,
int numel
)

Definition at line4035of filerobodk_api.cpp.

Matrix2D_Add()[2/2]

void RoboDK_API::Matrix2D_Add ( tMatrix2D* var,
consttMatrix2D* varadd
)

Definition at line4048of filerobodk_api.cpp.

Matrix2D_Create()

ROBODKtMatrix2D* Matrix2D_Create ( )

Creates a new 2D matrixtMatrix2D.. UseMatrix2D_Deleteto delete the matrix (to free the memory). The ProcedureDebug_Matrix2Dshows an example to read data from atMatrix2D.

Definition at line3936of filerobodk_api.cpp.

Matrix2D_Delete ()

ROBODK void Matrix2D_Delete ( tMatrix2D** mat )

Deletes atMatrix2D.

Parameters
[in] mat Pointer of the pointer to the matrix

Definition at line3954of filerobodk_api.cpp.

Matrix2D_Get_col()

ROBODK double * Matrix2D_Get_col ( consttMatrix2D* var,
int col
)

Returns the pointer of a column of atMatrix2D. A column hasMatrix2D_Get_nrowsvalues that can be accessed/modified from the returned pointer continuously.

Parameters
[in] mat Pointer to the matrix
[in] col Column to retreive. /return double array (internal pointer) to the column

Definition at line4030of filerobodk_api.cpp.

Matrix2D_Get_ij()

ROBODK double Matrix2D_Get_ij ( consttMatrix2D* var,
int i,
int j
)

Returns the value at location [i,j] of atMatrix2D.

Parameters
[in] mat Pointer to the matrix Returns the value of the cell

Definition at line4023of filerobodk_api.cpp.

Matrix2D_Get_ncols()

ROBODK int Matrix2D_Get_ncols ( consttMatrix2D* var )

返回数字的啊f columns of atMatrix2D.

Parameters
[in] mat Pointer to the matrix Returns the number of columns (Second dimension)

Definition at line4017of filerobodk_api.cpp.

Matrix2D_Get_nrows()

ROBODK int Matrix2D_Get_nrows ( consttMatrix2D* var )

返回数字的啊f rows of atMatrix2D.

Parameters
[in] mat Pointer to the matrix Returns the number of rows (First dimension)

Definition at line4020of filerobodk_api.cpp.

Matrix2D_SET_ij()

void RoboDK_API::Matrix2D_SET_ij ( consttMatrix2D* var,
int i,
int j,
double value
)

Definition at line4026of filerobodk_api.cpp.

Matrix2D_Set_Size()

ROBODK void Matrix2D_Set_Size ( tMatrix2D* mat,
int rows,
int cols
)

Sets the size of atMatrix2D.

Parameters
[in/out] mat: Pointer to the matrix
[in] rows The number of rows.
[in] cols The number of columns.

Definition at line3996of filerobodk_api.cpp.

Matrix2D_Size()

ROBODK int Matrix2D_Size ( consttMatrix2D* mat,
int dim
)

Sets the size of atMatrix2D.

Parameters
[in/out] mat: Pointer to the matrix
[in] dim Dimension (1 or 2)

Definition at line4009of filerobodk_api.cpp.

operator<<()[1/6]

QDebug RoboDK_API::operator<< ( QDebug dbg,
constItem& itm
)
inline

Definition at line2568of filerobodk_api.h.

operator<<()[2/6]

QDebug RoboDK_API::operator<< ( QDebug dbg,
constItem* itm
)
inline

Definition at line2572of filerobodk_api.h.

operator<<()(3/6)

QDebug RoboDK_API::operator<< ( QDebug dbg,
constMat& m
)
inline

Displays the content of aMatthrough STDOUT. This is only intended for debug purposes.

Parameters
[in] mat pose matrix
[in] show_full_pose set to false to display the 6 values of the pose as XYZWPR instead of the 4x4 matrix

Definition at line2566of filerobodk_api.h.

operator<<()[4/6]

QDebug RoboDK_API::operator<< ( QDebug dbg,
constMat* m
)
inline

Definition at line2570of filerobodk_api.h.

operator<<()[5/6]

QDebug RoboDK_API::operator<< ( QDebug dbg,
consttJoints& jnts
)
inline

Definition at line2567of filerobodk_api.h.

operator<<()[6/6]

QDebug RoboDK_API::operator<< ( QDebug dbg,
consttJoints* jnts
)
inline

Definition at line2571of filerobodk_api.h.

rotx()

ROBODKMatrotx ( double rx )

Translation matrix class:垫:rotx.

Definition at line177of filerobodk_api.cpp.

roty()

ROBODKMatroty ( double ry )

Translation matrix class:Mat::roty.

Definition at line181of filerobodk_api.cpp.

rotz()

ROBODKMatrotz ( double rz )

Translation matrix class:垫:rotz.

Definition at line185of filerobodk_api.cpp.

transl()

ROBODKMattransl ( double x,
double y,
double z
)

Translation matrix class:Mat::transl.

Definition at line173of filerobodk_api.cpp.