RoboDK Plug-In Interface
Loading...
Searching...
No Matches
irobodk.h
1#ifndef IROBODK_H
2#define IROBODK_H
3
4
5#include "robodktypes.h"
6#include <QString>
7
8
14class IRoboDK {
15
16public:
17
18 virtual ~IRoboDK(){}
19
20public:
21
57
75
96
105
115
133
154
182
212
230
245
250 SPRAY_ON = 1
251 };
252
261
321
326
329
332
335
338
341
344 FLAG_ITEM_USERTRISTATE = 256,
345
348
350 FLAG_ITEM_ALL = 64 + 32 + 8 + 4 + 2 + 1
351 };
352
367
369 enum TypeDraw {
372
375
378
380 DrawSpheres = 4
381 };
382
383
384public:
385
392 virtual Item getItem(const QString &name, int itemtype = -1)=0;
393
400 virtual QStringList getItemListNames(int filter = -1)=0;
401
408 virtual QList<Item> getItemList(int filter = -1)=0;
409
414 virtual bool Valid(const Item item_check)=0;
415
423 virtual Item ItemUserPick(const QString &message = "Pick one item", int itemtype = -1)=0;
424
433 virtual Item ItemUserPick(const QString &message, const QList<Item> &list_choices, int id_selected=-1)=0;
434
438 virtual void ShowRoboDK()=0;
439
443 virtual void HideRoboDK()=0;
444
448 virtual void CloseRoboDK()=0;
449
453 virtual QString Version()=0;
454
459 virtual void setWindowState(int windowstate = WINDOWSTATE_NORMAL)=0;
460
465 virtual void setFlagsRoboDK(int flags = FLAG_ROBODK_ALL)=0;
466
472 virtual void setFlagsItem(int flags = FLAG_ITEM_ALL, Item item=nullptr)=0;
473
479 virtual int getFlagsItem(Item item)=0;
480
481
487 virtual void ShowMessage(const QString &message, bool popup = true)=0;
488
495 virtual Item AddFile(const QString &filename, const Item parent=nullptr)=0;
496
502 virtual void Save(const QString &filename, const Item itemsave=nullptr)=0;
503
512 virtual Item AddShape(const tMatrix2D *trianglePoints, Item addTo = nullptr, bool shapeOverride = false, tColor *color = nullptr)=0;
513
514
523 virtual Item AddCurve(const tMatrix2D *curvePoints, Item referenceObject = nullptr,bool addToRef = false,int ProjectionType = PROJECTION_ALONG_NORMAL_RECALC)=0;
524
525
534 virtual Item AddPoints(const tMatrix2D *points, Item referenceObject = nullptr, bool addToRef = false, int ProjectionType = PROJECTION_ALONG_NORMAL_RECALC)=0;
535
543 virtual bool ProjectPoints(tMatrix2D *points, Item objectProject, int ProjectionType = PROJECTION_ALONG_NORMAL_RECALC)=0;
544
548 virtual void CloseStation()=0;
549
557 virtual Item AddTarget(const QString &name, Item itemparent = nullptr, Item itemrobot = nullptr)=0;
558
565 virtual Item AddFrame(const QString &name, Item itemparent = nullptr)=0;
566
573 virtual Item AddProgram(const QString &name, Item itemrobot = nullptr)=0;
574
579 virtual Item AddStation(QString name)=0;
580
589 virtual Item AddMachiningProject(QString name = "Curve follow settings", Item itemrobot = nullptr)=0;
590
595 virtual QList<Item> getOpenStations()=0;
596
601 virtual void setActiveStation(Item stn)=0;
602
608
614 virtual int RunProgram(const QString &function_w_params)=0;
615
622 virtual int RunCode(const QString &code, bool code_is_fcn_call = false)=0;
623
629 virtual void RunMessage(const QString &message, bool message_is_comment = false)=0;
630
635 virtual void Render(int flags=RenderComplete)=0;
636
643 virtual bool IsInside(Item object_inside, Item object_parent)=0;
644
650 virtual int setCollisionActive(int check_state = COLLISION_ON)=0;
651
662 virtual bool setCollisionActivePair(int check_state, Item item1, Item item2, int id1 = 0, int id2 = 0)=0;
663
668 virtual int Collisions()=0;
669
676 virtual int Collision(Item item1, Item item2)=0;
677
683 virtual QList<Item> getCollisionItems(QList<int> *link_id_list=nullptr)=0;
684
689 virtual void setSimulationSpeed(double speed)=0;
690
695 virtual double SimulationSpeed()=0;
696
707 virtual void setRunMode(int run_mode = 1)=0;
708
717 virtual int RunMode()=0;
718
725 virtual QList<QPair<QString, QString> > getParams()=0;
726
738 virtual QString getParam(const QString &param)=0;
739
740
748 virtual void setParam(const QString &param, const QString &value)=0;
749
756 virtual QString Command(const QString &cmd, const QString &value="")=0;
757
758
759 // --- add calibrate reference, calibrate tool, measure tracker, etc...
760
761
769 virtual bool LaserTrackerMeasure(tXYZ xyz, const tXYZ estimate, bool search = false)=0;
770
780 virtual bool MeasurePose(Mat *pose, double data[10], int target=-1, int time_avg_ms=0, const tXYZ tool_tip=nullptr)=0;
781
790 virtual bool CollisionLine(const tXYZ p1, const tXYZ p2)=0;
791
801 virtual void CalibrateTool(const 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)=0;
802
811 virtual Mat CalibrateReference(const tMatrix2D *poses_joints, int method = CALIBRATE_FRAME_3P_P1_ON_X, bool use_joints = false, Item robot = nullptr)=0;
812
822 virtual bool ProgramStart(const QString &progname, const QString &defaultfolder = "", const QString &postprocessor = "", Item robot = nullptr)=0;
823
824
829 virtual void setViewPose(const Mat &pose)=0;
830
835 virtual Mat ViewPose()=0;
836
845 virtual bool SetRobotParams(Item robot,tMatrix2D dhm, Mat poseBase, Mat poseTool)=0;
846
856 virtual Item getCursorXYZ(int x = -1, int y = -1, tXYZ xyzStation = nullptr)=0;
857
862 virtual QString License()=0;
863
868 virtual QList<Item> Selection()=0;
869
877 virtual Item Popup_ISO9283_CubeProgram(Item robot=nullptr, tXYZ center=nullptr, double side=-1)=0;
878
879
886 virtual QByteArray getData(const QString &param)=0;
887
888
896 virtual void setData(const QString &param, const QByteArray &value)=0;
897
898
901 virtual int CollisionActive()=0;
902
913 virtual bool DrawGeometry(int drawtype, float *vtx_pointer, int vtx_size, float color[4], float geo_size=2.0, float *vtx_normals=nullptr)=0;
914
924 virtual bool DrawTexture(const QImage *image, const float *vtx_pointer, const float *texture_coords, int num_triangles, float *vtx_normals=nullptr)=0;
925
926
927 //-----------------------------------------------------
928 // added after 2020-08-21 with version RoboDK 5.1.0
929
933 virtual void setSelection(const QList<Item> &listitems)=0;
934
942 virtual void setInteractiveMode(int mode_type, int default_ref_flags, const QList<Item> *custom_object=nullptr, int custom_ref_flags=0)=0;
943
949 virtual void PluginLoad(const QString &plugin_name="", int load=1)=0;
950
957 virtual QString PluginCommand(const QString &plugin_name="", const QString &plugin_command="", const QString &value="")=0;
958
965 virtual QByteArray getParamBytes(const QString &param)=0;
966
967
974 virtual void setParamBytes(const QString &param, const QByteArray &value)=0;
975
988 virtual int StereoCamera_Measure(Mat pose1, Mat pose2, int &npoints1, int &npoints2, double *data=nullptr, float time_avg=0, const tXYZ tip_xyz=nullptr)=0;
989
1006 virtual Item BuildMechanism(int type, const QList<Item> &list_obj, const double *parameters, const tJoints &joints_build, const tJoints &joints_home, const tJoints &joints_senses, const tJoints &joints_lim_low, const tJoints &joints_lim_high, const Mat base, const Mat tool, const QString &name, Item robot=nullptr)=0;
1007
1008
1009 //-----------------------------------------------------
1010 // added after 2021-09-17 with version RoboDK 5.3.0
1011
1012
1017 virtual Item Cam2D_Add(const Item attach_to, const QString &params="")=0;
1018
1023 virtual QImage Cam2D_Snapshot(const QString &file, const Item camera=nullptr, const QString &params="")=0;
1024
1025
1026
1030 virtual Item MergeItems(const QList<Item> &listitems)=0;
1031
1032 /*
1033
1034 SprayAdd
1035 */
1036
1037};
1038
1039
1040//Q_DECLARE_INTERFACE(IRoboDK, "RoboDK.IRoboDK")
1041
1042#endif // IROBODK_H
The Item class represents an item in RoboDK station. An item can be a robot, a frame,...
Definition iitem.h:14
This class is the iterface to the RoboDK API. With the RoboDK API you can automate certain tasks and ...
Definition irobodk.h:14
virtual void setParam(const QString &param, const QString &value)=0
Sets a global parameter from the RoboDK station. If the parameters exists, it will be modified....
virtual void setViewPose(const Mat &pose)=0
Set the pose of the wold reference frame with respect to the user view (camera/screen).
virtual Item AddCurve(const tMatrix2D *curvePoints, Item referenceObject=nullptr, bool addToRef=false, int ProjectionType=PROJECTION_ALONG_NORMAL_RECALC)=0
Adds a curve provided point coordinates. The provided points must be a list of vertices....
virtual void setFlagsItem(int flags=FLAG_ITEM_ALL, Item item=nullptr)=0
Update item flags. Item flags allow defining how much access the user has to item-specific features....
virtual int getFlagsItem(Item item)=0
Retrieve current item flags. Item flags allow defining how much access the user has to item-specific ...
virtual Item AddPoints(const tMatrix2D *points, Item referenceObject=nullptr, bool addToRef=false, int ProjectionType=PROJECTION_ALONG_NORMAL_RECALC)=0
Adds a list of points to an object. The provided points must be a list of vertices....
virtual QString Command(const QString &cmd, const QString &value="")=0
Send a special command. These commands are meant to have a specific effect in RoboDK,...
TypeRunMode
Script execution types used by IRoboDK.setRunMode and IRoboDK.RunMode.
Definition irobodk.h:77
@ RUNMODE_MAKE_ROBOTPROG_AND_START
Makes the robot program and starts it on the robot (independently from the PC).
Definition irobodk.h:91
@ RUNMODE_QUICKVALIDATE
Performs a quick check to validate the robot movements.
Definition irobodk.h:82
@ RUNMODE_RUN_ROBOT
Moves the real robot from the PC (PC is the client, the robot behaves like a server).
Definition irobodk.h:94
@ RUNMODE_MAKE_ROBOTPROG
Makes the robot program.
Definition irobodk.h:85
@ RUNMODE_MAKE_ROBOTPROG_AND_UPLOAD
Makes the robot program and updates it to the robot.
Definition irobodk.h:88
@ RUNMODE_SIMULATE
Performs the simulation moving the robot (default)
Definition irobodk.h:79
virtual void setWindowState(int windowstate=WINDOWSTATE_NORMAL)=0
Set the state of the RoboDK window.
virtual QString License()=0
Returns the license as a readable string (same name shown in the RoboDK's title bar,...
virtual bool DrawTexture(const QImage *image, const float *vtx_pointer, const float *texture_coords, int num_triangles, float *vtx_normals=nullptr)=0
Draw a texture in the RoboDK's 3D view. This function must be called only inside a PluginEvent of typ...
virtual bool DrawGeometry(int drawtype, float *vtx_pointer, int vtx_size, float color[4], float geo_size=2.0, float *vtx_normals=nullptr)=0
Draw geometry in the RoboDK's 3D view. This function must be called only inside a PluginEvent of type...
virtual Item getCursorXYZ(int x=-1, int y=-1, tXYZ xyzStation=nullptr)=0
Returns the position of the cursor as XYZ coordinates (by default), or the 3D position of a given set...
virtual Item AddProgram(const QString &name, Item itemrobot=nullptr)=0
Adds a new Frame that can be referenced by a robot.
virtual QList< Item > getCollisionItems(QList< int > *link_id_list=nullptr)=0
Return the list of items that are in a collision state. This function can be used after calling Colli...
virtual void setFlagsRoboDK(int flags=FLAG_ROBODK_ALL)=0
Update the RoboDK flags. RoboDK flags allow defining how much access the user has to certain RoboDK f...
TypeInstruction
Instruction types for programs.
Definition irobodk.h:23
@ INS_TYPE_MOVEC
Circular movement instruction.
Definition irobodk.h:31
@ INS_TYPE_CHANGEROBOT
Set the robot instruction (obsolete).
Definition irobodk.h:43
@ INS_TYPE_EVENT
Simulation event instruction.
Definition irobodk.h:49
@ INS_TYPE_CHANGESPEED
Set speed instruction.
Definition irobodk.h:34
@ INS_TYPE_CODE
Program call or raw code output.
Definition irobodk.h:52
@ INS_TYPE_INVALID
Invalid instruction.
Definition irobodk.h:25
@ INS_TYPE_MOVE
Linear or joint movement instruction.
Definition irobodk.h:28
@ INS_TYPE_PRINT
Display message on the teach pendant.
Definition irobodk.h:55
@ INS_TYPE_PAUSE
Pause instruction.
Definition irobodk.h:46
@ INS_TYPE_CHANGEFRAME
Set reference frame instruction.
Definition irobodk.h:37
@ INS_TYPE_CHANGETOOL
Set the tool (TCP) instruction.
Definition irobodk.h:40
virtual Item AddFrame(const QString &name, Item itemparent=nullptr)=0
Adds a new Frame that can be referenced by a robot.
virtual int RunProgram(const QString &function_w_params)=0
Adds a function call in the program output. RoboDK will handle the syntax when the code is generated ...
virtual Mat ViewPose()=0
Get the pose of the wold reference frame with respect to the user view (camera/screen).
virtual Item AddMachiningProject(QString name="Curve follow settings", Item itemrobot=nullptr)=0
Add a new robot machining project. Machining projects can also be used for 3D printing,...
virtual Item Cam2D_Add(const Item attach_to, const QString &params="")=0
Open a simulated 2D camera view. Returns a handle pointer that can be used in case more than one simu...
virtual Item ItemUserPick(const QString &message="Pick one item", int itemtype=-1)=0
Shows a RoboDK popup to select one object from the open RoboDK station. An item type can be specified...
virtual bool setCollisionActivePair(int check_state, Item item1, Item item2, int id1=0, int id2=0)=0
Set collision checking ON or OFF (COLLISION_ON/COLLISION_OFF) for a specific pair of objects....
virtual void CalibrateTool(const 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)=0
Calibrate a tool (TCP) given a number of points or calibration joints. Important: If the robot is cal...
virtual void ShowMessage(const QString &message, bool popup=true)=0
Show a message in RoboDK (it can be blocking or non blocking in the status bar)
virtual Item MergeItems(const QList< Item > &listitems)=0
Merge multiple object items as one. Source objects are not deleted and a new object is created.
virtual QList< Item > getOpenStations()=0
Returns the list of open stations in RoboDK.
virtual Item Popup_ISO9283_CubeProgram(Item robot=nullptr, tXYZ center=nullptr, double side=-1)=0
Show the popup menu to create the ISO9283 path for position accuracy, repeatability and path accuracy...
TypeCalibrateFrame
Reference frame calibration types.
Definition irobodk.h:117
@ CALIBRATE_TURNTABLE
Calibrate turntable.
Definition irobodk.h:128
@ CALIBRATE_FRAME_6P
Calibrate by 6 points.
Definition irobodk.h:125
@ CALIBRATE_FRAME_3P_P1_ORIGIN
Calibrate by 3 points: [Origin, X+, XY+] (p1 is origin).
Definition irobodk.h:122
@ CALIBRATE_FRAME_3P_P1_ON_X
Calibrate by 3 points: [X, X+, Y+] (p1 on X axis).
Definition irobodk.h:119
@ CALIBRATE_TURNTABLE_2X
Calibrate a 2 axis turntable.
Definition irobodk.h:131
virtual bool CollisionLine(const tXYZ p1, const tXYZ p2)=0
Checks the collision between a line and any objects in the station. The line is composed by 2 points....
virtual Item getActiveStation()=0
Returns the active station item (station currently visible).
virtual QImage Cam2D_Snapshot(const QString &file, const Item camera=nullptr, const QString &params="")=0
Take a snapshot from a simulated camera view and save it to a file. Returns 1 if success,...
virtual Item AddFile(const QString &filename, const Item parent=nullptr)=0
Loads a file and attaches it to parent. It can be any file supported by RoboDK.
virtual void setSelection(const QList< Item > &listitems)=0
Set the selection in the tree.
virtual int CollisionActive()=0
Returns the status of collision checking (COLLISION_ON=1 if the user want to have collision checking ...
virtual bool ProjectPoints(tMatrix2D *points, Item objectProject, int ProjectionType=PROJECTION_ALONG_NORMAL_RECALC)=0
Projects a list of points given its coordinates. The provided points must be a list of [XYZ] coordina...
virtual Mat CalibrateReference(const tMatrix2D *poses_joints, int method=CALIBRATE_FRAME_3P_P1_ON_X, bool use_joints=false, Item robot=nullptr)=0
Calibrate a Reference Frame given a list of points or joint values. Important: If the robot is calibr...
TypeFeature
Object features for selection and filtering.
Definition irobodk.h:232
@ FEATURE_SURFACE
Surface selection.
Definition irobodk.h:237
@ FEATURE_NONE
No selection.
Definition irobodk.h:234
@ FEATURE_CURVE
Curve selection.
Definition irobodk.h:240
@ FEATURE_POINT
Point selection.
Definition irobodk.h:243
virtual QList< Item > Selection()=0
Returns the list of items selected (it can be one or more items).
virtual void ShowRoboDK()=0
Shows or raises the RoboDK window.
virtual QStringList getItemListNames(int filter=-1)=0
Returns a list of items (list of names or Items) of all available items in the currently open station...
virtual QByteArray getParamBytes(const QString &param)=0
Gets a user parameter from the open RoboDK station (Bytes type). Special QByteArray parameters can be...
virtual bool SetRobotParams(Item robot, tMatrix2D dhm, Mat poseBase, Mat poseTool)=0
Set the nominal robot parameters.
TypeDraw
Display geometry in 3D, with respect to the station coordinate system. This should be called using Dr...
Definition irobodk.h:369
@ DrawTriangles
Draw surfaces.
Definition irobodk.h:371
@ DrawLines
Draw lines.
Definition irobodk.h:374
@ DrawSpheres
Draw spheres.
Definition irobodk.h:380
@ DrawPoints
Draw points.
Definition irobodk.h:377
virtual Item AddShape(const tMatrix2D *trianglePoints, Item addTo=nullptr, bool shapeOverride=false, tColor *color=nullptr)=0
Adds a shape provided triangle coordinates. Triangles must be provided as a list of vertices....
TypeCollision
Collision checking state.
Definition irobodk.h:254
@ COLLISION_ON
Use collision checking.
Definition irobodk.h:259
@ COLLISION_OFF
Do not use collision checking.
Definition irobodk.h:256
virtual void setRunMode(int run_mode=1)=0
Sets the behavior of the RoboDK API. By default, RoboDK shows the path simulation for movement instru...
TypeProjection
projection types for AddCurve
Definition irobodk.h:135
@ PROJECTION_NONE
No curve projection.
Definition irobodk.h:137
@ PROJECTION_RECALC
The normals are recalculated according to the surface normal of the closest projection....
Definition irobodk.h:152
@ PROJECTION_ALONG_NORMAL
The projection will be done along the normal.
Definition irobodk.h:143
@ PROJECTION_ALONG_NORMAL_RECALC
The projection will be done along the normal. Furthermore, the normal will be recalculated according ...
Definition irobodk.h:146
@ PROJECTION_CLOSEST
The projection will the closest point on the surface.
Definition irobodk.h:140
@ PROJECTION_CLOSEST_RECALC
The projection will be the closest point on the surface and the normals will be recalculated.
Definition irobodk.h:149
virtual int StereoCamera_Measure(Mat pose1, Mat pose2, int &npoints1, int &npoints2, double *data=nullptr, float time_avg=0, const tXYZ tip_xyz=nullptr)=0
Takes a measurement with a 6D measurement device. It returns two poses, the base reference frame and ...
TypeProgramRun
Program execution type.
Definition irobodk.h:98
@ PROGRAM_RUN_ON_SIMULATOR
Set the robot program to run on the simulator.
Definition irobodk.h:100
@ PROGRAM_RUN_ON_ROBOT
Set the robot program to run on the robot.
Definition irobodk.h:103
virtual void setActiveStation(Item stn)=0
Set the active station (project currently visible).
virtual bool IsInside(Item object_inside, Item object_parent)=0
Check if an object is fully inside another one.
virtual QList< QPair< QString, QString > > getParams()=0
Gets all the user parameters from the open RoboDK station. The parameters can also be modified by rig...
TypeMovement
Movement types.
Definition irobodk.h:59
@ MOVE_TYPE_INVALID
Invalid robot movement.
Definition irobodk.h:61
@ MOVE_TYPE_LINEAR
Linear movement (MoveL).
Definition irobodk.h:67
@ MOVE_TYPE_LINEARSEARCH
Linear search function.
Definition irobodk.h:73
@ MOVE_TYPE_JOINT
Joint axes movement (MoveJ).
Definition irobodk.h:64
@ MOVE_TYPE_CIRCULAR
Circular movement (MoveC).
Definition irobodk.h:70
virtual QString PluginCommand(const QString &plugin_name="", const QString &plugin_command="", const QString &value="")=0
Send a specific command to a RoboDK plugin. The command and value (optional) must be handled by your ...
virtual QList< Item > getItemList(int filter=-1)=0
Returns a list of items (list of names or pointers) of all available items in the currently open stat...
virtual bool MeasurePose(Mat *pose, double data[10], int target=-1, int time_avg_ms=0, const tXYZ tool_tip=nullptr)=0
Takes a pose measurement (requires a supported measurement system).
virtual Item AddTarget(const QString &name, Item itemparent=nullptr, Item itemrobot=nullptr)=0
Adds a new target that can be reached with a robot.
virtual QString getParam(const QString &param)=0
Gets a global or a user parameter from the open RoboDK station. The parameters can also be modified b...
virtual bool ProgramStart(const QString &progname, const QString &defaultfolder="", const QString &postprocessor="", Item robot=nullptr)=0
Defines the name of the program when the program is generated. It is also possible to specify the nam...
TypeRender
Different render levels to update the screen.
Definition irobodk.h:354
@ RenderComplete
Provokes an update and then screen display (full update and render).
Definition irobodk.h:365
@ RenderNone
Do not render the screen.
Definition irobodk.h:356
@ RenderUpdateOnly
Update all positions of modified items (robots, references and objects) and their child items.
Definition irobodk.h:362
@ RenderScreen
Redisplay the screen.
Definition irobodk.h:359
virtual Item BuildMechanism(int type, const QList< Item > &list_obj, const double *parameters, const tJoints &joints_build, const tJoints &joints_home, const tJoints &joints_senses, const tJoints &joints_lim_low, const tJoints &joints_lim_high, const Mat base, const Mat tool, const QString &name, Item robot=nullptr)=0
Takes a measurement with a 6D measurement device. It returns two poses, the base reference frame and ...
TypeInstructionCall
Instruction program call type:
Definition irobodk.h:214
@ INSTRUCTION_COMMENT
Comment output.
Definition irobodk.h:225
@ INSTRUCTION_START_THREAD
Instruction to start a parallel thread. Program execution will continue and also trigger a thread.
Definition irobodk.h:222
@ INSTRUCTION_CALL_PROGRAM
Instruction to call a program.
Definition irobodk.h:216
@ INSTRUCTION_INSERT_CODE
Instructio to insert raw code (this will not provoke a program call).
Definition irobodk.h:219
@ INSTRUCTION_SHOW_MESSAGE
Instruction to pop up a message on the robot teach pendant.
Definition irobodk.h:228
virtual void setSimulationSpeed(double speed)=0
Sets the current simulation speed. Set the speed to 1 for a real-time simulation. The slowest speed a...
virtual Item AddStation(QString name)=0
Add a new empty station. It returns the station item added.
virtual Item ItemUserPick(const QString &message, const QList< Item > &list_choices, int id_selected=-1)=0
Shows a RoboDK popup to select one object from the open RoboDK station. You can provide a few items t...
virtual int RunMode()=0
Returns the behavior of the RoboDK API. By default, RoboDK shows the path simulation for movement ins...
virtual void Save(const QString &filename, const Item itemsave=nullptr)=0
Save an item to a file. If no item is provided, the open station is saved.
TypeWindowState
State of the RoboDK window.
Definition irobodk.h:184
@ WINDOWSTATE_CINEMA
Display RoboDK in cinema mode (hide the toolbar and the menu).
Definition irobodk.h:204
@ WINDOWSTATE_MAXIMIZED
Maximize the RoboDK Window.
Definition irobodk.h:198
@ WINDOWSTATE_NORMAL
Display the RoboDK window in a normal state (not maximized)
Definition irobodk.h:195
@ WINDOWSTATE_FULLSCREEN
Make the RoboDK window fullscreen.
Definition irobodk.h:201
@ WINDOWSTATE_MINIMIZED
Minimize the RoboDK window.
Definition irobodk.h:192
@ WINDOWSTATE_FULLSCREEN_CINEMA
Display RoboDK in cinema mode and fullscreen.
Definition irobodk.h:207
@ WINDOWSTATE_HIDDEN
Hide the RoboDK window. RoboDK will keep running as a process.
Definition irobodk.h:186
@ WINDOWSTATE_SHOW
Display the RoboDK window.
Definition irobodk.h:189
@ WINDOWSTATE_VIDEO
Display RoboDK in video mode.
Definition irobodk.h:210
TypeCalibrateTCP
TCP calibration types.
Definition irobodk.h:107
@ CALIBRATE_TCP_BY_POINT
Calibrate the TCP by poses touching the same point.
Definition irobodk.h:110
@ CALIBRATE_TCP_BY_PLANE
Calibrate the TCP by poses touching the same plane.
Definition irobodk.h:113
virtual int Collision(Item item1, Item item2)=0
Returns 1 if item1 and item2 collided. Otherwise returns 0.
virtual bool Valid(const Item item_check)=0
Check if an item is valid (not null and available in the open station)
virtual double SimulationSpeed()=0
Gets the current simulation speed. Set the speed to 1 for a real-time simulation.
TypeFlagsRoboDK
RoboDK Window Flags.
Definition irobodk.h:263
@ FLAG_ROBODK_RIGHT_CLICK
Allow right clicks on the 3D navigation screen.
Definition irobodk.h:274
@ FLAG_ROBODK_WINDOWKEYS_ACTIVE
Allow using keyboard shortcuts.
Definition irobodk.h:301
@ FLAG_ROBODK_DOUBLE_CLICK
Allow double clicks on the 3D navigation screen.
Definition irobodk.h:277
@ FLAG_ROBODK_NONE
Disallow everything.
Definition irobodk.h:313
@ FLAG_ROBODK_MENU_ACTIVE_ALL
Allow using the full menu.
Definition irobodk.h:319
@ FLAG_ROBODK_TREE_VISIBLE
Make the tree visible.
Definition irobodk.h:304
@ FLAG_ROBODK_MENUPROGRAM_ACTIVE
Enable the program menu (FLAG_ROBODK_MENU_ACTIVE must be allowed).
Definition irobodk.h:289
@ FLAG_ROBODK_3DVIEW_ACTIVE
Allow using the 3D navigation.
Definition irobodk.h:268
@ FLAG_ROBODK_MENU_ACTIVE
Enable/display the menu bar.
Definition irobodk.h:280
@ FLAG_ROBODK_MENUUTILITIES_ACTIVE
Enable the utilities menu (FLAG_ROBODK_MENU_ACTIVE must be allowed).
Definition irobodk.h:295
@ FLAG_ROBODK_MENUEDIT_ACTIVE
Enable the edit menu (FLAG_ROBODK_MENU_ACTIVE must be allowed).
Definition irobodk.h:286
@ FLAG_ROBODK_LEFT_CLICK
Allow left clicks on the 3D navigation screen.
Definition irobodk.h:271
@ FLAG_ROBODK_TREE_ACTIVE
Allow using the RoboDK station tree.
Definition irobodk.h:265
@ FLAG_ROBODK_REFERENCES_VISIBLE
Make the reference frames visible.
Definition irobodk.h:307
@ FLAG_ROBODK_STATUSBAR_VISIBLE
Make the statusbar visible.
Definition irobodk.h:310
@ FLAG_ROBODK_MENUFILE_ACTIVE
Enable the file menu (FLAG_ROBODK_MENU_ACTIVE must be allowed).
Definition irobodk.h:283
@ FLAG_ROBODK_MENUTOOLS_ACTIVE
Enable the tools menu (FLAG_ROBODK_MENU_ACTIVE must be allowed).
Definition irobodk.h:292
@ FLAG_ROBODK_MENUCONNECT_ACTIVE
Enable the connect menu (FLAG_ROBODK_MENU_ACTIVE must be allowed).
Definition irobodk.h:298
@ FLAG_ROBODK_ALL
Allow everything (default).
Definition irobodk.h:316
virtual void CloseRoboDK()=0
Closes RoboDK window and finishes RoboDK execution.
virtual void RunMessage(const QString &message, bool message_is_comment=false)=0
Shows a message or a comment in the output robot program.
virtual Item getItem(const QString &name, int itemtype=-1)=0
Returns an item by its name. If there is no exact match it will return the last closest match.
virtual QByteArray getData(const QString &param)=0
Gets a plugin defined parameter from the open RoboDK station. Saved parameters can be viewed or delet...
virtual int setCollisionActive(int check_state=COLLISION_ON)=0
Turn collision checking ON or OFF (COLLISION_OFF/COLLISION_OFF) according to the collision map....
virtual void setData(const QString &param, const QByteArray &value)=0
Sets a data parameter saved with the RoboDK station. If the parameters exists, it will be updated....
virtual int Collisions()=0
Returns the number of pairs of objects that are currently in a collision state. If collision checking...
virtual void PluginLoad(const QString &plugin_name="", int load=1)=0
Load or unload the specified plugin (path to DLL, dylib or SO file). If the plugin is already loaded ...
virtual void setParamBytes(const QString &param, const QByteArray &value)=0
Gets a user parameter from the open RoboDK station (Bytes type). Special QByteArray parameters can be...
TypeFlagsItem
RoboDK Item Flags.
Definition irobodk.h:323
@ FLAG_ITEM_NONE
Disallow everything.
Definition irobodk.h:347
@ FLAG_ITEM_NOCHILDREN
Do not allow adding nested items.
Definition irobodk.h:343
@ FLAG_ITEM_SELECTABLE
Allow selecting RoboDK items.
Definition irobodk.h:325
@ FLAG_ITEM_DROPALLOWED
Allow dropping to an item.
Definition irobodk.h:334
@ FLAG_ITEM_AUTOTRISTATE
Allow having nested items, expand and collapse the item.
Definition irobodk.h:340
@ FLAG_ITEM_ALL
Allow everything (default).
Definition irobodk.h:350
@ FLAG_ITEM_DRAGALLOWED
Allow draggin an item.
Definition irobodk.h:331
@ FLAG_ITEM_EDITABLE
Allow modifying RoboDK items.
Definition irobodk.h:328
@ FLAG_ITEM_ENABLED
Enable the item.
Definition irobodk.h:337
virtual void CloseStation()=0
Close the current station without asking to save.
TypeEuler
Euler angles type.
Definition irobodk.h:156
@ EULER_RZ_RYp_RZpp
Kawasaki, Adept, Staubli.
Definition irobodk.h:168
@ EULER_RZ_RY_RX
CRS.
Definition irobodk.h:177
@ JOINT_FORMAT
joints.
Definition irobodk.h:159
@ EULER_RZ_RYp_RXpp
ABB RobotStudio.
Definition irobodk.h:165
@ EULER_RX_RYp_RZpp
Staubli, Mecademic.
Definition irobodk.h:162
@ EULER_RX_RY_RZ
Fanuc, Kuka, Motoman, Nachi.
Definition irobodk.h:174
@ EULER_RZ_RXp_RZpp
CATIA, SolidWorks.
Definition irobodk.h:171
@ EULER_QUEATERNION
ABB Rapid.
Definition irobodk.h:180
virtual QString Version()=0
Return the vesion of RoboDK as a 4 digit string: Major.Minor.Revision.Build.
virtual void Render(int flags=RenderComplete)=0
Update the scene.
TypeSpray
Spray gun simulation:
Definition irobodk.h:247
@ SPRAY_OFF
Activate the spray simulation.
Definition irobodk.h:249
virtual int RunCode(const QString &code, bool code_is_fcn_call=false)=0
Adds code to run in the program output. If the program exists it will also run the program in simulat...
virtual void setInteractiveMode(int mode_type, int default_ref_flags, const QList< Item > *custom_object=nullptr, int custom_ref_flags=0)=0
Set the interactive mode to define the behavior when navigating and selecting items in RoboDK's 3D vi...
virtual bool LaserTrackerMeasure(tXYZ xyz, const tXYZ estimate, bool search=false)=0
Takes a laser tracker measurement with respect to its own reference frame. If an estimate point is pr...
virtual void HideRoboDK()=0
Hides the RoboDK window. RoboDK will continue running in the background.
The Mat class represents a 4x4 pose matrix. The main purpose of this object is to represent a pose in...
The tJoints class represents a joint position of a robot (robot axes).
The Color struct represents an RGBA color (each color component should be in the range [0-1])
The tMatrix2D struct represents a variable size 2d Matrix. Use the Matrix2D_... functions to oeprate ...