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 |
|
virtualItem | 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(constItemitem_check)=0 |
Check if an item is valid (not null and available in the open station)More... |
|
virtualItem | 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... |
|
virtualItem | 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 windowMore... |
|
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,Itemitem=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(Itemitem)=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... |
|
virtualItem | AddFile(const QString &filename, constItemparent=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, constItemitemsave=nullptr)=0 |
Save an item to a file. If no item is provided, the open station is saved.More... |
|
virtualItem | AddShape(consttMatrix2D*trianglePoints,ItemaddTo=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... |
|
virtualItem | AddCurve(consttMatrix2D*curvePoints,ItemreferenceObject=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... |
|
virtualItem | AddPoints(consttMatrix2D*points,ItemreferenceObject=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 | 箴jectPoints(tMatrix2D*points,ItemobjectProject, int ProjectionType=PROJECTION_ALONG_NORMAL_RECALC)=0 |
箴jects 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. |
|
virtualItem | AddTarget(const QString &name,Itemitemparent=nullptr,Itemitemrobot=nullptr)=0 |
Adds a new target that can be reached with a robot.More... |
|
virtualItem | AddFrame(const QString &name,Itemitemparent=nullptr)=0 |
Adds a new Frame that can be referenced by a robot.More... |
|
virtualItem | AddProgram(const QString &name,Itemitemrobot=nullptr)=0 |
Adds a new Frame that can be referenced by a robot.More... |
|
virtualItem | AddStation(QString name)=0 |
Add a new empty station. It returns the station item added.More... |
|
virtualItem | 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(Itemstn)=0 |
Set the active station (project currently visible).More... |
|
virtualItem | 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(Itemobject_inside,Itemobject_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,Itemitem1,Itemitem2, 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 | 科尔isions()=0 |
返回的数量对铜的对象rrently in a collision state. If collision checking is not active it will calculate collision checking.More... |
|
virtual int | 科尔ision(Itemitem1,Itemitem2)=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科尔isions()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 userMore... |
|
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 userMore... |
|
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 | 科尔isionLine(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(consttMatrix2D*poses_joints, tXYZ tcp_xyz, int format=EULER_RX_RY_RZ, int algorithm=CALIBRATE_TCP_BY_POINT,Itemrobot=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... |
|
virtualMat | CalibrateReference(consttMatrix2D*poses_joints, int method=CALIBRATE_FRAME_3P_P1_ON_X, bool use_joints=false,Itemrobot=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 | 箴gramStart(const QString &progname, const QString &defaultfolder="", const QString &postprocessor="",Itemrobot=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(constMat&pose)=0 |
Set the pose of the wold reference frame with respect to the user view (camera/screen).More... |
|
virtualMat | ViewPose()=0 |
Get the pose of the wold reference frame with respect to the user view (camera/screen).More... |
|
virtual bool | SetRobotParams(Itemrobot,tMatrix2Ddhm,MatposeBase,MatposeTool)=0 |
Set the nominal robot parameters.More... |
|
virtualItem | 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... |
|
virtualItem | Popup_ISO9283_CubeProgram(Itemrobot=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 | 科尔isionActive()=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(Matpose1,Matpose2, 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... |
|
virtualItem | BuildMechanism(int type, const QList<Item> &list_obj, const double *parameters, consttJoints&joints_build, consttJoints&joints_home, consttJoints&joints_senses, consttJoints&joints_lim_low, consttJoints&joints_lim_high, constMatbase, constMattool, const QString &name,Itemrobot=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... |
|
virtualItem | Cam2D_Add(constItemattach_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, constItemcamera=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... |
|
virtualItem | 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 usingDrawGeometryONLY when a PluginEvent of type EventRender is triggered.
Enumerator | |
---|---|
DrawTriangles | Draw surfaces. |
DrawLines | Draw lines. |
DrawPoints | 画点。 |
DrawSpheres | Draw spheres. |
anonymous enum |
anonymous enum |
Script execution types used byIRoboDK.setRunModeandIRoboDK.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.
|
纯虚拟 |
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). |
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. |
|
纯虚拟 |
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. |
|
纯虚拟 |
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] |
|
纯虚拟 |
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). |
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. |
|
纯虚拟 |
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 |
|
纯虚拟 |
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). |
|
纯虚拟 |
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. |
算法rithm | 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.
|
纯虚拟 |
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 |
|
纯虚拟 |
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).
|
纯虚拟 |
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 | 科尔ided point. |
|
纯虚拟 |
返回的数量对铜的对象rrently in a collision state. If collision checking is not active it will calculate collision checking.
|
纯虚拟 |
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) |
|
纯虚拟 |
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 | 顶点normals as unitary vectors (optional, only used to draw surfaces) |
|
纯虚拟 |
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 | 顶点normals as unitary vectors (optional) |
|
纯虚拟 |
Returns the active station item (station currently visible).
|
纯虚拟 |
Return the list of items that are in a collision state. This function can be used after calling科尔isions()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). |
|
纯虚拟 |
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 |
|
纯虚拟 |
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 |
|
纯虚拟 |
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 |
|
纯虚拟 |
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_... |
|
纯虚拟 |
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 |
|
纯虚拟 |
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_... |
|
纯虚拟 |
Returns the list of open stations in RoboDK.
|
纯虚拟 |
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 |
|
纯虚拟 |
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 |
|
纯虚拟 |
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 |
|
纯虚拟 |
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 |
|
纯虚拟 |
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_* |
|
纯虚拟 |
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. |
|
纯虚拟 |
Returns the license as a readable string (same name shown in the RoboDK's title bar, on top of the main menu).
|
纯虚拟 |
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 |
|
纯虚拟 |
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. |
|
纯虚拟 |
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) |
|
纯虚拟 |
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. |
|
纯虚拟 |
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. |
|
纯虚拟 |
箴jects 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. |
|
纯虚拟 |
Update the scene.
flags | Set to RenderComplete for a full update or RenderScreen to redraw the scene without internally updating dependencies. |
|
纯虚拟 |
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 |
|
纯虚拟 |
Shows a message or a comment in the output robot program.
message | |
message_is_comment |
|
纯虚拟 |
Returns the behavior of the RoboDK API. By default, RoboDK shows the path simulation for movement instructions (run_mode=1).
|
纯虚拟 |
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). |
|
纯虚拟 |
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. |
|
纯虚拟 |
Returns the list of items selected (it can be one or more items).
|
纯虚拟 |
Set the active station (project currently visible).
station | station item, it can be previously loaded as an RDK file. |
|
纯虚拟 |
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 |
|
纯虚拟 |
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) |
|
纯虚拟 |
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 |
|
纯虚拟 |
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 |
|
纯虚拟 |
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_*) |
|
纯虚拟 |
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 | 箴vide 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 | 箴vide a matching list of flags to customize the movement behavior for specific items |
|
纯虚拟 |
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 |
|
纯虚拟 |
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 |
|
纯虚拟 |
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 |
|
纯虚拟 |
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) |
|
纯虚拟 |
Set the pose of the wold reference frame with respect to the user view (camera/screen).
pose | View pose. |
|
纯虚拟 |
Set the state of the RoboDK window
windowstate |
|
纯虚拟 |
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 |
|
纯虚拟 |
Gets the current simulation speed. Set the speed to 1 for a real-time simulation.
|
纯虚拟 |
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. |
|
纯虚拟 |
Check if an item is valid (not null and available in the open station)
item_check | Item to check |
|
纯虚拟 |
Get the pose of the wold reference frame with respect to the user view (camera/screen).