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 <irobodk.h>
Public Member Functions | |
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. More... | |
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 in RoboDK. Optionally, use a filter to return specific items (example: getItemListNames(filter = ITEM_TYPE_ROBOT)) More... | |
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 station in RoboDK. Optionally, use a filter to return specific items (example: getItemListNames(filter = ITEM_CASE_ROBOT)) More... | |
virtual bool | Valid (const Item item_check)=0 |
Check if an item is valid (not null and available in the open station) More... | |
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 to filter desired items. If no type is specified, all items are selectable. More... | |
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 to choose from and, optionally, a selected index. More... | |
virtual void | ShowRoboDK ()=0 |
Shows or raises the RoboDK window. | |
virtual void | HideRoboDK ()=0 |
Hides the RoboDK window. RoboDK will continue running in the background. | |
virtual void | CloseRoboDK ()=0 |
Closes RoboDK window and finishes RoboDK execution | |
virtual QString | Version ()=0 |
Return the vesion of RoboDK as a 4 digit string: Major.Minor.Revision.Build | |
virtual void | setWindowState (int windowstate=WINDOWSTATE_NORMAL)=0 |
Set the state of the RoboDK window More... | |
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 features. Use FLAG_ROBODK_* variables to set one or more flags. More... | |
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. Use FLAG_ITEM_* flags to set one or more flags. More... | |
virtual int | getFlagsItem (Item item)=0 |
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... | |
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) More... | |
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. More... | |
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. More... | |
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. A vertex normal can be provided optionally. More... | |
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. A vertex normal can be provided optionally. More... | |
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. A vertex normal can be provided optionally. More... | |
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] coordinates. Optionally, a vertex normal can be provided [XYZijk]. More... | |
virtual void | CloseStation ()=0 |
Close the current station without asking to save. | |
virtual Item | AddTarget (const QString &name, Item itemparent=nullptr, Item itemrobot=nullptr)=0 |
Adds a new target that can be reached with a robot. More... | |
virtual Item | AddFrame (const QString &name, Item itemparent=nullptr)=0 |
Adds a new Frame that can be referenced by a robot. More... | |
virtual Item | AddProgram (const QString &name, Item itemrobot=nullptr)=0 |
Adds a new Frame that can be referenced by a robot. More... | |
virtual Item | AddStation (QString name)=0 |
Add a new empty station. It returns the station item added. More... | |
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, 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... | |
virtual QList< Item > | getOpenStations ()=0 |
Returns the list of open stations in RoboDK. More... | |
virtual void | setActiveStation (Item stn)=0 |
Set the active station (project currently visible). More... | |
virtual Item | getActiveStation ()=0 |
Returns the active station item (station currently visible). More... | |
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 for a specific robot. If the program exists it will also run the program in simulate mode. More... | |
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 simulation mode. More... | |
virtual void | RunMessage (const QString &message, bool message_is_comment=false)=0 |
Shows a message or a comment in the output robot program. More... | |
virtual void | Render (int flags=RenderComplete)=0 |
Update the scene. More... | |
virtual bool | IsInside (Item object_inside, Item object_parent)=0 |
Check if an object is fully inside another one. More... | |
virtual int | setCollisionActive (int check_state=COLLISION_ON)=0 |
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... | |
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. This allows altering the collision map for Collision checking. Specify the link id for robots or moving mechanisms (id 0 is the base). More... | |
virtual int | Collisions ()=0 |
Returns the number of pairs of objects that are currently in a collision state. If collision checking is not active it will calculate collision checking. More... | |
virtual int | Collision (Item item1, Item item2)=0 |
Returns 1 if item1 and item2 collided. Otherwise returns 0. More... | |
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 Collisions() to retrieve the items that are in a collision state. More... | |
virtual void | setSimulationSpeed (double speed)=0 |
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... | |
virtual double | SimulationSpeed ()=0 |
Gets the current simulation speed. Set the speed to 1 for a real-time simulation. More... | |
virtual void | setRunMode (int run_mode=1)=0 |
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... | |
virtual int | RunMode ()=0 |
Returns the behavior of the RoboDK API. By default, RoboDK shows the path simulation for movement instructions (run_mode=1). More... | |
virtual QList< QPair< QString, QString > > | getParams ()=0 |
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... | |
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 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... | |
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. 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... | |
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, such as changing a specific setting or provoke specific events. More... | |
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 provided, the laser tracker will first move to those coordinates. If search is True, the tracker will search for a target. More... | |
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). More... | |
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. Returns the collided item. Use Item.Valid() to check if there was a valid collision. More... | |
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 calibrated, provide joint values to maximize accuracy. More... | |
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 calibrated, provide joint values to maximize accuracy. More... | |
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 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... | |
virtual void | setViewPose (const Mat &pose)=0 |
Set the pose of the wold reference frame with respect to the user view (camera/screen). More... | |
virtual Mat | ViewPose ()=0 |
Get the pose of the wold reference frame with respect to the user view (camera/screen). More... | |
virtual bool | SetRobotParams (Item robot, tMatrix2D dhm, Mat poseBase, Mat poseTool)=0 |
Set the nominal robot parameters. More... | |
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 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... | |
virtual QString | License ()=0 |
Returns the license as a readable string (same name shown in the RoboDK's title bar, on top of the main menu). More... | |
virtual QList< Item > | Selection ()=0 |
Returns the list of items selected (it can be one or more items). More... | |
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 performance testing. More... | |
virtual QByteArray | getData (const QString ¶m)=0 |
Gets a plugin defined parameter from the open RoboDK station. Saved parameters can be viewed or deleted by right clicking the station and selecting "shared parameters". More... | |
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. If not, it will be added to the station. Saved parameters can be viewed or deleted by right clicking the station and selecting "shared parameters". More... | |
virtual int | CollisionActive ()=0 |
Returns the status of collision checking (COLLISION_ON=1 if the user want to have collision checking or COLLISION_OFF=0 if the user disabled collision checking). More... | |
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 EventRender is triggered. More... | |
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 type EventRender is triggered. More... | |
virtual void | setSelection (const QList< Item > &listitems)=0 |
Set the selection in the tree | |
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 view. More... | |
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 it will unload the plugin and reload it. Pass an empty plugin_name to reload all plugins. More... | |
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 plugin. It returns the result as a string. More... | |
virtual QByteArray | getParamBytes (const QString ¶m)=0 |
Gets a user parameter from the open RoboDK station (Bytes type). Special QByteArray parameters can be added or modified by plugins and scripts (not by the user). More... | |
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 added or modified by plugins and scripts (not by the user). More... | |
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 the measured object reference frame. Status is negative if the measurement failed. extra data is [error_avg, error_max] in mm, if we are averaging a pose. More... | |
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 the measured object reference frame. Status is negative if the measurement failed. extra data is [error_avg, error_max] in mm, if we are averaging a pose. More... | |
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 simulated view is used. More... | |
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, 0 otherwise. More... | |
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. | |
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, ...).
anonymous enum |
Instruction types.
anonymous enum |
Instruction program call type:
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
RoboDK Window Flags.
anonymous enum |
RoboDK Item Flags.
anonymous enum |
Different render levels to update the screen.
anonymous enum |
Display geometry in 3D, with respect to the station coordinate system. This should be called using DrawGeometry ONLY when a PluginEvent of type EventRender is triggered.
Enumerator | |
---|---|
DrawTriangles | Draw surfaces. |
DrawLines | Draw lines. |
DrawPoints | Draw points. |
DrawSpheres | Draw spheres. |
anonymous enum |
anonymous enum |
Script execution types used by IRoboDK.setRunMode and IRoboDK.RunMode.
anonymous enum |
anonymous enum |
anonymous enum |
Reference frame calibration types.
anonymous enum |
projection types (for AddCurve)
anonymous enum |
anonymous enum |
State of the RoboDK window.
|
pure virtual |
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. |
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. |
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). |
|
pure virtual |
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).
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. |
|
pure virtual |
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. |
Adds a new Frame that can be referenced by a robot.
name | Name of the program. |
itemrobot | Robot that will be used. |
|
pure virtual |
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] |
|
pure virtual |
Add a new empty station. It returns the station item added.
name | Name of the station (the title bar will be renamed to match the station name). |
|
pure virtual |
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. |
|
pure virtual |
Takes a measurement with a 6D measurement device. It returns two poses, the base reference frame and the measured object reference frame. Status is negative if the measurement failed. extra data is [error_avg, error_max] in mm, if we are averaging a pose.
type | Type of the mechanism |
list_obj | list of object items that build the robot |
parameters | robot parameters in the same order as shown in the RoboDK menu: Utilities-Build Mechanism or robot |
joints_build | Current state of the robot (joint axes) to build the robot |
joints_home | joints for the home position (it can be changed later) |
joints_senses | Sense of rotation of each axis (+1 or -1) |
joints_lim_low | Lower joint limits |
joints_lim_high | Upper joint limits |
base | Base pose offset (robot pose) |
tool | Tool flange pose offset |
name | Robot name |
robot | Modify existing robot |
|
pure virtual |
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). |
|
pure virtual |
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). |
Open a simulated 2D camera view. Returns a handle pointer that can be used in case more than one simulated view is used.
|
pure virtual |
Take a snapshot from a simulated camera view and save it to a file. Returns 1 if success, 0 otherwise.
Returns 1 if item1 and item2 collided. Otherwise returns 0.
item1 | |
item2 |
|
pure virtual |
Returns the status of collision checking (COLLISION_ON=1 if the user want to have collision checking or COLLISION_OFF=0 if the user disabled collision checking).
|
pure virtual |
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. |
|
pure virtual |
Returns the number of pairs of objects that are currently in a collision state. If collision checking is not active it will calculate collision checking.
|
pure virtual |
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) |
|
pure virtual |
Draw geometry in the RoboDK's 3D view. This function must be called only inside a PluginEvent of type EventRender is triggered.
drawtype | type of geometry (triangles, lines, points or spheres) |
vtx_pointer | Pointer to an array of vertexs in mm, with respect to the RoboDK station (absolute reference) |
vtx_size | Size of the geometry (number of triangles, number of vertex lines or number of points) |
color | Color as RGBA [0,1] |
geo_size | Size of the lines or points (ignored for surfaces) |
vtx_normals | vertex normals as unitary vectors (optional, only used to draw surfaces) |
|
pure virtual |
Draw a texture in the RoboDK's 3D view. This function must be called only inside a PluginEvent of type EventRender is triggered.
image | Pointer to an image in RGBA format (it is important to have it in RGBA) |
vtx_pointer | Pointer to an array of vertexs in mm, with respect to the RoboDK station (absolute reference) |
texture_coords | Texture coordinates (2D coordinates per vertex) |
num_triangles | Size of the geometry (number of triangles) |
vtx_normals | vertex normals as unitary vectors (optional) |
|
pure virtual |
Returns the active station item (station currently visible).
|
pure virtual |
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). |
|
pure virtual |
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 |
|
pure virtual |
Gets a plugin defined parameter from the open RoboDK station. Saved parameters can be viewed or deleted by right clicking the station and selecting "shared parameters".
param | RoboDK data parameter |
|
pure virtual |
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 |
|
pure virtual |
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_... |
|
pure virtual |
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))
filter | ITEM_TYPE |
|
pure virtual |
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))
filter | ITEM_TYPE_... |
|
pure virtual |
Returns the list of open stations in RoboDK.
|
pure virtual |
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 |
|
pure virtual |
Gets a user parameter from the open RoboDK station (Bytes type). Special QByteArray parameters can be added or modified by plugins and scripts (not by the user).
param | RoboDK parameter |
|
pure virtual |
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
Check if an object is fully inside another one.
object_inside | |
object_parent |
|
pure virtual |
Shows a RoboDK popup to select one object from the open RoboDK station. You can provide a few items to choose from and, optionally, a selected index.
message | Message to show in the pop up |
list_choices | Items to choose from |
id_selected | Selected id from list_choices if we want to select an item |
|
pure virtual |
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.
message | Message to show in the pop up |
itemtype | optionally filter by RoboDK.ITEM_TYPE_* |
|
pure virtual |
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. |
|
pure virtual |
Returns the license as a readable string (same name shown in the RoboDK's title bar, on top of the main menu).
|
pure virtual |
Takes a pose measurement (requires a supported measurement system).
pose | Measured pose |
pose | Additional returned data [visible targets, button state, average error, max error] |
target | Target type |
time_avg_ms | Average the pose from the buffer |
tool_tip | XYZ position of the tool tip for average calculation |
|
pure virtual |
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.
plugin_name | The plugin name must match the PluginName() implementation in the RoboDK plugin. |
plugin_command | Specific command handled by your plugin. |
value | Specific value (optional) handled by your plugin. |
|
pure virtual |
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.
plugin_name | Name of the plugin or path (if it is not in the default directory. |
load | load the plugin (1/default) or unload (0) |
|
pure virtual |
Show the popup menu to create the ISO9283 path for position accuracy, repeatability and path accuracy 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. |
|
pure virtual |
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. |
|
pure virtual |
Projects a list of points 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. This matrix will contain the modified points after the projection. |
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. |
|
pure virtual |
Update the scene.
flags | Set to RenderComplete for a full update or RenderScreen to redraw the scene without internally updating dependencies. |
|
pure virtual |
Adds code to run in the program output. If the program exists it will also run the program in simulation mode.
code | |
code_is_fcn_call |
|
pure virtual |
Shows a message or a comment in the output robot program.
message | |
message_is_comment |
|
pure virtual |
Returns the behavior of the RoboDK API. By default, RoboDK shows the path simulation for movement instructions (run_mode=1).
|
pure virtual |
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). |
|
pure virtual |
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. |
|
pure virtual |
Returns the list of items selected (it can be one or more items).
|
pure virtual |
Set the active station (project currently visible).
station | station item, it can be previously loaded as an RDK file. |
|
pure virtual |
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.
check_state |
|
pure virtual |
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) |
|
pure virtual |
Sets a data parameter saved with the RoboDK station. If the parameters exists, it will be updated. If not, it will be added to the station. Saved parameters can be viewed or deleted by right clicking the station and selecting "shared parameters".
param | RoboDK data parameter name |
value | data value |
|
pure virtual |
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 |
|
pure virtual |
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.
flags | state of the window(FLAG_ROBODK_*) |
|
pure virtual |
Set the interactive mode to define the behavior when navigating and selecting items in RoboDK's 3D view.
mode_type | The mode type defines what accion occurs when the 3D view is selected (Select object, Pan, Rotate, Zoom, Move Objects, ...) |
default_ref_flags | When a movement is specified, we can provide what motion we allow by default with respect to the coordinate system (set apropriate flags) |
custom_object | Provide a list of optional items to customize the move behavior for these specific items (important: the lenght of custom_ref_flags must match) |
custom_ref_flags | Provide a matching list of flags to customize the movement behavior for specific items |
|
pure virtual |
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 |
|
pure virtual |
Gets a user parameter from the open RoboDK station (Bytes type). Special QByteArray parameters can be added or modified by plugins and scripts (not by the user).
param | RoboDK parameter |
value | Data value |
Set the nominal robot parameters.
robot | |
dhm | D-H Modified table (Denavit Hartenberg Modified) |
poseBase | |
poseTool |
|
pure virtual |
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 |
|
pure virtual |
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) |
|
pure virtual |
Set the pose of the wold reference frame with respect to the user view (camera/screen).
pose | View pose. |
|
pure virtual |
Set the state of the RoboDK window
windowstate |
|
pure virtual |
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 |
|
pure virtual |
Gets the current simulation speed. Set the speed to 1 for a real-time simulation.
|
pure virtual |
Takes a measurement with a 6D measurement device. It returns two poses, the base reference frame and the measured object reference frame. Status is negative if the measurement failed. extra data is [error_avg, error_max] in mm, if we are averaging a pose.
pose1 | Pose of the main object |
pose2 | Pose of the reference object |
npoints1 | Number of points visible for object 1 |
npoints2 | Number of points visible for object 2t |
status | Status flag |
data | Additional data from the device |
time_avg | Take the measurement for a period of time and average the result. |
tip_xyz | Offet the measurement to the tip. |
|
pure virtual |
Check if an item is valid (not null and available in the open station)
item_check | Item to check |
|
pure virtual |
Get the pose of the wold reference frame with respect to the user view (camera/screen).