5
#include "robodktypes.h"
345FLAG_ITEM_USERTRISTATE = 256,
434
virtual
Item
ItemUserPick(
constQString &message,
constQList
- &list_choices,intid_selected=-1)=0;
488
virtual
void
ShowMessage(
constQString &message,
boolpopup =
true)=0;
503
virtual
void
Save(
constQString &filename,
const
Itemitemsave=
nullptr)=0;
623
virtual
int
RunCode(
constQString &code,
boolcode_is_fcn_call =
false)=0;
630
virtual
void
RunMessage(
constQString &message,
boolmessage_is_comment =
false)=0;
749
virtual
void
setParam(
constQString ¶m,
constQString &value)=0;
757
virtualQString
Command(
constQString &cmd,
constQString &value=
"")=0;
781
virtual
bool
MeasurePose(
Mat*pose,
doubledata[10],
inttarget=-1,
inttime_avg_ms=0,
consttXYZ tool_tip=
nullptr)=0;
823
virtual
bool
ProgramStart(
constQString &progname,
constQString &defaultfolder =
"",
constQString &postprocessor =
"",
Itemrobot =
nullptr)=0;
887
virtualQByteArray
getData(
constQString ¶m)=0;
897
virtual
void
setData(
constQString ¶m,
constQByteArray &value)=0;
914
virtual
bool
DrawGeometry(
intdrawtype,
float*vtx_pointer,
intvtx_size,
floatcolor[4],
floatgeo_size=2.0,
float*vtx_normals=
nullptr)=0;
925
virtual
bool
DrawTexture(
constQImage *image,
const
float*vtx_pointer,
const
float*texture_coords,
intnum_triangles,
float*vtx_normals=
nullptr)=0;
943
virtual
void
setInteractiveMode(
intmode_type,
intdefault_ref_flags,
constQList
- *custom_object=nullptr,intcustom_ref_flags=0)=0;
950
virtual
void
PluginLoad(
constQString &plugin_name=
"",
intload=1)=0;
958
virtualQString
PluginCommand(
constQString &plugin_name=
"",
constQString &plugin_command=
"",
constQString &value=
"")=0;
989
virtual
int
StereoCamera_Measure(
Matpose1,
Matpose2,
int&npoints1,
int&npoints2,
double*data=
nullptr,
floattime_avg=0,
consttXYZ tip_xyz=
nullptr)=0;
One hundred.7
virtual
Item
BuildMechanism(
inttype,
constQList
- &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
Matbase,const
Mattool,constQString &name,Item机器人=nullptr)=0;
The Item class represents an item in RoboDK station. An item can be a robot, a frame,...
This class is the iterface to the RoboDK API. With the RoboDK API you can automate certain tasks and ...
virtual void setParam(const QString ¶m, const QString &value)=0
Sets a global parameter from the RoboDK station. If the parameters exists, it will be modified....
@ PROJECTION_NONE
No curve projection.
@ PROJECTION_RECALC
The normals are recalculated according to the surface normal of the closest projection....
@ PROJECTION_ALONG_NORMAL
The projection will be done along the normal.
@ PROJECTION_ALONG_NORMAL_RECALC
The projection will be done along the normal. Furthermore, the normal will be recalculated according ...
@ PROJECTION_CLOSEST
The projection will the closest point on the surface.
@ PROJECTION_CLOSEST_RECALC
The projection will be the closest point on the surface and the normals will be recalculated.
virtual void setViewPose(const Mat &pose)=0
Set the pose of the wold reference frame with respect to the user view (camera/screen).
@ COLLISION_ON
Use collision checking.
@ COLLISION_OFF
Do not use collision checking.
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,...
@ FLAG_ROBODK_RIGHT_CLICK
允许右点击3 d导航可控硅een.
@ FLAG_ROBODK_WINDOWKEYS_ACTIVE
Allow using keyboard shortcuts.
@ FLAG_ROBODK_DOUBLE_CLICK
Allow double clicks on the 3D navigation screen.
@ FLAG_ROBODK_NONE
Disallow everything.
@ FLAG_ROBODK_MENU_ACTIVE_ALL
Allow using the full menu.
@ FLAG_ROBODK_TREE_VISIBLE
Make the tree visible.
@ FLAG_ROBODK_MENUPROGRAM_ACTIVE
Enable the program menu (FLAG_ROBODK_MENU_ACTIVE must be allowed).
@ FLAG_ROBODK_3DVIEW_ACTIVE
Allow using the 3D navigation.
@ FLAG_ROBODK_MENU_ACTIVE
Enable/display the menu bar.
@ FLAG_ROBODK_MENUUTILITIES_ACTIVE
Enable the utilities 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_LEFT_CLICK
Allow left clicks on the 3D navigation screen.
@ FLAG_ROBODK_TREE_ACTIVE
Allow using the RoboDK station tree.
@ FLAG_ROBODK_REFERENCES_VISIBLE
Make the reference frames visible.
@ FLAG_ROBODK_STATUSBAR_VISIBLE
Make the statusbar visible.
@ FLAG_ROBODK_MENUFILE_ACTIVE
Enable the file 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_MENUCONNECT_ACTIVE
Enable the connect menu (FLAG_ROBODK_MENU_ACTIVE must be allowed).
@ FLAG_ROBODK_ALL
Allow everything (default).
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...
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).
@ INSTRUCTION_COMMENT
Comment output.
@ INSTRUCTION_START_THREAD
Instruction to start a parallel thread. Program execution will continue and also trigger a thread.
@ INSTRUCTION_CALL_PROGRAM
Instruction to call a program.
@ INSTRUCTION_INSERT_CODE
Instructio to insert raw code (this will not provoke a program call).
@ INSTRUCTION_SHOW_MESSAGE
Instruction to pop up a message on the robot teach pendant.
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 ¶ms="")=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...
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....
@ CALIBRATE_TCP_BY_POINT
校准的TCP触摸same point.
@ CALIBRATE_TCP_BY_PLANE
校准的TCP触摸same plane.
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 ¶ms="")=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...
@ CALIBRATE_TURNTABLE
Calibrate turntable.
@ CALIBRATE_FRAME_6P
Calibrate by 6 points.
@ CALIBRATE_FRAME_3P_P1_ORIGIN
Calibrate by 3 points: [Origin, X+, XY+] (p1 is origin).
@ CALIBRATE_FRAME_3P_P1_ON_X
Calibrate by 3 points: [X, X+, Y+] (p1 on X axis).
@ CALIBRATE_TURNTABLE_2X
Calibrate a 2 axis turntable.
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.
@ DrawTriangles
Draw surfaces.
@ DrawSpheres
Draw spheres.
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 ¶m)=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.
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....
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...
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 ...
@ MOVE_TYPE_INVALID
Invalid robot movement.
@ MOVE_TYPE_LINEAR
Linear movement (MoveL).
@ MOVE_TYPE_LINEARSEARCH
Linear search function.
@ MOVE_TYPE_JOINT
Joint axes movement (MoveJ).
@ MOVE_TYPE_CIRCULAR
Circular movement (MoveC).
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...
virtual QString PluginCommand(const QString &plugin_name="", const QString &plugin_command="", const QString &value="")=0
发送一个特定命令RoboDK插件。的有限公司mmand 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
需要一个姿势测量(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 ¶m)=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...
@ RenderComplete
Provokes an update and then screen display (full update and render).
@ RenderNone
Do not render the screen.
@ RenderUpdateOnly
Update all positions of modified items (robots, references and objects) and their child items.
@ RenderScreen
Redisplay the screen.
@ WINDOWSTATE_CINEMA
Display RoboDK in cinema mode (hide the toolbar and the menu).
@ WINDOWSTATE_MAXIMIZED
Maximize the RoboDK Window.
@ WINDOWSTATE_NORMAL
Display the RoboDK window in a normal state (not maximized)
@ WINDOWSTATE_FULLSCREEN
Make the RoboDK window fullscreen.
@ WINDOWSTATE_MINIMIZED
Minimize the RoboDK window.
@ WINDOWSTATE_FULLSCREEN_CINEMA
Display RoboDK in cinema mode and fullscreen.
@ WINDOWSTATE_HIDDEN
Hide the RoboDK window. RoboDK will keep running as a process.
@ WINDOWSTATE_SHOW
Display the RoboDK window.
@ WINDOWSTATE_VIDEO
Display RoboDK in video mode.
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 ...
@ FLAG_ITEM_NONE
Disallow everything.
@ FLAG_ITEM_NOCHILDREN
Do not allow adding nested items.
@ FLAG_ITEM_SELECTABLE
Allow selecting RoboDK items.
@ FLAG_ITEM_DROPALLOWED
Allow dropping to an item.
@ FLAG_ITEM_AUTOTRISTATE
Allow having nested items, expand and collapse the item.
@ FLAG_ITEM_ALL
Allow everything (default).
@ FLAG_ITEM_DRAGALLOWED
Allow draggin an item.
@ FLAG_ITEM_EDITABLE
Allow modifying RoboDK items.
@ FLAG_ITEM_ENABLED
Enable the item.
@ FEATURE_SURFACE
Surface selection.
@ FEATURE_NONE
No selection.
@ FEATURE_CURVE
Curve selection.
@ FEATURE_POINT
Point selection.
@ RUNMODE_MAKE_ROBOTPROG_AND_START
Makes the robot program and starts it on the robot (independently from the PC).
@ RUNMODE_QUICKVALIDATE
Performs a quick check to validate the robot movements.
@ RUNMODE_RUN_ROBOT
Moves the real robot from the PC (PC is the client, the robot behaves like a server).
@ RUNMODE_MAKE_ROBOTPROG
Makes the robot program.
@ RUNMODE_MAKE_ROBOTPROG_AND_UPLOAD
Makes the robot program and updates it to the robot.
@ RUNMODE_SIMULATE
Performs the simulation moving the robot (default)
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...
@ EULER_RZ_RYp_RZpp
Kawasaki, Adept, Staubli.
@ EULER_RZ_RYp_RXpp
ABB RobotStudio.
@ EULER_RX_RYp_RZpp
Staubli, Mecademic.
@ EULER_RX_RY_RZ
Fanuc, Kuka, Motoman, Nachi.
@ EULER_RZ_RXp_RZpp
CATIA, SolidWorks.
@ EULER_QUEATERNION
ABB Rapid.
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...
@ SPRAY_OFF
Activate the spray simulation.
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.
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.
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 ¶m)=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....
@ 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.
@ INS_TYPE_MOVEC
Circular movement instruction.
@ INS_TYPE_CHANGEROBOT
Set the robot instruction (obsolete).
@ INS_TYPE_EVENT
Simulation event instruction.
@ INS_TYPE_CHANGESPEED
Set speed instruction.
@ INS_TYPE_CODE
Program call or raw code output.
@ INS_TYPE_INVALID
Invalid instruction.
@ INS_TYPE_MOVE
Linear or joint movement instruction.
@ INS_TYPE_PRINT
Display message on the teach pendant.
@ INS_TYPE_PAUSE
Pause instruction.
@ INS_TYPE_CHANGEFRAME
Set reference frame instruction.
@ INS_TYPE_CHANGETOOL
Set the tool (TCP) instruction.
virtual void setData(const QString ¶m, 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 ¶m, const QByteArray &value)=0
Gets a user parameter from the open RoboDK station (Bytes type). Special QByteArray parameters can be...
virtual void CloseStation()=0
Close the current station without asking to save.
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.
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...
虚拟空白setInteractiveMode (int, int mode_typedefault_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 ...