This class is the iterface to the RoboDK API. With the RoboDK API 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 the RoboDK tree (it can be either a robot, an object, a tool, a frame, a program, ...). More...
#include <robodk_api.h>
Public Member Functions | |
RoboDK (const QString &robodk_ip="", int com_port=-1, const QString &args="", const QString &path="") | |
quint64 | ProcessID () |
quint64 | WindowID () |
bool | Connected () |
bool | Connect () |
void | Disconnect () |
Disconnect from the RoboDK API. This flushes any pending program generation. More... | |
void | Finish () |
Disconnect from the RoboDK API. This flushes any pending program generation. More... | |
Item | getItem (QString name, int itemtype=-1) |
Returns an item by its name. If there is no exact match it will return the last closest match. More... | |
QStringList | getItemListNames (int filter=-1) |
Returns a list of items (list of names or Items) of all available items in the currently open station in RoboDK. Optionally, use a filter to return specific items (example: getItemListNames(filter = ITEM_TYPE_ROBOT)) More... | |
QList< Item > | getItemList (int filter=-1) |
Returns a list of items (list of names or pointers) of all available items in the currently open station in RoboDK. Optionally, use a filter to return specific items (example: getItemListNames(filter = ITEM_CASE_ROBOT)) More... | |
Item | ItemUserPick (const QString &message="Pick one item", int itemtype=-1) |
Shows a RoboDK popup to select one object from the open RoboDK station. An item type can be specified to filter desired items. If no type is specified, all items are selectable. More... | |
void | ShowRoboDK () |
Shows or raises the RoboDK window. More... | |
void | HideRoboDK () |
Hides the RoboDK window. RoboDK will continue running in the background. More... | |
void | CloseRoboDK () |
Closes RoboDK window and finishes RoboDK execution More... | |
QString | Version () |
Return the vesion of RoboDK as a 4 digit string: Major.Minor.Revision.Build More... | |
void | setWindowState (int windowstate=WINDOWSTATE_NORMAL) |
Set the state of the RoboDK window More... | |
void | setFlagsRoboDK (int flags=FLAG_ROBODK_ALL) |
Update the RoboDK flags. RoboDK flags allow defining how much access the user has to certain RoboDK features. Use FLAG_ROBODK_* variables to set one or more flags. More... | |
void | setFlagsItem (Item item, int flags=FLAG_ITEM_ALL) |
Update item flags. Item flags allow defining how much access the user has to item-specific features. Use FLAG_ITEM_* flags to set one or more flags. More... | |
int | getFlagsItem (Item item) |
Retrieve current item flags. Item flags allow defining how much access the user has to item-specific features. Use FLAG_ITEM_* flags to set one or more flags. More... | |
void | ShowMessage (const QString &message, bool popup=true) |
Show a message in RoboDK (it can be blocking or non blocking in the status bar) More... | |
void | Copy (const Item &tocopy) |
Makes a copy of an item (same as Ctrl+C), which can be pasted (Ctrl+V) using Paste(). More... | |
Item | Paste (const Item *paste_to=nullptr) |
Paste the copied item as a dependency of another item (same as Ctrl+V). Paste should be used after Copy(). It returns the newly created item. More... | |
Item | AddFile (const QString &filename, const Item *parent=nullptr) |
Loads a file and attaches it to parent. It can be any file supported by RoboDK. More... | |
void | Save (const QString &filename, const Item *itemsave=nullptr) |
Save an item to a file. If no item is provided, the open station is saved. More... | |
Item | AddShape (tMatrix2D *trianglePoints, Item *addTo=nullptr, bool shapeOverride=false, Color *color=nullptr) |
Adds a shape provided triangle coordinates. Triangles must be provided as a list of vertices. A vertex normal can be provided optionally. More... | |
Item | AddCurve (tMatrix2D *curvePoints, Item *referenceObject=nullptr, bool addToRef=false, int ProjectionType=PROJECTION_ALONG_NORMAL_RECALC) |
Adds a curve provided point coordinates. The provided points must be a list of vertices. A vertex normal can be provided optionally. More... | |
Item | AddPoints (tMatrix2D *points, Item *referenceObject=nullptr, bool addToRef=false, int ProjectionType=PROJECTION_ALONG_NORMAL_RECALC) |
Adds a list of points to an object. The provided points must be a list of vertices. A vertex normal can be provided optionally. More... | |
void | ProjectPoints (tMatrix2D *points, tMatrix2D **projected, Item objectProject, int ProjectionType=PROJECTION_ALONG_NORMAL_RECALC) |
Projects a point given its coordinates. The provided points must be a list of [XYZ] coordinates. Optionally, a vertex normal can be provided [XYZijk]. More... | |
void | CloseStation () |
Close the current station without asking to save. More... | |
Item | AddTarget (const QString &name, Item *itemparent=nullptr, Item *itemrobot=nullptr) |
Adds a new target that can be reached with a robot. More... | |
Item | AddFrame (const QString &name, Item *itemparent=nullptr) |
Adds a new Frame that can be referenced by a robot. More... | |
Item | AddProgram (const QString &name, Item *itemrobot=nullptr) |
Adds a new Frame that can be referenced by a robot. More... | |
Item | AddStation (const QString &name) |
Add a new empty station. It returns the station item added. More... | |
Item | AddMachiningProject (const QString &name="Curve follow settings", Item *itemrobot=nullptr) |
Add a new robot machining project. Machining projects can also be used for 3D printing, following curves and following points. It returns the newly created Item containing the project settings. Tip: Use the macro /RoboDK/Library/Macros/MoveRobotThroughLine.py to see an example that creates a new "curve follow project" given a list of points to follow(Option 4). More... | |
QList< Item > | getOpenStation () |
Returns the list of open stations in RoboDK. More... | |
void | setActiveStation (Item stn) |
Set the active station (project currently visible). More... | |
Item | getActiveStation () |
Returns the active station item (station currently visible). More... | |
int | RunProgram (const QString &function_w_params) |
Adds a function call in the program output. RoboDK will handle the syntax when the code is generated for a specific robot. If the program exists it will also run the program in simulate mode. More... | |
int | RunCode (const QString &code, bool code_is_fcn_call=false) |
Adds code to run in the program output. If the program exists it will also run the program in simulation mode. More... | |
void | RunMessage (const QString &message, bool message_is_comment=false) |
Shows a message or a comment in the output robot program. More... | |
void | Render (bool always_render=false) |
Update the scene. More... | |
void | Update () |
Update the screen. This updates the position of all robots and internal links according to previously set values. More... | |
bool | IsInside (Item object_inside, Item object_parent) |
Check if an object is fully inside another one. More... | |
int | setCollisionActive (int check_state=COLLISION_ON) |
Turn collision checking ON or OFF (COLLISION_OFF/COLLISION_OFF) according to the collision map. If collision checking is activated it returns the number of pairs of objects that are currently in a collision state. More... | |
bool | setCollisionActivePair (int check_state, Item item1, Item item2, int id1=0, int id2=0) |
Set collision checking ON or OFF (COLLISION_ON/COLLISION_OFF) for a specific pair of objects. This allows altering the collision map for Collision checking. Specify the link id for robots or moving mechanisms (id 0 is the base). More... | |
int | Collisions () |
Returns the number of pairs of objects that are currently in a collision state. More... | |
int | Collision (Item item1, Item item2) |
Returns 1 if item1 and item2 collided. Otherwise returns 0. More... | |
QList< Item > | getCollisionItems (QList< int > link_id_list) |
Return the list of items that are in a collision state. This function can be used after calling Collisions() to retrieve the items that are in a collision state. More... | |
void | setSimulationSpeed (double speed) |
Sets the current simulation speed. Set the speed to 1 for a real-time simulation. The slowest speed allowed is 0.001 times the real speed. Set to a high value (>100) for fast simulation results. More... | |
double | SimulationSpeed () |
Gets the current simulation speed. Set the speed to 1 for a real-time simulation. More... | |
void | setRunMode (int run_mode=1) |
Sets the behavior of the RoboDK API. By default, RoboDK shows the path simulation for movement instructions (run_mode=1=RUNMODE_SIMULATE). Setting the run_mode to RUNMODE_QUICKVALIDATE allows performing a quick check to see if the path is feasible. if robot.Connect() is used, RUNMODE_RUN_FROM_PC is selected automatically. More... | |
int | RunMode () |
Returns the behavior of the RoboDK API. By default, RoboDK shows the path simulation for movement instructions (run_mode=1). More... | |
QList< QPair< QString, QString > > | getParams () |
Gets all the user parameters from the open RoboDK station. The parameters can also be modified by right clicking the station and selecting "shared parameters" User parameters can be added or modified by the user More... | |
QString | getParam (const QString ¶m) |
Gets a global or a user parameter from the open RoboDK station. The parameters can also be modified by right clicking the station and selecting "shared parameters" Some available parameters: PATH_OPENSTATION = folder path of the current .stn file FILE_OPENSTATION = file path of the current .stn file PATH_DESKTOP = folder path of the user's folder Other parameters can be added or modified by the user More... | |
void | setParam (const QString ¶m, const QString &value) |
Sets a global parameter from the RoboDK station. If the parameters exists, it will be modified. If not, it will be added to the station. The parameters can also be modified by right clicking the station and selecting "shared parameters". More... | |
QString | Command (const QString &cmd, const QString &value="") |
Send a special command. These commands are meant to have a specific effect in RoboDK, such as changing a specific setting or provoke specific events. More... | |
bool | LaserTrackerMeasure (tXYZ xyz, tXYZ estimate, bool search=false) |
Takes a laser tracker measurement with respect to its own reference frame. If an estimate point is provided, the laser tracker will first move to those coordinates. If search is True, the tracker will search for a target. More... | |
bool | CollisionLine (tXYZ p1, tXYZ p2) |
Checks the collision between a line and any objects in the station. The line is composed by 2 points. Returns the collided item. Use Item.Valid() to check if there was a valid collision. More... | |
void | setVisible (QList< Item > itemList, QList< bool > visibleList, QList< int > visibleFrames) |
Set a list of items visibile (faster than the default setVisible()) | |
void | ShowAsCollided (QList< Item > itemList, QList< bool > collidedList, QList< int > *robot_link_id=nullptr) |
Show a list of items as collided. More... | |
void | CalibrateTool (tMatrix2D *poses_joints, tXYZ tcp_xyz, int format=EULER_RX_RY_RZ, int algorithm=CALIBRATE_TCP_BY_POINT, Item *robot=nullptr, double *error_stats=nullptr) |
Calibrate a tool (TCP) given a number of points or calibration joints. Important: If the robot is calibrated, provide joint values to maximize accuracy. More... | |
Mat | CalibrateReference (tMatrix2D *poses_joints, int method=CALIBRATE_FRAME_3P_P1_ON_X, bool use_joints=false, Item *robot=nullptr) |
Calibrate a Reference Frame given a list of points or joint values. Important: If the robot is calibrated, provide joint values to maximize accuracy. More... | |
int | ProgramStart (const QString &progname, const QString &defaultfolder="", const QString &postprocessor="", Item *robot=nullptr) |
Defines the name of the program when the program is generated. It is also possible to specify the name of the post processor as well as the folder to save the program. This method must be called before any program output is generated (before any robot movement or other instruction). More... | |
void | setViewPose (const Mat &pose) |
Set the pose of the wold reference frame with respect to the user view (camera/screen). More... | |
Mat | ViewPose () |
Get the pose of the wold reference frame with respect to the user view (camera/screen). More... | |
Item | Cam2D_Add (const Item &item_object, const QString &cam_params, const Item *cam_item=nullptr) |
Add a simulated 2D or depth camera as an item. Use Delete to delete it. More... | |
int | Cam2D_Snapshot (const QString &file_save_img, const Item &cam_item, const QString ¶ms="") |
Take a snapshot of a simulated camera and save it as an image. More... | |
int | Cam2D_SetParams (const QString &cam_params, const Item &cam_item) |
Set the camera parameters. More... | |
bool | setRobotParams (Item *robot, tMatrix2D dhm, Mat poseBase, Mat poseTool) |
Set the nominal robot parameters. More... | |
Item | getCursorXYZ (int x=-1, int y=-1, tXYZ xyzStation=nullptr) |
Returns the position of the cursor as XYZ coordinates (by default), or the 3D position of a given set of 2D coordinates of the window (x & y coordinates in pixels from the top left corner) The XYZ coordinates returned are given with respect to the RoboDK station(absolute reference). If no coordinates are provided, the current position of the cursor is retrieved. More... | |
QString | License () |
Returns the license as a readable string (same name shown in the RoboDK's title bar, on top of the main menu). More... | |
QList< Item > | Selection () |
Returns the list of items selected (it can be one or more items). More... | |
void | setSelection (QList< Item > list_items) |
Sets the selection in the tree (it can be one or more items). More... | |
void | PluginLoad (const QString &pluginName, int load=1) |
Load or unload the specified plugin (path to DLL, dylib or SO file). If the plugin is already loaded it will unload the plugin and reload it. Pass an empty plugin_name to reload all plugins. More... | |
QString | PluginCommand (const QString &pluginName, const QString &pluginCommand, const QString &pluginValue="") |
Send a specific command to a RoboDK plugin. The command and value (optional) must be handled by your plugin. It returns the result as a string. More... | |
Item | Popup_ISO9283_CubeProgram (Item *robot=nullptr, tXYZ center=nullptr, double side=-1, bool blocking=true) |
Show the popup menu to create the ISO9283 path for position accuracy, repeatability and path accuracy performance testing. More... | |
bool | FileSet (const QString &file_local, const QString &file_remote="", bool load_file=true, Item *attach_to=nullptr) |
Send file from the current location to the RoboDK instance. More... | |
bool | FileGet (const QString &path_file_local, Item *station=nullptr, const QString path_file_remote="") |
Retrieve a file from the RoboDK running instance. More... | |
bool | EmbedWindow (QString window_name, QString docked_name="", int size_w=-1, int size_h=-1, quint64 pid=0, int area_add=1, int area_allowed=15, int timeout=500) |
bool | EventsListen () |
bool | WaitForEvent (int &evt, Item &itm) |
bool | Event_Receive_3D_POS (double *data, int *valueCount) |
bool | Event_Receive_Mouse_data (int *data) |
bool | Event_Receive_Event_Moved (Mat *pose_rel_out) |
bool | Event_Connected () |
Private Member Functions | |
bool | _connected () |
bool | _connect () |
bool | _connect_smart () |
void | _disconnect () |
bool | _check_connection () |
bool | _check_status () |
bool | _waitline (QTcpSocket *com=nullptr) |
QString | _recv_Line (QTcpSocket *com=nullptr) |
bool | _send_Line (const QString &string, QTcpSocket *com=nullptr) |
int | _recv_Int (QTcpSocket *com=nullptr) |
bool | _send_Int (const qint32 value, QTcpSocket *com=nullptr) |
Item | _recv_Item (QTcpSocket *com=nullptr) |
bool | _send_Item (const Item *item) |
bool | _send_Item (const Item &item) |
Mat | _recv_Pose (QTcpSocket *com=nullptr) |
bool | _send_Pose (const Mat &pose) |
bool | _recv_XYZ (tXYZ pos) |
bool | _send_XYZ (const tXYZ pos) |
bool | _recv_Array (double *values, int *psize=nullptr, QTcpSocket *com=nullptr) |
bool | _send_Array (const double *values, int nvalues) |
bool | _recv_Array (tJoints *jnts) |
bool | _send_Array (const tJoints *jnts) |
bool | _send_Array (const Mat *mat) |
bool | _recv_Matrix2D (tMatrix2D **mat) |
bool | _send_Matrix2D (tMatrix2D *mat) |
void | _moveX (const Item *target, const tJoints *joints, const Mat *mat_target, const Item *itemrobot, int movetype, bool blocking) |
void | _moveC (const Item *target1, const tJoints *joints1, const Mat *mat_target1, const Item *target2, const tJoints *joints2, const Mat *mat_target2, const Item *itemrobot, bool blocking) |
Private Attributes | |
QTcpSocket * | _COM |
QTcpSocket * | _COM_EVT |
QString | _IP |
int | _PORT |
int | _TIMEOUT |
qint64 | _PROCESS |
QString | _ROBODK_BIN |
QString | _ARGUMENTS |
Friends | |
class | RoboDK_API::Item |
This class is the iterface to the RoboDK API. With the RoboDK API 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 the RoboDK tree (it can be either a robot, an object, a tool, a frame, a program, ...).
Definition at line 762 of file robodk_api.h.
anonymous enum |
Tree item types.
Enumerator | |
---|---|
ITEM_TYPE_ANY | Any item type. |
ITEM_TYPE_STATION | Item of type station (RDK file). |
ITEM_TYPE_ROBOT | Item of type robot (.robot file). |
ITEM_TYPE_FRAME | Item of type reference frame. |
ITEM_TYPE_TOOL | Item of type tool (.tool). |
ITEM_TYPE_OBJECT | Item of type object (.stl, .step or .iges for example). |
ITEM_TYPE_TARGET | Target item. |
ITEM_TYPE_PROGRAM | Program item. |
ITEM_TYPE_INSTRUCTION | Instruction. |
ITEM_TYPE_PROGRAM_PYTHON | Python macro. |
ITEM_TYPE_MACHINING | Robot machining project, curve follow, point follow or 3D printing project. |
ITEM_TYPE_BALLBARVALIDATION | Ballbar validation project. |
ITEM_TYPE_CALIBPROJECT | Robot calibration project. |
ITEM_TYPE_VALID_ISO9283 | Robot path accuracy validation project. |
Definition at line 1325 of file robodk_api.h.
anonymous enum |
Instruction types.
Definition at line 1370 of file robodk_api.h.
anonymous enum |
Instruction program call type:
Definition at line 1553 of file robodk_api.h.
anonymous enum |
Object selection features:
Enumerator | |
---|---|
FEATURE_NONE | No selection. |
FEATURE_SURFACE | Surface selection. |
FEATURE_CURVE | Curve selection. |
FEATURE_POINT | Point selection. |
Definition at line 1571 of file robodk_api.h.
anonymous enum |
Spray gun simulation:
Enumerator | |
---|---|
SPRAY_OFF | Activate the spray simulation. |
Definition at line 1586 of file robodk_api.h.
anonymous enum |
Collision checking state.
Enumerator | |
---|---|
COLLISION_OFF | Do not use collision checking. |
COLLISION_ON | Use collision checking. |
Definition at line 1593 of file robodk_api.h.
anonymous enum |
Definition at line 1602 of file robodk_api.h.
anonymous enum |
RoboDK Window Flags.
Enumerator | |
---|---|
FLAG_ROBODK_TREE_ACTIVE | Allow using the RoboDK station tree. |
FLAG_ROBODK_3DVIEW_ACTIVE | Allow using the 3D navigation. |
FLAG_ROBODK_LEFT_CLICK | Allow left clicks on the 3D navigation screen. |
FLAG_ROBODK_RIGHT_CLICK | Allow right clicks on the 3D navigation screen. |
FLAG_ROBODK_DOUBLE_CLICK | Allow double clicks on the 3D navigation screen. |
FLAG_ROBODK_MENU_ACTIVE | Enable/display the menu bar. |
FLAG_ROBODK_MENUFILE_ACTIVE | Enable the file menu (FLAG_ROBODK_MENU_ACTIVE must be allowed). |
FLAG_ROBODK_MENUEDIT_ACTIVE | Enable the edit menu (FLAG_ROBODK_MENU_ACTIVE must be allowed). |
FLAG_ROBODK_MENUPROGRAM_ACTIVE | Enable the program menu (FLAG_ROBODK_MENU_ACTIVE must be allowed). |
FLAG_ROBODK_MENUTOOLS_ACTIVE | Enable the tools menu (FLAG_ROBODK_MENU_ACTIVE must be allowed). |
FLAG_ROBODK_MENUUTILITIES_ACTIVE | Enable the utilities menu (FLAG_ROBODK_MENU_ACTIVE must be allowed). |
FLAG_ROBODK_MENUCONNECT_ACTIVE | Enable the connect menu (FLAG_ROBODK_MENU_ACTIVE must be allowed). |
FLAG_ROBODK_WINDOWKEYS_ACTIVE | Allow using keyboard shortcuts. |
FLAG_ROBODK_NONE | Disallow everything. |
FLAG_ROBODK_ALL | Allow everything (default). |
FLAG_ROBODK_MENU_ACTIVE_ALL | Allow using the full menu. |
Definition at line 1618 of file robodk_api.h.
anonymous enum |
Enumerator | |
---|---|
FLAG_ITEM_SELECTABLE | Allow selecting RoboDK items. |
FLAG_ITEM_EDITABLE | Allow modifying RoboDK items. |
FLAG_ITEM_DRAGALLOWED | Allow draggin an item. |
FLAG_ITEM_DROPALLOWED | Allow dropping to an item. |
FLAG_ITEM_ENABLED | Enable the item. |
FLAG_ITEM_AUTOTRISTATE | Allow having nested items, expand and collapse the item. |
FLAG_ITEM_NOCHILDREN | Do not allow adding nested items. |
FLAG_ITEM_NONE | Disallow everything. |
FLAG_ITEM_ALL | Allow everything (default). |
Definition at line 1669 of file robodk_api.h.
anonymous enum |
Movement types.
Enumerator | |
---|---|
MOVE_TYPE_INVALID | Invalid robot movement. |
MOVE_TYPE_JOINT | Joint axes movement (MoveJ). |
MOVE_TYPE_LINEAR | Linear movement (MoveL). |
MOVE_TYPE_CIRCULAR | Circular movement (MoveC). |
Definition at line 1406 of file robodk_api.h.
anonymous enum |
Script execution types used by IRoboDK.setRunMode and IRoboDK.RunMode.
Definition at line 1421 of file robodk_api.h.
anonymous enum |
Program execution type.
Enumerator | |
---|---|
PROGRAM_RUN_ON_SIMULATOR | Set the robot program to run on the simulator. |
PROGRAM_RUN_ON_ROBOT | Set the robot program to run on the robot. |
Definition at line 1442 of file robodk_api.h.
anonymous enum |
TCP calibration types.
Enumerator | |
---|---|
CALIBRATE_TCP_BY_POINT | Calibrate the TCP by poses touching the same point. |
CALIBRATE_TCP_BY_PLANE | Calibrate the TCP by poses touching the same plane. |
Definition at line 1451 of file robodk_api.h.
anonymous enum |
Reference frame calibration types.
Definition at line 1461 of file robodk_api.h.
anonymous enum |
projection types (for AddCurve)
Definition at line 1476 of file robodk_api.h.
anonymous enum |
Euler type.
Definition at line 1497 of file robodk_api.h.
anonymous enum |
State of the RoboDK window.
Enumerator | |
---|---|
WINDOWSTATE_HIDDEN | Hide the RoboDK window. RoboDK will keep running as a process. |
WINDOWSTATE_SHOW | Display the RoboDK window. |
WINDOWSTATE_MINIMIZED | Minimize the RoboDK window. |
WINDOWSTATE_NORMAL | Display the RoboDK window in a normal state (not maximized) |
WINDOWSTATE_MAXIMIZED | Maximize the RoboDK Window. |
WINDOWSTATE_FULLSCREEN | Make the RoboDK window fullscreen. |
WINDOWSTATE_CINEMA | Display RoboDK in cinema mode (hide the toolbar and the menu). |
WINDOWSTATE_FULLSCREEN_CINEMA | Display RoboDK in cinema mode and fullscreen. |
Definition at line 1525 of file robodk_api.h.
RoboDK | ( | const QString & | robodk_ip = "" , |
int | com_port = -1 , |
||
const QString & | args = "" , |
||
const QString & | path = "" |
||
) |
Definition at line 2102 of file robodk_api.cpp.
~RoboDK | ( | ) |
Definition at line 2122 of file robodk_api.cpp.
|
private |
Definition at line 3413 of file robodk_api.cpp.
|
private |
Definition at line 3424 of file robodk_api.cpp.
|
private |
Definition at line 3499 of file robodk_api.cpp.
|
private |
Definition at line 3465 of file robodk_api.cpp.
|
private |
Definition at line 3408 of file robodk_api.cpp.
|
private |
Definition at line 3457 of file robodk_api.cpp.
|
private |
Definition at line 3854 of file robodk_api.cpp.
|
private |
Definition at line 3827 of file robodk_api.cpp.
|
private |
Definition at line 3732 of file robodk_api.cpp.
|
private |
Definition at line 3711 of file robodk_api.cpp.
|
private |
Definition at line 3580 of file robodk_api.cpp.
|
private |
Definition at line 3606 of file robodk_api.cpp.
|
private |
Definition at line 3554 of file robodk_api.cpp.
|
private |
Definition at line 3774 of file robodk_api.cpp.
|
private |
Definition at line 3639 of file robodk_api.cpp.
|
private |
Definition at line 3680 of file robodk_api.cpp.
|
private |
Definition at line 3760 of file robodk_api.cpp.
|
private |
Definition at line 3720 of file robodk_api.cpp.
|
private |
Definition at line 3714 of file robodk_api.cpp.
|
private |
Definition at line 3596 of file robodk_api.cpp.
|
private |
Definition at line 3635 of file robodk_api.cpp.
|
private |
Definition at line 3625 of file robodk_api.cpp.
|
private |
Definition at line 3570 of file robodk_api.cpp.
|
private |
Definition at line 3807 of file robodk_api.cpp.
|
private |
Definition at line 3666 of file robodk_api.cpp.
|
private |
Definition at line 3699 of file robodk_api.cpp.
|
private |
Definition at line 3542 of file robodk_api.cpp.
Item AddCurve | ( | tMatrix2D * | curvePoints, |
Item * | referenceObject = nullptr , |
||
bool | addToRef = false , |
||
int | ProjectionType = PROJECTION_ALONG_NORMAL_RECALC |
||
) |
Adds a curve provided point coordinates. The provided points must be a list of vertices. A vertex normal can be provided optionally.
curve_points | matrix 3xN or 6xN -> N must be multiple of 3 |
reference_object | object to add the curve and/or project the curve to the surface |
add_to_ref | If True, the curve will be added as part of the object in the RoboDK item tree (a reference object must be provided) |
projection_type | Type of projection. For example: PROJECTION_ALONG_NORMAL_RECALC will project along the point normal and recalculate the normal vector on the surface projected. |
curvePoints | matrix 3xN or 6xN -> N must be multiple of 3 |
referenceObject | object to add the curve and/or project the curve to the surface |
addToRef | If True, the curve will be added as part of the object in the RoboDK item tree (a reference object must be provided) |
projectionType | Type of projection. For example: ProjectionType.AlongNormalRecalc will project along the point normal and recalculate the normal vector on the surface projected. |
Definition at line 2474 of file robodk_api.cpp.
Loads a file and attaches it to parent. It can be any file supported by RoboDK.
Loads a file and attaches it to parent. It can be any file supported by robodk.
filename | Absolute path of the file. |
parent | Parent to attach. Leave empty for new stations or to load an object at the station root. |
filename | absolute path of the file |
parent | parent to attach. Leave empty for new stations or to load an object at the station root |
Definition at line 2401 of file robodk_api.cpp.
Adds a new Frame that can be referenced by a robot.
name | Name of the reference frame. |
itemparent | Parent to attach to (such as the robot base frame). |
name | name of the reference frame |
itemparent | parent to attach to (such as the robot base frame) |
Definition at line 2569 of file robodk_api.cpp.
Item AddMachiningProject | ( | const QString & | name = "Curve follow settings" , |
Item * | itemrobot = nullptr |
||
) |
Add a new robot machining project. Machining projects can also be used for 3D printing, following curves and following points. It returns the newly created Item containing the project settings. Tip: Use the macro /RoboDK/Library/Macros/MoveRobotThroughLine.py to see an example that creates a new "curve follow project" given a list of points to follow(Option 4).
Add a new robot machining project. Machining projects can also be used for 3D printing, following curves and following points. It returns the newly created :class:.IItem
containing the project settings. Tip: Use the macro /RoboDK/Library/Macros/MoveRobotThroughLine.py to see an example that creates a new "curve follow project" given a list of points to follow(Option 4).
name | Name of the project settings. |
itemrobot | Robot to use for the project settings(optional). It is not required to specify the robot if only one robot or mechanism is available in the RoboDK station. |
name | Name of the project settings |
itemrobot | Robot to use for the project settings(optional). It is not required to specify the robot if only one robot or mechanism is available in the RoboDK station. |
Definition at line 2603 of file robodk_api.cpp.
Item AddPoints | ( | tMatrix2D * | points, |
Item * | referenceObject = nullptr , |
||
bool | addToRef = false , |
||
int | ProjectionType = PROJECTION_ALONG_NORMAL_RECALC |
||
) |
Adds a list of points to an object. The provided points must be a list of vertices. A vertex normal can be provided optionally.
points | list of points as a matrix (3xN matrix, or 6xN to provide point normals as ijk vectors) |
reference_object | item to attach the newly added geometry (optional) |
add_to_ref | If True, the points will be added as part of the object in the RoboDK item tree (a reference object must be provided) |
projection_type | Type of projection.Use the PROJECTION_* flags. |
points | list of points as a matrix (3xN matrix, or 6xN to provide point normals as ijk vectors) |
referenceObject | item to attach the newly added geometry (optional) |
addToRef | If True, the points will be added as part of the object in the RoboDK item tree (a reference object must be provided) |
projectionType | Type of projection.Use the PROJECTION_* flags. |
Definition at line 2495 of file robodk_api.cpp.
Adds a new Frame that can be referenced by a robot.
name | Name of the program. |
itemrobot | Robot that will be used. |
name | name of the program |
itemparent | robot that will be used |
Definition at line 2585 of file robodk_api.cpp.
Item AddShape | ( | tMatrix2D * | trianglePoints, |
Item * | addTo = nullptr , |
||
bool | shapeOverride = false , |
||
Color * | color = nullptr |
||
) |
Adds a shape provided triangle coordinates. Triangles must be provided as a list of vertices. A vertex normal can be provided optionally.
trianglePoints | List of vertices grouped by triangles (3xN or 6xN matrix, N must be multiple of 3 because vertices must be stacked by groups of 3) |
addTo | item to attach the newly added geometry (optional). Leave empty to create a new object. |
shapeOverride | Set to true to replace any other existing geometry |
color | Optionally specify the color as RGBA [0-1] |
trianglePoints | List of vertices grouped by triangles (3xN or 6xN matrix, N must be multiple of 3 because vertices must be stacked by groups of 3) |
addTo | item to attach the newly added geometry (optional). Leave empty to create a new object. |
shapeOverride | Set to true to replace any other existing geometry |
color | Color of the added shape |
Definition at line 2438 of file robodk_api.cpp.
Item AddStation | ( | const QString & | name | ) |
Add a new empty station. It returns the station item added.
Add a new empty station.
name | Name of the station (the title bar will be renamed to match the station name). |
name | Name of the station |
Definition at line 2523 of file robodk_api.cpp.
Adds a new target that can be reached with a robot.
name | Name of the target. |
itemparent | Parent to attach to (such as a frame). |
itemrobot | Main robot that will be used to go to self target. |
name | name of the target |
itemparent | parent to attach to (such as a frame) |
itemrobot | main robot that will be used to go to self target |
Definition at line 2552 of file robodk_api.cpp.
Mat CalibrateReference | ( | tMatrix2D * | poses_joints, |
int | method = CALIBRATE_FRAME_3P_P1_ON_X , |
||
bool | use_joints = false , |
||
Item * | robot = nullptr |
||
) |
Calibrate a Reference Frame given a list of points or joint values. Important: If the robot is calibrated, provide joint values to maximize accuracy.
joints | points as a 3xN matrix or nDOFsxN) - List of points or a list of robot joints. |
method | type of algorithm(by point, plane, ...) CALIBRATE_FRAME_... |
use_joints | use points or joint values. The robot item must be provided if joint values is used. |
robot | Robot used for the identification (if using joint values). |
joints | points as a 3xN matrix or nDOFsxN) - List of points or a list of robot joints |
method | type of algorithm(by point, plane, ...) CALIBRATE_FRAME_... |
use_joints | use points or joint values. The robot item must be provided if joint values is used. |
robot |
Definition at line 3026 of file robodk_api.cpp.
void CalibrateTool | ( | tMatrix2D * | poses_joints, |
tXYZ | tcp_xyz, | ||
int | format = EULER_RX_RY_RZ , |
||
int | algorithm = CALIBRATE_TCP_BY_POINT , |
||
Item * | robot = nullptr , |
||
double * | error_stats = nullptr |
||
) |
Calibrate a tool (TCP) given a number of points or calibration joints. Important: If the robot is calibrated, provide joint values to maximize accuracy.
poses_joints | matrix of poses in a given format or a list of joints |
error_stats | stats[mean, standard deviation, max] - Output error stats summary. |
format | Euler format. Optionally, use JOINT_FORMAT and provide the robot. |
algorithm | type of algorithm (by point, plane, ...) |
robot | Robot used for the identification (if using joint values). |
poses_joints | matrix of poses in a given format or a list of joints |
error_stats | stats[mean, standard deviation, max] - Output error stats summary |
format | Euler format. Optionally, use JOINT_FORMAT and provide the robot. |
algorithm | type of algorithm (by point, plane, ...) |
robot | Robot used for calibration (if using joint values) |
Definition at line 2997 of file robodk_api.cpp.
Item Cam2D_Add | ( | const Item & | item_object, |
const QString & | cam_params, | ||
const Item * | cam_item = nullptr |
||
) |
Add a simulated 2D or depth camera as an item. Use Delete to delete it.
item_object | Reference or object to attach the camera |
cam_params | Camera settings as described here: https://robodk.com/doc/en/PythonAPI/robodk.html#robodk.robolink.Robolink.Cam2D_Add |
cam_item | Provide an existing camera item to modify it |
Definition at line 3106 of file robodk_api.cpp.
int Cam2D_SetParams | ( | const QString & | cam_params, |
const Item & | cam_item | ||
) |
Set the camera parameters.
cam_params | Camera parameters: The same parameters that can be set using Cam2D_Add() |
cam_item | Camera item |
Definition at line 3129 of file robodk_api.cpp.
int Cam2D_Snapshot | ( | const QString & | file_save_img, |
const Item & | cam_item, | ||
const QString & | params = "" |
||
) |
Take a snapshot of a simulated camera and save it as an image.
file_save_img | file path to save. Formats supported include PNG, JPEG, TIFF, ... |
cam_item | Camera item |
params | additional options (use, "Grayscale", "Depth" or "Color" to modify the output of a camera snapshot) |
Definition at line 3116 of file robodk_api.cpp.
void CloseRoboDK | ( | ) |
Closes RoboDK window and finishes RoboDK execution
Definition at line 2274 of file robodk_api.cpp.
void CloseStation | ( | ) |
Close the current station without asking to save.
Closes the current station without suggesting to save
Definition at line 2539 of file robodk_api.cpp.
Returns 1 if item1 and item2 collided. Otherwise returns 0.
item1 | |
item2 |
item1 | |
item2 |
Definition at line 2789 of file robodk_api.cpp.
Checks the collision between a line and any objects in the station. The line is composed by 2 points. Returns the collided item. Use Item.Valid() to check if there was a valid collision.
p1 | Start point of the line (absolute coordinates). |
p2 | End point of the line (absolute coordinates). |
xyz_collision | Collided point. |
int Collisions | ( | ) |
Returns the number of pairs of objects that are currently in a collision state.
Definition at line 2775 of file robodk_api.cpp.
QString Command | ( | const QString & | cmd, |
const QString & | value = "" |
||
) |
Send a special command. These commands are meant to have a specific effect in RoboDK, such as changing a specific setting or provoke specific events.
cmd | Command Name, such as Trace, Threads or Window. |
value | Comand value (optional, not all commands require a value) |
cmd | Command Name, such as Trace, Threads or Window. |
value | Comand value (optional, not all commands require a value) |
Definition at line 2938 of file robodk_api.cpp.
bool Connect | ( | ) |
Definition at line 2145 of file robodk_api.cpp.
bool Connected | ( | ) |
Definition at line 2141 of file robodk_api.cpp.
void Copy | ( | const Item & | tocopy | ) |
Makes a copy of an item (same as Ctrl+C), which can be pasted (Ctrl+V) using Paste().
tocopy | Item to copy |
Definition at line 2374 of file robodk_api.cpp.
void Disconnect | ( | ) |
Disconnect from the RoboDK API. This flushes any pending program generation.
Definition at line 2152 of file robodk_api.cpp.
bool EmbedWindow | ( | QString | window_name, |
QString | docked_name = "" , |
||
int | size_w = -1 , |
||
int | size_h = -1 , |
||
quint64 | pid = 0 , |
||
int | area_add = 1 , |
||
int | area_allowed = 15 , |
||
int | timeout = 500 |
||
) |
Definition at line 3319 of file robodk_api.cpp.
bool Event_Connected | ( | ) |
Definition at line 3401 of file robodk_api.cpp.
bool Event_Receive_3D_POS | ( | double * | data, |
int * | valueCount | ||
) |
Definition at line 3375 of file robodk_api.cpp.
bool Event_Receive_Event_Moved | ( | Mat * | pose_rel_out | ) |
Definition at line 3388 of file robodk_api.cpp.
bool Event_Receive_Mouse_data | ( | int * | data | ) |
Definition at line 3380 of file robodk_api.cpp.
bool EventsListen | ( | ) |
Definition at line 3341 of file robodk_api.cpp.
bool FileGet | ( | const QString & | path_file_local, |
Item * | station = nullptr , |
||
const QString | path_file_remote = "" |
||
) |
Retrieve a file from the RoboDK running instance.
Definition at line 3296 of file robodk_api.cpp.
bool FileSet | ( | const QString & | file_local, |
const QString & | file_remote = "" , |
||
bool | load_file = true , |
||
Item * | attach_to = nullptr |
||
) |
Send file from the current location to the RoboDK instance.
Definition at line 3269 of file robodk_api.cpp.
void Finish | ( | ) |
Disconnect from the RoboDK API. This flushes any pending program generation.
Definition at line 2159 of file robodk_api.cpp.
Item getActiveStation | ( | ) |
Returns the active station item (station currently visible).
Returns the active station item (station currently visible)
Definition at line 2635 of file robodk_api.cpp.
QList< Item > getCollisionItems | ( | QList< int > | link_id_list | ) |
Return the list of items that are in a collision state. This function can be used after calling Collisions() to retrieve the items that are in a collision state.
link_id_list | List of robot link IDs that are in collision (0 for objects and tools). |
Definition at line 2799 of file robodk_api.cpp.
Returns the position of the cursor as XYZ coordinates (by default), or the 3D position of a given set of 2D coordinates of the window (x & y coordinates in pixels from the top left corner) The XYZ coordinates returned are given with respect to the RoboDK station(absolute reference). If no coordinates are provided, the current position of the cursor is retrieved.
x | X coordinate in pixels |
y | Y coordinate in pixels |
xyzStation |
Definition at line 3139 of file robodk_api.cpp.
int getFlagsItem | ( | Item | item | ) |
Retrieve current item flags. Item flags allow defining how much access the user has to item-specific features. Use FLAG_ITEM_* flags to set one or more flags.
item |
Definition at line 2337 of file robodk_api.cpp.
Item getItem | ( | QString | name, |
int | itemtype = -1 |
||
) |
Returns an item by its name. If there is no exact match it will return the last closest match.
name | Item name |
itemtype | Filter by item type RoboDK.ITEM_TYPE_... |
name | Item name |
type | Filter by item type RoboDK.ITEM_TYPE_... |
Definition at line 2171 of file robodk_api.cpp.
QList< Item > getItemList | ( | int | filter = -1 | ) |
Returns a list of items (list of names or pointers) of all available items in the currently open station in RoboDK. Optionally, use a filter to return specific items (example: getItemListNames(filter = ITEM_CASE_ROBOT))
Returns a list of items (list of name or pointers) of all available items in the currently open station in robodk. Optionally, use a filter to return specific items (example: getItemListNames(filter = ITEM_CASE_ROBOT))
filter | ITEM_TYPE |
filter | ITEM_TYPE |
Definition at line 2215 of file robodk_api.cpp.
QStringList getItemListNames | ( | int | filter = -1 | ) |
Returns a list of items (list of names or Items) of all available items in the currently open station in RoboDK. Optionally, use a filter to return specific items (example: getItemListNames(filter = ITEM_TYPE_ROBOT))
Returns a list of items (list of name or pointers) of all available items in the currently open station in robodk. Optionally, use a filter to return specific items (example: getItemListNames(filter = ITEM_CASE_ROBOT))
filter | ITEM_TYPE_... |
filter | ITEM_TYPE |
Definition at line 2192 of file robodk_api.cpp.
QList< Item > getOpenStation | ( | ) |
Returns the list of open stations in RoboDK.
Definition at line 2616 of file robodk_api.cpp.
QString getParam | ( | const QString & | param | ) |
Gets a global or a user parameter from the open RoboDK station. The parameters can also be modified by right clicking the station and selecting "shared parameters" Some available parameters: PATH_OPENSTATION = folder path of the current .stn file FILE_OPENSTATION = file path of the current .stn file PATH_DESKTOP = folder path of the user's folder Other parameters can be added or modified by the user
param | RoboDK parameter |
param | RoboDK parameter |
Definition at line 2905 of file robodk_api.cpp.
QList< QPair< QString, QString > > getParams | ( | ) |
Gets all the user parameters from the open RoboDK station. The parameters can also be modified by right clicking the station and selecting "shared parameters" User parameters can be added or modified by the user
Definition at line 2880 of file robodk_api.cpp.
void HideRoboDK | ( | ) |
Hides the RoboDK window. RoboDK will continue running in the background.
Hides the RoboDK window
Definition at line 2265 of file robodk_api.cpp.
Check if an object is fully inside another one.
Returns (1/True) if object_inside is inside the object_parent
object_inside | |
object_parent |
object_inside | |
object_parent |
Definition at line 2724 of file robodk_api.cpp.
Item ItemUserPick | ( | const QString & | message = "Pick one item" , |
int | itemtype = -1 |
||
) |
Shows a RoboDK popup to select one object from the open RoboDK station. An item type can be specified to filter desired items. If no type is specified, all items are selectable.
Shows a RoboDK popup to select one object from the open station. An item type can be specified to filter desired items. If no type is specified, all items are selectable.
message | Message to show in the pop up |
itemtype | optionally filter by RoboDK.ITEM_TYPE_* |
message | Message to pop up |
itemtype | optionally filter by RoboDK.ITEM_TYPE_* |
Definition at line 2241 of file robodk_api.cpp.
Takes a laser tracker measurement with respect to its own reference frame. If an estimate point is provided, the laser tracker will first move to those coordinates. If search is True, the tracker will search for a target.
xyz | |
estimate | |
search | True to search near the estimated value. |
Definition at line 2948 of file robodk_api.cpp.
QString License | ( | ) |
Returns the license as a readable string (same name shown in the RoboDK's title bar, on top of the main menu).
-------------------------------— add get/set robot parameters
Returns the license string (as shown in the RoboDK main window)
Definition at line 3166 of file robodk_api.cpp.
Paste the copied item as a dependency of another item (same as Ctrl+V). Paste should be used after Copy(). It returns the newly created item.
paste_to | Item to attach the copied item (optional) |
Definition at line 2386 of file robodk_api.cpp.
QString PluginCommand | ( | const QString & | pluginName, |
const QString & | pluginCommand, | ||
const QString & | pluginValue = "" |
||
) |
Send a specific command to a RoboDK plugin. The command and value (optional) must be handled by your plugin. It returns the result as a string.
Definition at line 3219 of file robodk_api.cpp.
void PluginLoad | ( | const QString & | pluginName, |
int | load = 1 |
||
) |
Load or unload the specified plugin (path to DLL, dylib or SO file). If the plugin is already loaded it will unload the plugin and reload it. Pass an empty plugin_name to reload all plugins.
Definition at line 3208 of file robodk_api.cpp.
Item Popup_ISO9283_CubeProgram | ( | Item * | robot = nullptr , |
tXYZ | center = nullptr , |
||
double | side = -1 , |
||
bool | blocking = true |
||
) |
Show the popup menu to create the ISO9283 path for position accuracy, repeatability and path accuracy performance testing.
Show the popup menu to create the ISO9283 path for path accuracy and performance testing
robot | |
center | XYZ position of the center of the cube with respect to the robot base, in mm. |
side | Cube side, in mm. |
Definition at line 3235 of file robodk_api.cpp.
quint64 ProcessID | ( | ) |
Definition at line 2126 of file robodk_api.cpp.
int ProgramStart | ( | const QString & | progname, |
const QString & | defaultfolder = "" , |
||
const QString & | postprocessor = "" , |
||
Item * | robot = nullptr |
||
) |
Defines the name of the program when the program is generated. It is also possible to specify the name of the post processor as well as the folder to save the program. This method must be called before any program output is generated (before any robot movement or other instruction).
progname | Name of the program. |
defaultfolder | Folder to save the program, leave empty to use the default program folder. |
postprocessor | Name of the post processor (for a post processor in C:/RoboDK/Posts/Fanuc_post.py it is possible to provide "Fanuc_post.py" or simply "Fanuc_post"). |
robot | Robot to link. |
Definition at line 3041 of file robodk_api.cpp.
void ProjectPoints | ( | tMatrix2D * | points, |
tMatrix2D ** | projected, | ||
Item | objectProject, | ||
int | ProjectionType = PROJECTION_ALONG_NORMAL_RECALC |
||
) |
Projects a point given its coordinates. The provided points must be a list of [XYZ] coordinates. Optionally, a vertex normal can be provided [XYZijk].
points | Matrix 3xN or 6xN: list of points to project. |
projected | Projected points as a null/empty matrix. A new matrix will be created |
object_project | Object to project. |
projection_type | Type of projection. For example: PROJECTION_ALONG_NORMAL_RECALC will project along the point normal and recalculate the normal vector on the surface projected. |
Definition at line 2507 of file robodk_api.cpp.
void Render | ( | bool | always_render = false | ) |
Update the scene.
Renders the scene. This function turns off rendering unless always_render is set to true.
flags | Set to RenderComplete for a full update or RenderScreen to redraw the scene without internally updating dependencies. |
always_render |
Definition at line 2698 of file robodk_api.cpp.
int RunCode | ( | const QString & | code, |
bool | code_is_fcn_call = false |
||
) |
Adds code to run in the program output. If the program exists it will also run the program in simulation mode.
Adds code to run in the program output. If the program exists it will also run the program in simulate mode.
code | |
code_is_fcn_call |
Definition at line 2671 of file robodk_api.cpp.
void RunMessage | ( | const QString & | message, |
bool | message_is_comment = false |
||
) |
Shows a message or a comment in the output robot program.
message | |
message_is_comment |
Definition at line 2686 of file robodk_api.cpp.
int RunMode | ( | ) |
Returns the behavior of the RoboDK API. By default, RoboDK shows the path simulation for movement instructions (run_mode=1).
Returns the behavior of the RoboDK API. By default, robodk shows the path simulation for movement instructions (run_mode=1)
Definition at line 2867 of file robodk_api.cpp.
int RunProgram | ( | const QString & | function_w_params | ) |
Adds a function call in the program output. RoboDK will handle the syntax when the code is generated for a specific robot. If the program exists it will also run the program in simulate mode.
function_w_params | Function name with parameters (if any). |
function_w_params | Function name with parameters (if any) |
Definition at line 2661 of file robodk_api.cpp.
void Save | ( | const QString & | filename, |
const Item * | itemsave = nullptr |
||
) |
Save an item to a file. If no item is provided, the open station is saved.
filename | Absolute path to save the file |
itemsave | Object or station to save. Leave empty to automatically save the current station. |
filename | absolute path to save the file |
itemsave | object or station to save. Leave empty to automatically save the current station. |
Definition at line 2418 of file robodk_api.cpp.
QList< Item > Selection | ( | ) |
Returns the list of items selected (it can be one or more items).
Returns the list of items selected (it can be one or more items)
Definition at line 3178 of file robodk_api.cpp.
void setActiveStation | ( | Item | station | ) |
Set the active station (project currently visible).
Set the active station (project currently visible)
station | station item, it can be previously loaded as an RDK file. |
station | station item, it can be previously loaded as an RDK file |
Definition at line 2647 of file robodk_api.cpp.
int setCollisionActive | ( | int | check_state = COLLISION_ON | ) |
Turn collision checking ON or OFF (COLLISION_OFF/COLLISION_OFF) according to the collision map. If collision checking is activated it returns the number of pairs of objects that are currently in a collision state.
Set collision checking ON or OFF (COLLISION_OFF/COLLISION_OFF) according to the collision map. If collision check is activated it returns the number of pairs of objects that are currently in a collision state.
check_state |
check_state |
Definition at line 2739 of file robodk_api.cpp.
Set collision checking ON or OFF (COLLISION_ON/COLLISION_OFF) for a specific pair of objects. This allows altering the collision map for Collision checking. Specify the link id for robots or moving mechanisms (id 0 is the base).
check_state | Set to COLLISION_ON or COLLISION_OFF |
item1 | Item 1 |
item2 | Item 2 |
id1 | Joint id for Item 1 (if Item 1 is a robot or a mechanism) |
id2 | Joint id for Item 2 (if Item 2 is a robot or a mechanism) |
Definition at line 2758 of file robodk_api.cpp.
void setFlagsItem | ( | Item | item, |
int | flags = FLAG_ITEM_ALL |
||
) |
Update item flags. Item flags allow defining how much access the user has to item-specific features. Use FLAG_ITEM_* flags to set one or more flags.
item | |
flags | New flags |
item | |
flags |
Definition at line 2324 of file robodk_api.cpp.
void setFlagsRoboDK | ( | int | flags = FLAG_ROBODK_ALL | ) |
Update the RoboDK flags. RoboDK flags allow defining how much access the user has to certain RoboDK features. Use FLAG_ROBODK_* variables to set one or more flags.
Update the RoboDK flags. RoboDK flags allow defining how much access the user has to RoboDK features. Use FLAG_ROBODK_* variables to set one or more flags.
flags | state of the window(FLAG_ROBODK_*) |
Definition at line 2312 of file robodk_api.cpp.
void setParam | ( | const QString & | param, |
const QString & | value | ||
) |
Sets a global parameter from the RoboDK station. If the parameters exists, it will be modified. If not, it will be added to the station. The parameters can also be modified by right clicking the station and selecting "shared parameters".
Sets a global parameter from the RoboDK station. If the parameters exists, it will be modified. If not, it will be added to the station. The parameters can also be modified by right clicking the station and selecting "shared parameters"
param | RoboDK parameter |
value | value |
Definition at line 2924 of file robodk_api.cpp.
Set the nominal robot parameters.
robot | |
dhm | D-H Modified table (Denavit Hartenberg Modified) |
poseBase | |
poseTool |
void setRunMode | ( | int | run_mode = 1 | ) |
Sets the behavior of the RoboDK API. By default, RoboDK shows the path simulation for movement instructions (run_mode=1=RUNMODE_SIMULATE). Setting the run_mode to RUNMODE_QUICKVALIDATE allows performing a quick check to see if the path is feasible. if robot.Connect() is used, RUNMODE_RUN_FROM_PC is selected automatically.
Sets the behavior of the RoboDK API. By default, robodk shows the path simulation for movement instructions (run_mode=1=RUNMODE_SIMULATE). Setting the run_mode to RUNMODE_QUICKVALIDATE allows performing a quick check to see if the path is feasible. if robot.Connect() is used, RUNMODE_RUN_FROM_PC is selected automatically.
run_mode | int = RUNMODE RUNMODE_SIMULATE=1 performs the simulation moving the robot (default) RUNMODE_QUICKVALIDATE=2 performs a quick check to validate the robot movements RUNMODE_MAKE_ROBOTPROG=3 makes the robot program RUNMODE_RUN_REAL=4 moves the real robot is it is connected |
Definition at line 2852 of file robodk_api.cpp.
void setSelection | ( | QList< Item > | list_items | ) |
Sets the selection in the tree (it can be one or more items).
Definition at line 3194 of file robodk_api.cpp.
void setSimulationSpeed | ( | double | speed | ) |
Sets the current simulation speed. Set the speed to 1 for a real-time simulation. The slowest speed allowed is 0.001 times the real speed. Set to a high value (>100) for fast simulation results.
speed | Simulation speed ratio (1 means real time simulation) |
speed |
Definition at line 2824 of file robodk_api.cpp.
void setViewPose | ( | const Mat & | pose | ) |
Set the pose of the wold reference frame with respect to the user view (camera/screen).
Set the pose of the wold reference frame with respect to the view (camera/screen)
pose | View pose. |
pose |
Definition at line 3057 of file robodk_api.cpp.
void setWindowState | ( | int | windowstate = WINDOWSTATE_NORMAL | ) |
Set the state of the RoboDK window
windowstate |
Definition at line 2300 of file robodk_api.cpp.
void ShowAsCollided | ( | QList< Item > | itemList, |
QList< bool > | collidedList, | ||
QList< int > * | robot_link_id = nullptr |
||
) |
Show a list of items as collided.
Definition at line 2963 of file robodk_api.cpp.
void ShowMessage | ( | const QString & | message, |
bool | popup = true |
||
) |
Show a message in RoboDK (it can be blocking or non blocking in the status bar)
message | Message to display |
popup | Set to true to make the message blocking or set to false to make it non blocking |
Definition at line 2351 of file robodk_api.cpp.
void ShowRoboDK | ( | ) |
Shows or raises the RoboDK window.
Shows or raises the RoboDK window
Definition at line 2256 of file robodk_api.cpp.
double SimulationSpeed | ( | ) |
Gets the current simulation speed. Set the speed to 1 for a real-time simulation.
Definition at line 2835 of file robodk_api.cpp.
void Update | ( | ) |
Update the screen. This updates the position of all robots and internal links according to previously set values.
Definition at line 2710 of file robodk_api.cpp.
QString Version | ( | ) |
Return the vesion of RoboDK as a 4 digit string: Major.Minor.Revision.Build
Definition at line 2282 of file robodk_api.cpp.
Mat ViewPose | ( | ) |
Get the pose of the wold reference frame with respect to the user view (camera/screen).
Get the pose of the wold reference frame with respect to the view (camera/screen)
pose |
Definition at line 3068 of file robodk_api.cpp.
bool WaitForEvent | ( | int & | evt, |
Item & | itm | ||
) |
Definition at line 3367 of file robodk_api.cpp.
quint64 WindowID | ( | ) |
Definition at line 2134 of file robodk_api.cpp.
|
friend |
Definition at line 763 of file robodk_api.h.
|
private |
Definition at line 1708 of file robodk_api.h.
|
private |
Definition at line 1700 of file robodk_api.h.
|
private |
Definition at line 1701 of file robodk_api.h.
|
private |
Definition at line 1702 of file robodk_api.h.
|
private |
Definition at line 1703 of file robodk_api.h.
|
private |
Definition at line 1705 of file robodk_api.h.
|
private |
Definition at line 1707 of file robodk_api.h.
|
private |
Definition at line 1704 of file robodk_api.h.