TheItemclass represents an item inRoboDK年代tation. An item can be a robot, a frame, a tool, an object, a target, ... any item visible in the年代tation tree. An item can also be seen as a node where other items can be attached to (child items). Every item has one parent item/node and can have one or more child items/nodes.More...
#include <robodk_api.h>
Public Member Functions |
|
Item(RoboDK*rdk=nullptr, quint64 ptr=0, qint32 type=-1) | |
Item(constItem&other) | |
Item& | operator=(constItem&x)=default |
QString | ToString() const |
RoboDK* | RDK() |
Returns theRoboDKlink Robolink().More... |
|
void | NewLink() |
Create a new communication link forRoboDK. Use this for robots if you use a multithread application running multiple robots at the same time.More... |
|
int | Type() const |
Itemtype (object, robot, tool, reference, robot machining project, ...)More... |
|
void | Save(const QString &filename) |
Save a station, a robot, a tool or an object to a fileMore... |
|
void | 删除() |
删除年代an item and its childs from the station.More... |
|
bool | Valid(bool check_pointer=false) const |
Check if an item is valid (not null and available in the open station)More... |
|
void | 年代etParent(Itemparent) |
Attaches the item to a new parent while maintaining the relative position with its parent. The absolute position is changed.More... |
|
void | 年代etParentStatic(Itemparent) |
Attaches the item to another parent while maintaining the current absolute position in the station. The relationship between this item and its parent is changed to maintain the abosolute position.More... |
|
Item | AttachClosest() |
Attach the closest object to the tool. Returns the item that was attached.More... |
|
Item | DetachClosest(Itemparent) |
Detach the closest object attached to the tool (see also setParentStatic).More... |
|
void | DetachAll(Itemparent) |
Detach any object attached to a tool.More... |
|
Item | Parent() const |
Return the parent item of this itemMore... |
|
QList<Item> | Childs() const |
Returns a list of the item childs that are attached to the provided item.More... |
|
bool | Visible() const |
Returns 1 if the item is visible, otherwise, returns 0.More... |
|
void | 年代etVisible(bool visible, int visible_frame=-1) |
Sets the item visiblity statusMore... |
|
QString | Name() const |
Returns the name of an item. The name of the item is always displayed in theRoboDK年代tation treeMore... |
|
void | 年代etName(const QString &name) |
Set the name of aRoboDKitem.More... |
|
void | 年代etPose(constMatpose) |
Sets the local position (pose) of an object, target or reference frame. For example, the position of an object/frame/target with respect to its parent. If a robot is provided, it will set the pose of the end efector.More... |
|
Mat | Pose() const |
Returns the local position (pose) of an object, target or reference frame. For example, the position of an object/frame/target with respect to its parent. If a robot is provided, it will get the pose of the end efectorMore... |
|
void | 年代etGeometryPose(constMatpose) |
Sets the position (pose) the object geometry with respect to its own reference frame. This procedure works for tools and objects.More... |
|
Mat | GeometryPose() |
Returns the position (pose) the object geometry with respect to its own reference frame. This procedure works for tools and objects.More... |
|
Mat | PoseTool() |
Returns the tool pose of an item. If a robot is provided it will get the tool pose of the active tool held by the robot.More... |
|
Mat | PoseFrame() |
Returns the reference frame pose of an item. If a robot is provided it will get the tool pose of the active reference frame used by the robot.More... |
|
void | 年代etPoseFrame(constMatframe_pose) |
Sets the reference frame of a robot(user frame). The frame can be either an item or a pose. If "frame" is an item, it links the robot to the frame item. If frame is a pose, it updates the linked pose of the robot frame (with respect to the robot reference frame).More... |
|
void | 年代etPoseFrame(constItemframe_item) |
设置一个机器人的工具或工具对象(Ce的工具nter Point, or TCP). The tool pose can be either an item or a 4x4 Matrix. If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.More... |
|
void | 年代etPoseTool(constMattool_pose) |
设置一个机器人的工具或工具对象(Ce的工具nter Point, or TCP). The tool pose can be either an item or a 4x4 Matrix. If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.More... |
|
void | 年代etPoseTool(constItemtool_item) |
设置一个机器人的工具或工具对象(Ce的工具nter Point, or TCP). The tool pose can be either an item or a 4x4 Matrix. If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.More... |
|
void | 年代etPoseAbs(constMatpose) |
Sets the global position (pose) of an item. For example, the position of an object/frame/target with respect to the station origin.More... |
|
Mat | PoseAbs() |
Returns the global position (pose) of an item. For example, the position of an object/frame/target with respect to the station origin.More... |
|
void | 年代etColor(double colorRGBA[4]) |
Changes the color of a robot/object/tool. A color must must in the format COLOR=[R,G,B,(A=1)] where all values range from 0 to 1. Alpha (A) defaults to 1 (100% opaque). Set A to 0 to make an object transparent.More... |
|
void | Scale(double scale) |
Apply a scale to an object to make it bigger or smaller. The scale can be uniform (if scale is a float value) or per axis (if scale is a vector).More... |
|
void | Scale(double scale_xyz[3]) |
Apply a per-axis scale to an object to make it bigger or smaller. The scale can be uniform (if scale is a float value) or per axis (if scale is a vector).More... |
|
Item | 年代etMachiningParameters(QString ncfile="",Itempart_obj=nullptr, QString options="") |
Update the robot milling path input and parameters. Parameter input can be an NC file (G-code or APT file) or an object item inRoboDK. A curve or a point follow project will be automatically set up for a robot manufacturing project. Tip: UsegetLink()and setLink() to get/set the robot tool, reference frame, robot and program linked to the project. Tip: Use年代etPose()and年代etJoints()to update the path to tool orientation or the preferred start joints. Tip: Use年代etPoseTool()and年代etPoseFrame()to link to the corresponding tool and reference frames.More... |
|
void | 年代etAsCartesianTarget() |
Sets a target as a cartesian target. A cartesian target moves to cartesian coordinates.More... |
|
void | 年代etAsJointTarget() |
Sets a target as a joint target. A joint target moves to a joints position without regarding the cartesian coordinates.More... |
|
bool | isJointTarget() const |
Returns True if a target is a joint target (green icon). Otherwise, the target is a Cartesian target (red icon).More... |
|
tJoints | Joints() const |
Returns the current joints of a robot or the joints of a target. If the item is a cartesian target, it returns the preferred joints (configuration) to go to that cartesian position.More... |
|
tJoints | JointsHome() const |
Returns the home joints of a robot. These joints can be manually set in the robot "Parameters" menu, then select "Set home position"More... |
|
void | 年代etJointsHome(consttJoints&jnts) |
Set robot joints for the home positionMore... |
|
Item | ObjectLink(int link_id=0) |
Returns an item pointer to the geometry of a robot link. This is useful to show/hide certain robot links or alter their geometry.More... |
|
Item | getLink(int type_linked=RoboDK::ITEM_TYPE_ROBOT) |
Returns an item linked to a robot, object, tool, program or robot machining project. This is useful to retrieve the relationship between programs, robots, tools and other specific projects.More... |
|
void | 年代etJoints(consttJoints&jnts) |
Set robot joints or the joints of a targetMore... |
|
void | JointLimits(tJoints*lower_limits,tJoints*upper_limits) |
Retrieve the joint limits of a robotMore... |
|
void | 年代etJointLimits(consttJoints&lower_limits, consttJoints&upper_limits) |
Set the joint limits of a robotMore... |
|
void | 年代etRobot(constItem&robot) |
Sets the robot of a program or a target. You must set the robot linked to a program or a target every time you copy paste these objects. If the robot is not provided, the first available robot will be chosen automatically.More... |
|
Item | AddTool(constMat&tool_pose, const QString &tool_name="New TCP") |
Adds an empty tool to the robot provided the tool pose (4x4 Matrix) and the tool name.More... |
|
Mat | SolveFK(consttJoints&joints, constMat*tool=nullptr, constMat*ref=nullptr) |
Computes the forward kinematics of the robot for the provided joints. The tool and the reference frame are not taken into account.More... |
|
void | JointsConfig(consttJoints&joints,tConfigconfig) |
Returns the robot configuration state for a set of robot joints.More... |
|
tJoints | SolveIK(constMat&pose, constMat*tool=nullptr, constMat*ref=nullptr) |
This function calculates the inverse kinematics for a pose. The joints returned are the closest to the current robot configuration (seeSolveIK_All()). If the pose is not reachable, the length of the returned joints is 0.More... |
|
tJoints | SolveIK(constMatpose,tJointsjoints_approx, constMat*tool=nullptr, constMat*ref=nullptr) |
Computes the inverse kinematics for the specified robot and pose. The joints returned are the closest to the current robot configuration (seeSolveIK_All())More... |
|
tMatrix2D* | SolveIK_All_Mat2D(constMat&pose, constMat*tool=nullptr, constMat*ref=nullptr) |
Computes the inverse kinematics for the specified robot and pose. The function returns all available joint solutions as a 2D matrix.More... |
|
QList<tJoints> | SolveIK_All(constMat&pose, constMat*tool=nullptr, constMat*ref=nullptr) |
Computes the inverse kinematics for the specified robot and pose. The function returns all available joint solutions as a 2D matrix.More... |
|
bool | Connect(const QString &robot_ip="") |
Connect to a real robot using the corresponding robot driver.More... |
|
bool | Disconnect() |
Disconnect from a real robot (when the robot driver is used)More... |
|
void | MoveJ(constItem&itemtarget, bool blocking=true) |
Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements. Given a target item, MoveJ can also be applied to programs and a new movement instruction will be added.More... |
|
void | MoveJ(consttJoints&joints, bool blocking=true) |
Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements.More... |
|
void | MoveJ(constMat&target, bool blocking=true) |
Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements.More... |
|
void | MoveL(constItem&itemtarget, bool blocking=true) |
Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements. Given a target item, MoveL can also be applied to programs and a new movement instruction will be added.More... |
|
void | MoveL(consttJoints&joints, bool blocking=true) |
Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements.More... |
|
void | MoveL(constMat&target, bool blocking=true) |
Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements.More... |
|
void | MoveC(constItem&itemtarget1, constItem&itemtarget2, bool blocking=true) |
Moves a robot to a specific target ("Move Circular" mode). By default, this function blocks until the robot finishes its movements.More... |
|
void | MoveC(consttJoints&joints1, consttJoints&joints2, bool blocking=true) |
Moves a robot to a specific target ("Move Circular" mode). By default, this function blocks until the robot finishes its movements.More... |
|
void | MoveC(constMat&target1, constMat&target2, bool blocking=true) |
Moves a robot to a specific target ("Move Circular" mode). By default, this function blocks until the robot finishes its movements.More... |
|
int | MoveJ_Test(consttJoints&j1, consttJoints&j2, double minstep_deg=-1) |
Checks if a joint movement is possible and, optionally, free of collisions.More... |
|
int | MoveL_Test(consttJoints&joints1, constMat&pose2, double minstep_mm=-1) |
Checks if a linear movement is free of issues and, optionally, collisions.More... |
|
void | 年代etSpeed(double speed_linear, double accel_linear=-1, double speed_joints=-1, double accel_joints=-1) |
Sets the speed and/or the acceleration of a robot.More... |
|
void | 年代etRounding(double zonedata) |
Sets the robot movement smoothing accuracy (also known as zone data value).More... |
|
void | ShowSequence(tMatrix2D*sequence) |
Displays a sequence of jointsMore... |
|
bool | Busy() |
Checks if a robot or program is currently running (busy or moving)More... |
|
void | Stop() |
Stops a program or a robotMore... |
|
void | WaitMove(double timeout_sec=300) const |
Waits (blocks) until the robot finishes its movement.More... |
|
void | 年代etAccuracyActive(int accurate=1) |
集机器人活动或非活动的准确性。A robot must have been calibrated to properly use this option.More... |
|
bool | MakeProgram(const QString &filename) |
Saves a program to a file.More... |
|
void | 年代etRunType(int program_run_type) |
Sets if the program will be run in simulation mode or on the real robot. Use: "PROGRAM_RUN_ON_SIMULATOR" to set the program to run on the simulator only or "PROGRAM_RUN_ON_ROBOT" to force the program to run on the robot.More... |
|
int | RunProgram() |
Runs a program. It returns the number of instructions that can be executed successfully (a quick program check is performed before the program starts) This is a non-blocking call. Use IsBusy() to check if the program execution finished. Notes: if setRunMode(RUNMODE_SIMULATE) is used -> the program will be simulated (default run mode) if setRunMode(RUNMODE_RUN_ROBOT) is used -> the program will run on the robot (default when RUNMODE_RUN_ROBOT is used) if setRunMode(RUNMODE_RUN_ROBOT) is used together with program.setRunType(PROGRAM_RUN_ON_ROBOT) -> the program will run sequentially on the robot the same way as if we right clicked the program and selected "Run on robot" in theRoboDKGUIMore... |
|
int | RunCode(const QString ¶meters) |
Runs a program. It returns the number of instructions that can be executed successfully (a quick program check is performed before the program starts) Program parameters can be provided for Python calls. This is a non-blocking call.Use IsBusy() to check if the program execution finished. Notes: if setRunMode(RUNMODE_SIMULATE) is used -> the program will be simulated (default run mode) if setRunMode(RUNMODE_RUN_ROBOT) is used ->the program will run on the robot(default when RUNMODE_RUN_ROBOT is used) if setRunMode(RUNMODE_RUN_ROBOT) is used together with program.setRunType(PROGRAM_RUN_ON_ROBOT) -> the program will run sequentially on the robot the same way as if we right clicked the program and selected "Run on robot" in theRoboDKGUIMore... |
|
int | RunInstruction(const QString代码,int run_type =RoboDK::INSTRUCTION_CALL_PROGRAM) |
Adds a program call, code, message or comment inside a program.More... |
|
void | Pause(double time_ms=-1) |
Generates a pause instruction for a robot or a program when generating code. Set it to -1 (default) if you want the robot to stop and let the user resume the program anytime.More... |
|
void | 年代etDO(const QString &io_var, const QString &io_value) |
Sets a variable (output) to a given value. This can also be used to set any variables to a desired value.More... |
|
void | 年代etAO(const QString &io_var, const QString &io_value) |
Set an analog OutputMore... |
|
QString | getDI(const QString &io_var) |
Get a Digital Input (DI). This function is only useful when connected to a real robot using the robot driver. It returns a string related to the state of the Digital Input (1=True, 0=False). This function returns an empty string if the script is not executed on the robot.More... |
|
QString | getAI(const QString &io_var) |
Get an Analog Input (AI). This function is only useful when connected to a real robot using the robot driver. It returns a string related to the state of the Digital Input (0-1 or other range depending on the robot driver). This function returns an empty string if the script is not executed on the robot.More... |
|
void | waitDI(const QString &io_var, const QString &io_value, double timeout_ms=-1) |
Waits for an input io_id to attain a given value io_value. Optionally, a timeout can be provided.More... |
|
void | customInstruction(const QString &name, const QString &path_run, const QString &path_icon="", bool blocking=true, const QString &cmd_run_on_robot="") |
Add a custom instruction. This instruction will execute a Python file or an executable file.More... |
|
void | ShowInstructions(bool visible=true) |
Show or hide instruction items of a program in theRoboDKtreeMore... |
|
void | ShowTargets(bool visible=true) |
Show or hide targets of a program in theRoboDKtreeMore... |
|
int | InstructionCount() |
Returns the number of instructions of a program.More... |
|
void | Instruction(int ins_id, QString &name, int &instype, int &movetype, bool &isjointtarget,Mat&target,tJoints&joints) |
Returns the program instruction at position idMore... |
|
void | 年代etInstruction(int ins_id, const QString &name, int instype, int movetype, bool isjointtarget, constMat&target, consttJoints&joints) |
Sets the program instruction at position idMore... |
|
int | InstructionList(tMatrix2D*instructions) |
Returns the list of program instructions as an MxN matrix, where N is the number of instructions and M equals to 1 plus the number of robot axes.More... |
|
double | Update(int collision_check=RoboDK::COLLISION_OFF, int timeout_sec=3600, double *out_nins_time_dist=nullptr, double mm_step=-1, double deg_step=-1) |
Updates a program and returns the estimated time and the number of valid instructions. An update can also be applied to a robot machining project. The update is performed on the generated program.More... |
|
int | InstructionListJoints(QString &error_msg,tMatrix2D**joint_list, double mm_step=10.0, double deg_step=5.0, const QString &save_to_file="", bool collision_check=false, int flags=0, double time_step_s=0.1) |
Returns a list of joints an MxN matrix, where M is the number of robot axes plus 4 columns. Linear moves are rounded according to the smoothing parameter set inside the program.More... |
|
QString | 年代etParam(const QString ¶m, const QString &value) |
Set a specific item parameter. SelectTools-Run Script-Show Commandsto see all available commands for items and the station. Note: For parameters (commands) that require a JSON string value you can also provide a dict.More... |
|
bool | Finish() |
Disconnect from theRoboDKAPI. This flushes any pending program generation.More... |
|
quint64 | GetID() |
Get the item pointer. |
|
Private Attributes |
|
RoboDK* | _RDK |
Pointer toRoboDKlink object. |
|
quint64 | _PTR |
指针里面的物品RoboDK. |
|
qint32 | _TYPE |
Itemtype. |
|
Friends |
|
class | RoboDK_API::RoboDK |
TheItemclass represents an item inRoboDK年代tation. An item can be a robot, a frame, a tool, an object, a target, ... any item visible in the年代tation tree. An item can also be seen as a node where other items can be attached to (child items). Every item has one parent item/node and can have one or more child items/nodes.
Definition at line1739of filerobodk_api.h.
Adds an empty tool to the robot provided the tool pose (4x4 Matrix) and the tool name.
tool_pose | TCP as a 4x4 Matrix (pose of the tool frame) |
tool_name | New tool name |
tool_pose | pose -> TCP as a 4x4 Matrix (pose of the tool frame) |
tool_name | New tool name |
Definition at line1222of filerobodk_api.cpp.
ItemAttachClosest | ( | ) |
Attach the closest object to the tool. Returns the item that was attached.
Definition at line672of filerobodk_api.cpp.
bool Busy | ( | ) |
Checks if a robot or program is currently running (busy or moving)
Definition at line1583of filerobodk_api.cpp.
QList<Item> Childs | ( | ) | const |
Returns a list of the item childs that are attached to the provided item.
add more methods
Definition at line726of filerobodk_api.cpp.
bool Connect | ( | const QString & | robot_ip="" |
) |
Connect to a real robot using the corresponding robot driver.
Connect to a real robot using the robot driver.
robot_ip | IP of the robot to connect. Leave empty to use the one defined inRoboDK |
robot_ip | IP of the robot to connect. Leave empty to use the one defined inRoboDK |
Definition at line1366of filerobodk_api.cpp.
void customInstruction | ( | const QString & | name, |
const QString & | path_run, | ||
const QString & | path_icon="" , |
||
bool | blocking=true , |
||
const QString & | cmd_run_on_robot="" |
||
) |
Add a custom instruction. This instruction will execute a Python file or an executable file.
name | |
path_run | path to run(relative to RoboDK/bin folder or absolute path) |
path_icon | icon path(relative to RoboDK/bin folder or absolute path) |
blocking | True if blocking, 0 if it is a non blocking executable trigger |
cmd_run_on_robot | Command to run through the driver when connected to the robot |
:param name: digital input (string or number)
Definition at line1826of filerobodk_api.cpp.
无效的删除 | ( | ) |
删除年代an item and its childs from the station.
Definition at line624of filerobodk_api.cpp.
void DetachAll | ( | Item | parent | ) |
Detach any object attached to a tool.
Definition at line698of filerobodk_api.cpp.
Detach the closest object attached to the tool (see also setParentStatic).
Definition at line685of filerobodk_api.cpp.
bool Disconnect | ( | ) |
Disconnect from a real robot (when the robot driver is used)
Definition at line1380of filerobodk_api.cpp.
bool Finish | ( | ) |
Disconnect from theRoboDKAPI. This flushes any pending program generation.
Definition at line2075of filerobodk_api.cpp.
MatGeometryPose | ( | ) |
Returns the position (pose) the object geometry with respect to its own reference frame. This procedure works for tools and objects.
Definition at line840of filerobodk_api.cpp.
QString getAI | ( | const QString & | io_var | ) |
Get an Analog Input (AI). This function is only useful when connected to a real robot using the robot driver. It returns a string related to the state of the Digital Input (0-1 or other range depending on the robot driver). This function returns an empty string if the script is not executed on the robot.
io_var | io_var -> analog input (string or number as a string) |
Definition at line1790of filerobodk_api.cpp.
QString getDI | ( | const QString & | io_var | ) |
Get a Digital Input (DI). This function is only useful when connected to a real robot using the robot driver. It returns a string related to the state of the Digital Input (1=True, 0=False). This function returns an empty string if the script is not executed on the robot.
io_var | io_var -> digital input (string or number as a string) |
Definition at line1776of filerobodk_api.cpp.
ItemgetLink | ( | int | type_linked=RoboDK::ITEM_TYPE_ROBOT |
) |
Returns an item linked to a robot, object, tool, program or robot machining project. This is useful to retrieve the relationship between programs, robots, tools and other specific projects.
Returns an item pointer (Itemclass) to a robot, object, tool or program. This is useful to retrieve the relationship between programs, robots, tools and other specific projects.
type_linked | type of linked object to retrieve |
type_linked | type of linked object to retrieve |
Definition at line1149of filerobodk_api.cpp.
void Instruction | ( | int | ins_id, |
QString & | name, | ||
int & | instype, | ||
int & | movetype, | ||
bool & | isjointtarget, | ||
Mat& | target, | ||
tJoints& | joints | ||
) |
Returns the program instruction at position id
ins_id | |
name | |
instype | |
movetype | |
isjointtarget | |
target | |
joints |
Definition at line1916of filerobodk_api.cpp.
int InstructionCount | ( | ) |
Returns the number of instructions of a program.
ADD MORE METHODS
Definition at line1897of filerobodk_api.cpp.
int InstructionList | ( | tMatrix2D* | instructions | ) |
Returns the list of program instructions as an MxN matrix, where N is the number of instructions and M equals to 1 plus the number of robot axes.
instructions | the matrix of instructions |
Definition at line1969of filerobodk_api.cpp.
int InstructionListJoints | ( | QString & | error_msg, |
tMatrix2D** | joint_list, | ||
double | mm_step=10.0 , |
||
double | deg_step=5.0 , |
||
const QString & | 年代ave_to_file="" , |
||
bool | 上校lision_check=false , |
||
int | result_flag=0 , |
||
double | time_step_s=0.1 |
||
) |
Returns a list of joints an MxN matrix, where M is the number of robot axes plus 4 columns. Linear moves are rounded according to the smoothing parameter set inside the program.
error_msg | Returns a human readable error message (if any) |
joint_list | Returns the list of joints as [J1, J2, ..., Jn, ERROR, MM_STEP, DEG_STEP, MOVE_ID] if a file name is not specified |
If flags == LISTJOINTS_SPEED: [J1, J2, ..., Jn, ERROR, MM_STEP, DEG_STEP, MOVE_ID, TIME, X_TCP, Y_TCP, Z_TCP, Speed_J1, Speed_J2, ..., Speed_Jn] If flags == LISTJOINTS_ACCEL: [J1, J2, ..., Jn, ERROR, MM_STEP, DEG_STEP, MOVE_ID, TIME, X_TCP, Y_TCP, Z_TCP, Speed_J1, Speed_J2, ..., Speed_Jn, Accel_J1, Accel_J2, ..., Accel_Jn]
mm_step | Maximum step in millimeters for linear movements (millimeters) |
deg_step | Maximum step for joint movements (degrees) |
年代ave_to_file | Provide a file name to directly save the output to a file. If the file name is not provided it will return the matrix. If step values are very small, the returned matrix can be very large. |
上校lision_check | Check for collisions |
result_flag | 年代et to 1 to include the timings between movements, set to 2 to also include the joint speeds (deg/s), set to 3 to also include the accelerations, set to 4 to include all previous information and make the splitting time-based. |
time_step_s | (optional) set the time step in seconds for time based calculation. This value is only used when the result flag is set to 4 (time based). |
error_msg | Returns a human readable error message (if any) |
joint_list | Returns the list of joints as [J1, J2, ..., Jn, ERROR, MM_STEP, DEG_STEP, MOVE_ID] if a file name is not specified |
mm_step | Maximum step in millimeters for linear movements (millimeters) |
deg_step | Maximum step for joint movements (degrees) |
年代ave_to_file | Provide a file name to directly save the output to a file. If the file name is not provided it will return the matrix. If step values are very small, the returned matrix can be very large. |
上校lision_check | Check for collisions |
result_flag | 年代et to 1 to include the timings between movements, set to 2 to also include the joint speeds (deg/s), set to 3 to also include the accelerations, set to 4 to include all previous information and make the splitting time-based. |
time_step_s | (optional) set the time step in seconds for time based calculation. This value is only used when the result flag is set to 4 (time based). |
Definition at line2030of filerobodk_api.cpp.
bool isJointTarget | ( | ) | const |
Returns True if a target is a joint target (green icon). Otherwise, the target is a Cartesian target (red icon).
Definition at line1075of filerobodk_api.cpp.
Retrieve the joint limits of a robot
Returns the joint limits of a robot
lower_limits | |
upper_limits |
Definition at line1177of filerobodk_api.cpp.
tJointsJoints | ( | ) | const |
Returns the current joints of a robot or the joints of a target. If the item is a cartesian target, it returns the preferred joints (configuration) to go to that cartesian position.
Definition at line1090of filerobodk_api.cpp.
Returns the robot configuration state for a set of robot joints.
joints | array of joints |
config | configuration status as [REAR, LOWERARM, FLIP] |
joints | array of joints |
Definition at line1260of filerobodk_api.cpp.
tJointsJointsHome | ( | ) | const |
Returns the home joints of a robot. These joints can be manually set in the robot "Parameters" menu, then select "Set home position"
Definition at line1106of filerobodk_api.cpp.
bool MakeProgram | ( | const QString & | filename | ) |
Saves a program to a file.
filename | File path of the program |
run_mode | RUNMODE_MAKE_ROBOTPROG to generate the program file.Alternatively, Use RUNMODE_MAKE_ROBOTPROG_AND_UPLOAD or RUNMODE_MAKE_ROBOTPROG_AND_START to transfer the program through FTP and execute the program. |
filename | File path of the program |
Definition at line1645of filerobodk_api.cpp.
Moves a robot to a specific target ("Move Circular" mode). By default, this function blocks until the robot finishes its movements.
itemtarget1 | Intermediate target to move to as a target item (RoboDKtarget item) |
itemtarget2 | Final target to move to as a target item (RoboDKtarget item) |
itemtarget1 | target -> intermediate target to move to as a target item (RoboDKtarget item) |
itemtarget2 | target -> final target to move to as a target item (RoboDKtarget item) |
blocking | blocking -> True if we want the instruction to block until the robot finished the movement (default=true) |
Definition at line1467of filerobodk_api.cpp.
Moves a robot to a specific target ("Move Circular" mode). By default, this function blocks until the robot finishes its movements.
target1 | Intermediate pose target to move to. It must be a 4x4 Homogeneous matrix |
target2 | Final pose target to move to. It must be a 4x4 Homogeneous matrix |
target1 | pose -> intermediate pose target to move to. It must be a 4x4 Homogeneous matrix |
target2 | pose -> final pose target to move to. It must be a 4x4 Homogeneous matrix |
blocking | blocking -> True if we want the instruction to block until the robot finished the movement (default=true) |
Definition at line1487of filerobodk_api.cpp.
Moves a robot to a specific target ("Move Circular" mode). By default, this function blocks until the robot finishes its movements.
joints1 | Intermediate joint target to move to. |
joints2 | Final joint target to move to. |
joints1 | joints -> intermediate joint target to move to. |
joints2 | joints -> final joint target to move to. |
blocking | blocking -> True if we want the instruction to block until the robot finished the movement (default=true) |
Definition at line1477of filerobodk_api.cpp.
void MoveJ | ( | constItem& | itemtarget, |
bool | blocking=true |
||
) |
Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements. Given a target item, MoveJ can also be applied to programs and a new movement instruction will be added.
Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements.
target | Target to move to as a target item (RoboDKtarget item) |
target | target -> target to move to as a target item (RoboDKtarget item) |
blocking | blocking -> True if we want the instruction to block until the robot finished the movement (default=true) |
Definition at line1394of filerobodk_api.cpp.
void MoveJ | ( | constMat& | target, |
bool | blocking=true |
||
) |
Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements.
target | Pose target to move to. It must be a 4x4 Homogeneous matrix |
target | pose -> pose target to move to. It must be a 4x4 Homogeneous matrix |
blocking | blocking -> True if we want the instruction to block until the robot finished the movement (default=true) |
Definition at line1421of filerobodk_api.cpp.
void MoveJ | ( | consttJoints& | joints, |
bool | blocking=true |
||
) |
Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements.
target | Robot joints to move to |
target | joints -> joint target to move to. |
blocking | blocking -> True if we want the instruction to block until the robot finished the movement (default=true) |
Definition at line1412of filerobodk_api.cpp.
Checks if a joint movement is possible and, optionally, free of collisions.
Checks if a joint movement is free of collision.
j1 | Start joints |
j2 | Destination joints |
minstep_deg | Maximum joint step in degrees. If this value is not provided it will use the path step defined in Tools-Options-Motion (degrees). |
j1 | joints -> start joints |
j2 | joints -> destination joints |
minstep_deg | (optional): maximum joint step in degrees |
Definition at line1498of filerobodk_api.cpp.
void MoveL | ( | constItem& | itemtarget, |
bool | blocking=true |
||
) |
Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements. Given a target item, MoveL can also be applied to programs and a new movement instruction will be added.
Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements.
itemtarget | Target to move to as a target item (RoboDKtarget item) |
itemtarget | target -> target to move to as a target item (RoboDKtarget item) |
blocking | blocking -> True if we want the instruction to block until the robot finished the movement (default=true) |
Definition at line1430of filerobodk_api.cpp.
void MoveL | ( | constMat& | target, |
bool | blocking=true |
||
) |
Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements.
target | Pose target to move to. It must be a 4x4 Homogeneous matrix |
target | pose -> pose target to move to. It must be a 4x4 Homogeneous matrix |
blocking | blocking -> True if we want the instruction to block until the robot finished the movement (default=true) |
Definition at line1457of filerobodk_api.cpp.
void MoveL | ( | consttJoints& | joints, |
bool | blocking=true |
||
) |
Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements.
joints | Robot joints to move to |
joints | joints -> joint target to move to. |
blocking | blocking -> True if we want the instruction to block until the robot finished the movement (default=true) |
Definition at line1448of filerobodk_api.cpp.
Checks if a linear movement is free of issues and, optionally, collisions.
Checks if a linear movement is free of collision.
joints1 | Start joints |
pose2 | Destination pose (active tool with respect to the active reference frame) |
minstep_mm | Maximum joint step in mm. If this value is not provided it will use the path step defined in Tools-Options-Motion (mm). |
j1 | joints -> start joints |
pose2 | joints -> destination pose (active tool with respect to the active reference frame) |
minstep_mm | (optional): maximum joint step in degrees |
Definition at line1519of filerobodk_api.cpp.
QString Name | ( | ) | const |
Returns the name of an item. The name of the item is always displayed in theRoboDK年代tation tree
Definition at line774of filerobodk_api.cpp.
void NewLink | ( | ) |
Create a new communication link forRoboDK. Use this for robots if you use a multithread application running multiple robots at the same time.
Definition at line593of filerobodk_api.cpp.
ItemObjectLink | ( | int | link_id=0 |
) |
Returns an item pointer to the geometry of a robot link. This is useful to show/hide certain robot links or alter their geometry.
Returns an item pointer (:class:.Item
) to a robot link. This is useful to show/hide certain robot links or alter their geometry.
link_id | link index(0 for the robot base, 1 for the first link, ...) |
link_id | link index(0 for the robot base, 1 for the first link, ...) |
Definition at line1134of filerobodk_api.cpp.
ItemParent | ( | ) | const |
void Pause | ( | double | time_ms=-1 |
) |
Generates a pause instruction for a robot or a program when generating code. Set it to -1 (default) if you want the robot to stop and let the user resume the program anytime.
time_ms | Time in milliseconds |
Definition at line1736of filerobodk_api.cpp.
MatPose | ( | ) | const |
Returns the local position (pose) of an object, target or reference frame. For example, the position of an object/frame/target with respect to its parent. If a robot is provided, it will get the pose of the end efector
Definition at line815of filerobodk_api.cpp.
MatPoseAbs | ( | ) |
Returns the global position (pose) of an item. For example, the position of an object/frame/target with respect to the station origin.
Definition at line970of filerobodk_api.cpp.
MatPoseFrame | ( | ) |
Returns the reference frame pose of an item. If a robot is provided it will get the tool pose of the active reference frame used by the robot.
Definition at line892of filerobodk_api.cpp.
MatPoseTool | ( | ) |
Returns the tool pose of an item. If a robot is provided it will get the tool pose of the active tool held by the robot.
Definition at line879of filerobodk_api.cpp.
RoboDK* RDK | ( | ) |
int RunCode | ( | const QString & | parameters | ) |
Runs a program. It returns the number of instructions that can be executed successfully (a quick program check is performed before the program starts) Program parameters can be provided for Python calls. This is a non-blocking call.Use IsBusy() to check if the program execution finished. Notes: if setRunMode(RUNMODE_SIMULATE) is used -> the program will be simulated (default run mode) if setRunMode(RUNMODE_RUN_ROBOT) is used ->the program will run on the robot(default when RUNMODE_RUN_ROBOT is used) if setRunMode(RUNMODE_RUN_ROBOT) is used together with program.setRunType(PROGRAM_RUN_ON_ROBOT) -> the program will run sequentially on the robot the same way as if we right clicked the program and selected "Run on robot" in theRoboDKGUI
parameters | Number of instructions that can be executed |
Definition at line1701of filerobodk_api.cpp.
int RunInstruction | ( | const QString & | code, |
int | run_type=RoboDK::INSTRUCTION_CALL_PROGRAM |
||
) |
Adds a program call, code, message or comment inside a program.
code |
|
Definition at line1721of filerobodk_api.cpp.
int RunProgram | ( | ) |
Runs a program. It returns the number of instructions that can be executed successfully (a quick program check is performed before the program starts) This is a non-blocking call. Use IsBusy() to check if the program execution finished. Notes: if setRunMode(RUNMODE_SIMULATE) is used -> the program will be simulated (default run mode) if setRunMode(RUNMODE_RUN_ROBOT) is used -> the program will run on the robot (default when RUNMODE_RUN_ROBOT is used) if setRunMode(RUNMODE_RUN_ROBOT) is used together with program.setRunType(PROGRAM_RUN_ON_ROBOT) -> the program will run sequentially on the robot the same way as if we right clicked the program and selected "Run on robot" in theRoboDKGUI
Definition at line1682of filerobodk_api.cpp.
void Save | ( | const QString & | filename | ) |
Save a station, a robot, a tool or an object to a file
Save a station or object to a file
filename | path and file name |
filename |
Definition at line617of filerobodk_api.cpp.
void Scale | ( | double | 年代cale | ) |
Apply a scale to an object to make it bigger or smaller. The scale can be uniform (if scale is a float value) or per axis (if scale is a vector).
------------------------------— add curve, scale, recolor, ...
年代cale | 年代cale to apply as scale or [scale_x, scale_y, scale_z] |
Definition at line1003of filerobodk_api.cpp.
void Scale | ( | double | 年代cale_xyz[3] | ) |
Apply a per-axis scale to an object to make it bigger or smaller. The scale can be uniform (if scale is a float value) or per axis (if scale is a vector).
年代cale | 年代cale to apply as [scale_x, scale_y, scale_z] |
Definition at line1016of filerobodk_api.cpp.
void setAccuracyActive | ( | int | accurate=1 |
) |
集机器人活动或非活动的准确性。A robot must have been calibrated to properly use this option.
accurate | 年代et to 1 to use the accurate model or 0 to use the nominal model |
Definition at line1627of filerobodk_api.cpp.
void setAO | ( | const QString & | io_var, |
const QString & | io_value | ||
) |
Set an analog Output
io_var | Analog Output |
io_value | Value as a string |
Definition at line1763of filerobodk_api.cpp.
void setAsCartesianTarget | ( | ) |
Sets a target as a cartesian target. A cartesian target moves to cartesian coordinates.
Definition at line1055of filerobodk_api.cpp.
void setAsJointTarget | ( | ) |
Sets a target as a joint target. A joint target moves to a joints position without regarding the cartesian coordinates.
Definition at line1065of filerobodk_api.cpp.
void setColor | ( | double | 上校orRGBA[4] | ) |
Changes the color of a robot/object/tool. A color must must in the format COLOR=[R,G,B,(A=1)] where all values range from 0 to 1. Alpha (A) defaults to 1 (100% opaque). Set A to 0 to make an object transparent.
Set the color of an object, tool or robot. A color must in the format COLOR=[R,G,B,(A=1)] where all values range from 0 to 1.
tocolor | 上校or to change to |
fromcolor | filter by this color |
tolerance | optional tolerance to use if a color filter is used (defaults to 0.1) |
Definition at line983of filerobodk_api.cpp.
void setDO | ( | const QString & | io_var, |
const QString & | io_value | ||
) |
Sets a variable (output) to a given value. This can also be used to set any variables to a desired value.
io_var | io_var -> digital output (string or number) |
io_value | io_value -> value (string or number) |
Definition at line1750of filerobodk_api.cpp.
void setGeometryPose | ( | constMat | pose | ) |
Sets the position (pose) the object geometry with respect to its own reference frame. This procedure works for tools and objects.
pose | 4x4 homogeneous matrix |
apply_movement | Apply the movement to the inner geometry and not as a pose shift |
pose | 4x4 homogeneous matrix |
Definition at line828of filerobodk_api.cpp.
void setInstruction | ( | int | ins_id, |
const QString & | name, | ||
int | instype, | ||
int | movetype, | ||
bool | isjointtarget, | ||
constMat& | target, | ||
consttJoints& | joints | ||
) |
Sets the program instruction at position id
ins_id | |
name | |
instype | |
movetype | |
isjointtarget | |
target | |
joints |
Definition at line1946of filerobodk_api.cpp.
Set the joint limits of a robot
lower_limits | |
upper_limits |
Definition at line1192of filerobodk_api.cpp.
void setJoints | ( | consttJoints& | jnts | ) |
Set robot joints or the joints of a target
Sets the current joints of a robot or the joints of a target. It the item is a cartesian target, it returns the preferred joints (configuration) to go to that cartesian position.
joints |
Definition at line1164of filerobodk_api.cpp.
void setJointsHome | ( | consttJoints& | jnts | ) |
Set robot joints for the home position
Sets the joint position of the "home" joints for a robot.
joints |
Definition at line1121of filerobodk_api.cpp.
Update the robot milling path input and parameters. Parameter input can be an NC file (G-code or APT file) or an object item inRoboDK. A curve or a point follow project will be automatically set up for a robot manufacturing project.
Tip: UsegetLink()and setLink() to get/set the robot tool, reference frame, robot and program linked to the project.
Tip: Use年代etPose()and年代etJoints()to update the path to tool orientation or the preferred start joints.
Tip: Use年代etPoseTool()and年代etPoseFrame()to link to the corresponding tool and reference frames.
Update the robot milling path input and parameters. Parameter input can be an NC file (G-code or APT file) or an object item inRoboDK. A curve or a point follow project will be automatically set up for a robot manufacturing project. Tip: UsegetLink()and setLink() to get/set the robot tool, reference frame, robot and program linked to the project. Tip: Use年代etPose()and年代etJoints()to update the path to tool orientation or the preferred start joints.
ncfile | path to the NC (G-code/APT/Point cloud) file to load (optional) |
part_obj | object holding curves or points to automatically set up a curve/point follow project (optional) |
options | Additional options (optional) |
ncfile | path to the NC (G-code/APT/Point cloud) file to load (optional) |
part_obj | object holding curves or points to automatically set up a curve/point follow project (optional) |
options | Additional options (optional) |
Definition at line1036of filerobodk_api.cpp.
void setName | ( | const QString & | name | ) |
QString setParam | ( | const QString & | param, |
const QString & | value | ||
) |
Set a specific item parameter. SelectTools-Run Script-Show Commandsto see all available commands for items and the station. Note: For parameters (commands) that require a JSON string value you can also provide a dict.
param | item parameter |
value | value |
Definition at line2060of filerobodk_api.cpp.
void setParent | ( | Item | parent | ) |
Attaches the item to a new parent while maintaining the relative position with its parent. The absolute position is changed.
parent |
Definition at line647of filerobodk_api.cpp.
void setParentStatic | ( | Item | parent | ) |
Attaches the item to another parent while maintaining the current absolute position in the station. The relationship between this item and its parent is changed to maintain the abosolute position.
parent | parent item to attach this item to |
parent | parent item to attach this item |
Definition at line660of filerobodk_api.cpp.
void setPose | ( | constMat | pose | ) |
Sets the local position (pose) of an object, target or reference frame. For example, the position of an object/frame/target with respect to its parent. If a robot is provided, it will set the pose of the end efector.
pose | 4x4 homogeneous matrix |
Definition at line802of filerobodk_api.cpp.
void setPoseAbs | ( | constMat | pose | ) |
Sets the global position (pose) of an item. For example, the position of an object/frame/target with respect to the station origin.
pose | 4x4 homogeneous matrix (pose) |
Definition at line957of filerobodk_api.cpp.
void setPoseFrame | ( | constItem | frame_item | ) |
设置一个机器人的工具或工具对象(Ce的工具nter Point, or TCP). The tool pose can be either an item or a 4x4 Matrix. If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.
pose | 4x4 homogeneous matrix (pose) |
Definition at line919of filerobodk_api.cpp.
void setPoseFrame | ( | constMat | frame_pose | ) |
Sets the reference frame of a robot(user frame). The frame can be either an item or a pose. If "frame" is an item, it links the robot to the frame item. If frame is a pose, it updates the linked pose of the robot frame (with respect to the robot reference frame).
frame_pose | 4x4 homogeneous matrix (pose) |
Definition at line906of filerobodk_api.cpp.
void setPoseTool | ( | constItem | tool_item | ) |
设置一个机器人的工具或工具对象(Ce的工具nter Point, or TCP). The tool pose can be either an item or a 4x4 Matrix. If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.
tool_item | Tool item |
Definition at line945of filerobodk_api.cpp.
void setPoseTool | ( | constMat | tool_pose | ) |
设置一个机器人的工具或工具对象(Ce的工具nter Point, or TCP). The tool pose can be either an item or a 4x4 Matrix. If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.
tool_pose | 4x4 homogeneous matrix (pose) |
Definition at line932of filerobodk_api.cpp.
void setRobot | ( | constItem& | robot | ) |
Sets the robot of a program or a target. You must set the robot linked to a program or a target every time you copy paste these objects. If the robot is not provided, the first available robot will be chosen automatically.
robot | Robot item |
Definition at line1207of filerobodk_api.cpp.
void setRounding | ( | double | zonedata | ) |
Sets the robot movement smoothing accuracy (also known as zone data value).
rounding_mm | Rounding value (double) (robot dependent, set to -1 for accurate/fine movements) |
zonedata | zonedata value (int) (robot dependent, set to -1 for fine movements) |
Definition at line1558of filerobodk_api.cpp.
void setRunType | ( | int | program_run_type | ) |
Sets if the program will be run in simulation mode or on the real robot. Use: "PROGRAM_RUN_ON_SIMULATOR" to set the program to run on the simulator only or "PROGRAM_RUN_ON_ROBOT" to force the program to run on the robot.
Definition at line1665of filerobodk_api.cpp.
void setSpeed | ( | double | 年代peed_linear, |
double | accel_linear=-1 , |
||
double | 年代peed_joints=-1 , |
||
double | accel_joints=-1 |
||
) |
Sets the speed and/or the acceleration of a robot.
年代peed_linear | 线性速度mm / s(1 =没有变化) |
accel_linear | linear acceleration in mm/s2 (-1 = no change) |
年代peed_joints | joint speed in deg/s (-1 = no change) |
accel_joints | joint acceleration in deg/s2 (-1 = no change) |
Definition at line1541of filerobodk_api.cpp.
void setVisible | ( | bool | visible, |
int | visible_frame=-1 |
||
) |
Sets the item visiblity status
visible | |
visible_reference | 年代et the visible reference frame (1) or not visible (0) |
visible | |
visible_frame | 年代rt the visible reference frame (1) or not visible (0) |
Definition at line757of filerobodk_api.cpp.
void ShowInstructions | ( | bool | visible=true |
) |
Show or hide instruction items of a program in theRoboDKtree
年代how |
Definition at line1871of filerobodk_api.cpp.
void ShowSequence | ( | tMatrix2D* | 年代equence | ) |
Displays a sequence of joints
年代equence | joint sequence as a 6xN matrix or instruction sequence as a 7xN matrix |
Definition at line1570of filerobodk_api.cpp.
void ShowTargets | ( | bool | visible=true |
) |
Show or hide targets of a program in theRoboDKtree
年代how |
Definition at line1883of filerobodk_api.cpp.
Computes the forward kinematics of the robot for the provided joints. The tool and the reference frame are not taken into account.
joints |
Definition at line1238of filerobodk_api.cpp.
This function calculates the inverse kinematics for a pose. The joints returned are the closest to the current robot configuration (seeSolveIK_All()). If the pose is not reachable, the length of the returned joints is 0.
Computes the inverse kinematics for the specified robot and pose. The joints returned are the closest to the current robot configuration (seeSolveIK_All())
pose | 4 x4矩阵- >pose of the robot flange with respect to the robot base frame |
joints_close | Aproximate joints solution to choose among the possible solutions. Leave this value empty to return the closest match to the current robot position. |
tool_pose | Optionally provide a tool pose, otherwise, the robot flange is used. Tip: use robot.PoseTool() to retrieve the active robot tool. |
reference_pose | Optionally provide a reference pose, otherwise, the robot base is used. Tip: use robot.PoseFrame() to retrieve the active robot reference frame. |
pose | 4 x4矩阵- >pose of the robot flange with respect to the robot base frame |
tool | 4 x4矩阵- >Optionally provide a tool, otherwise, the robot flange is used. Tip: use robot.PoseTool() to retrieve the active robot tool. |
reference | 4 x4矩阵- >选择提供一个参考,其他rwise, the robot base is used. Tip: use robot.PoseFrame() to retrieve the active robot reference frame. |
Definition at line1278of filerobodk_api.cpp.
tJointsSolveIK | ( | constMat | pose, |
tJoints | joints_approx, | ||
constMat* | tool=nullptr , |
||
constMat* | ref=nullptr |
||
) |
Computes the inverse kinematics for the specified robot and pose. The joints returned are the closest to the current robot configuration (seeSolveIK_All())
pose | 4 x4矩阵- >pose of the robot flange with respect to the robot base frame |
joints_approx | Aproximate solution. Leave empty to return the closest match to the current robot position. |
tool | 4 x4矩阵- >Optionally provide a tool, otherwise, the robot flange is used. Tip: use robot.PoseTool() to retrieve the active robot tool. |
reference | 4 x4矩阵- >选择提供一个参考,其他rwise, the robot base is used. Tip: use robot.PoseFrame() to retrieve the active robot reference frame. |
Definition at line1306of filerobodk_api.cpp.
Computes the inverse kinematics for the specified robot and pose. The function returns all available joint solutions as a 2D matrix.
pose | 4 x4矩阵- >pose of the robot tool with respect to the robot frame |
tool_pose | Optionally provide a tool pose, otherwise, the robot flange is used. Tip: use robot.PoseTool() to retrieve the active robot tool. |
reference_pose | Optionally provide a reference pose, otherwise, the robot base is used. Tip: use robot.PoseFrame() to retrieve the active robot reference frame. |
Definition at line1348of filerobodk_api.cpp.
Computes the inverse kinematics for the specified robot and pose. The function returns all available joint solutions as a 2D matrix.
pose | 4 x4矩阵- >pose of the robot tool with respect to the robot frame |
tool_pose | Optionally provide a tool pose, otherwise, the robot flange is used. Tip: use robot.PoseTool() to retrieve the active robot tool. |
reference_pose | Optionally provide a reference pose, otherwise, the robot base is used. Tip: use robot.PoseFrame() to retrieve the active robot reference frame. |
pose | 4 x4矩阵- >pose of the robot tool with respect to the robot frame |
Definition at line1331of filerobodk_api.cpp.
void Stop | ( | ) |
int Type | ( | ) | const |
Itemtype (object, robot, tool, reference, robot machining project, ...)
Returns the type of an item (robot, object, target, reference frame, ...)
GENERIC ITEM CALLS
Definition at line602of filerobodk_api.cpp.
double Update | ( | int | 上校lision_check=RoboDK::COLLISION_OFF , |
int | timeout_sec=3600 , |
||
double * | out_nins_time_dist=nullptr , |
||
double | mm_step=-1 , |
||
double | deg_step=-1 |
||
) |
Updates a program and returns the estimated time and the number of valid instructions. An update can also be applied to a robot machining project. The update is performed on the generated program.
上校lision_check | check_collisions: Check collisions (COLLISION_ON -yes- or COLLISION_OFF -no-) |
timeout_sec | Maximum time to wait for the update to complete (in seconds) |
out_nins_time_dist | optional double array [3] = [valid_instructions, program_time, program_distance] |
mm_step | Maximum step in millimeters for linear movements (millimeters). Set to -1 to use the default, as specified in Tools-Options-Motion. |
deg_step | Maximum step for joint movements (degrees). Set to -1 to use the default, as specified in Tools-Options-Motion. |
Definition at line1991of filerobodk_api.cpp.
bool Valid | ( | bool | check_deleted=false |
) | const |
Check if an item is valid (not null and available in the open station)
Checks if the item is valid. An invalid item will be returned by an unsuccessful function call.
item_check | Itemto check |
Definition at line637of filerobodk_api.cpp.
bool Visible | ( | ) | const |
Returns 1 if the item is visible, otherwise, returns 0.
Definition at line744of filerobodk_api.cpp.
void waitDI | ( | const QString & | io_var, |
const QString & | io_value, | ||
double | timeout_ms=-1 |
||
) |
Waits for an input io_id to attain a given value io_value. Optionally, a timeout can be provided.
io_var | io_var -> digital output (string or number) |
io_value | io_value -> value (string or number) |
timeout_ms | int (optional) -> timeout in miliseconds |
Definition at line1806of filerobodk_api.cpp.
void WaitMove | ( | double | timeout_sec=300 |
) | const |
Waits (blocks) until the robot finishes its movement.
timeout_sec | timeout -> Max time to wait for robot to finish its movement (in seconds) |
Definition at line1607of filerobodk_api.cpp.