EASY-ROB™ Application Programming Interface  v9.301
Static Public Member Functions | List of all members
ER_CAPI_ROB_KIN Class Reference

Method class forward-, Inverse kinematics, desired robot joints, tools, position w.r.t. world and reference system. More...

#include <ER_CAPI.H>

Inheritance diagram for ER_CAPI_ROB_KIN:
ER_CAPI_ROB ER_CAPI_DEVICES ER_CAPI

Static Public Member Functions

static ER_DllExport int rob_kin_joint_trans (int joint_dof)
 Get active robot joint type
An active robot joint type can be rotational or prismatic
See rob_kin_joint_rot() More...
 
static ER_DllExport int rob_kin_joint_rot (int joint_dof)
 Get active robot joint type
An active robot joint type can be rotational or prismatic
See rob_kin_joint_trans() More...
 
static ER_DllExport float rob_kin_to_DEG (int joint_dof)
 Returns DEG if joint is rotational, else 1. More...
 
static ER_DllExport float rob_kin_to_RAD (int joint_dof)
 Returns RAD if joint is rotational, else 1. More...
 
static ER_DllExport frameinq_bTt (void)
 Robot Base to Tip (flange) More...
 
static ER_DllExport frameinq_bT0 (void)
 Robot Base to first joint of kinematics chain. More...
 
static ER_DllExport int * inq_num_tool (void)
 Number of available tools [1..KIN_TOOLS]. More...
 
static ER_DllExport int * inq_ctool_idx (void)
 Get current tool idx [0..KIN_TOOLS-1]. More...
 
static ER_DllExport frameinq_tTw (void)
 Current Tool frame, Robot Tip (flange) to TCP. More...
 
static ER_DllExport frameinq_tTw_strt (void)
 Start condition, Tool frame: Robot Tip to TCP. More...
 
static ER_DllExport frameinq_wTwo (void)
 Tool Offset frame, Robot Tcp' to TCP. More...
 
static ER_DllExport frameinq_wTwo_strt (void)
 Start condition, Tool Offset frame: Robot Tcp' to TCP. More...
 
static ER_DllExport frameinq_tTw_data_idx (int ctool_idx)
 Tool data for ctool_idx. More...
 
static ER_DllExport frameinq_tTw_data_strt_idx (int ctool_no)
 Start condition, Tool data for ctool_idx. More...
 
static ER_DllExport char * inq_tool_name (void)
 Get current tool name. More...
 
static ER_DllExport char * inq_tool_name_idx (int ctool_idx)
 Get tool name by tool idx. More...
 
static ER_DllExport float * inq_q_solut (void)
 Desired active joint axis values. More...
 
static ER_DllExport float * inq_q_strtpos (void)
 Start condition joint axis location. More...
 
static ER_DllExport float * inq_v_solut (void)
 Desired joint speed values. More...
 
static ER_DllExport float * inq_a_solut (void)
 Desired joint accel values. More...
 
static ER_DllExport frameinq_bTw (void)
 Robot Base to TCP. More...
 
static ER_DllExport frameinq_iTi_ref (void)
 World to attach position (reference position) of robot
This location is already updated, when calling data_update_all_devices() More...
 
static ER_DllExport frameinq_iTb (void)
 Attach position (reference position) to robot base
If the robot is not attached, the attach position is the world coorsys. More...
 
static ER_DllExport frameinq_iTb_strt (void)
 Start condition, Attach position (reference position) to robot base. More...
 
static ER_DllExport int * inq_ext_Tcp_idx (void)
 Enable/disable external Tcp for cRobot
Set *inq_ext_Tcp_idx()=1 to enable external TCP
Use inq_ext_Tcp() to define the external TCP location w.r.t. world coorsys. More...
 
static ER_DllExport frameinq_ext_Tcp (void)
 Transformation of external Tcp w.r.t. world coorsys. More...
 
static ER_DllExport frameinq_ext_Tcp_base (void)
 Transformation of external Tcp w.r.t. robot base. More...
 
static ER_DllExport frameinq_bBase (void)
 Program shift w.r.t. robot base
This method takes effect when executing a motion command given by values, such as
PTP 1.6101 0.8421 1.9112 20.3529 180.0000 0.0000
See inq_iBase() More...
 
static ER_DllExport frameinq_iBase (void)
 Program shift w.r.t. world coorsys
This method takes effect when executing a motion command given by values, such as
PTP 1.6101 0.8421 1.9112 20.3529 180.0000 0.0000 See inq_bBase() More...
 
static ER_DllExport int * inq_move_base (void)
 Moveable base mode
Used for special kinematics such as a CMM with a moving table as joint 1. More...
 
static ER_DllExport int * inq_move_base_jnt (void)
 Passive joint idx representing the moveable base. More...
 
static ER_DllExport char * inq_move_base_name (void)
 Name for moveable base. More...
 
static ER_DllExport frameinq_pjntTmb (void)
 Transformation from passive joint to moveable base frame. More...
 
static ER_DllExport frame ** inq_pjntTmb_ref (void)
 Reference, points to inq_pjntTmb() per default. More...
 
static ER_DllExport frameinq_bTmb (void)
 Robot base to moveable base frame. More...
 
static ER_DllExport frame ** inq_bTpjnt_ref (void)
 Reference of robot base to passive joints as move base, get from 'B' and ax_idx. More...
 
static ER_DllExport frameinq_mbTt (void)
 Moveable base to Tip. More...
 
static ER_DllExport frameinq_mbTw (void)
 Moveable base to TCP. More...
 
static ER_DllExport void rob_kin_set_warnings (int warn)
 Predefine or set the warning for all inverse solution
Use for the API for inverse kinematics
Parameter warn is one of WARN_OK, WARN_SINGULAR, WARN_UNREACH, WARN_CNFG, ::, WARN_SWE_EXCEED. More...
 
static ER_DllExport void rob_kin_user_msg (char *s)
 Displays message to the message window. More...
 
static ER_DllExport int rob_kin_vortrans (frame *bTt)
 Calling forward kinematics
The input joint values are in inq_q_solut()
See also rob_kin_vortrans_q() More...
 
static ER_DllExport int rob_kin_vortrans_q (float *qn, frame *bTt, frame *mbTt, int n_dofs)
 Calling forward kinematics
The forward kinematics calculates, depending on joint location q , the location of the flange (Tip) w.r.t. the robots base bTt
See also rob_kin_vortrans() More...
 
static ER_DllExport int rob_kin_jacobian_q (float *qn, frame *tTw, float *jac, int n_dofs, float delta_scale=1)
 Calculation of Jacobian matrix
This method calculates, depending on robots joint location q , the jacobian matrix in the flange (Tip) or in Tcp w.r.t. the robots base.
If parameter tTw is NULL, the jacobian is in the Tip.
Remarks
For known kinematics, the jacobian is calculated analytically.
For unknown or user defined kinematics, those with mathematically joint dependencies for example, the jacobian matrix is calculated computerized.
In this case a deviation of dR=0.01deg for rotational and dx=1mm for translational joints will be taken.
Parameter delta_scale allows to change these values. More...
 
static ER_DllExport int * inq_fwd_kin_reason (void)
 Reason for calculation the forward kinematics, return FWD_REASON_UNKNOWN ... FWD_REASON_CAD_EXPORT. More...
 
static ER_DllExport int rob_kin_q_in_travel_range (float *q)
 Transforms all revolute joints into valid travel range. More...
 
static ER_DllExport int rob_kin_chk_travel_range (float *q)
 Checks if all joint data are inside a valid travel range. More...
 
static ER_DllExport int * inq_invkin (void)
 Inverse kinematics ID for cRobot. More...
 
static ER_DllExport int * inq_invkin_sub (void)
 Inverse kinematics Sub-ID for cRobot. More...
 
static ER_DllExport int rob_kin_inv (frame *bTt)
 Calculate inverse kinematics solution IKP bTt - Robot Base to Tip (Flange), Results in inq_q_solut()
This method calculates all possible solutions, depending on the number of configurations inq_num_configs() of the robot
The warning vector inq_warnings() gives more detailed information for each solution
and contains one of WARN_OK=0, WARN_SINGULAR=1, WARN_UNREACH=2, WARN_CNFG=3, WARN_NO_INVKIN=4 or WARN_SWE_EXCEED=5
Current configuration inq_config() [0..KIN_CONFIGS-1]
Number of configurations for the cDevice inq_num_configs()
See code example in rob_kin_inv_ext() More...
 
static ER_DllExport int rob_kin_inv_ext (frame *bTw, float *q_solut, int shortest_angle)
 Calculate inverse kinematics solution IKP bTw - Robot Base to Wrist (TCP), Results in q_solut()
This method calculates all possible solutions, depending on the number of configurations inq_num_configs() of the robot
The warning vector inq_warnings() gives more detailed information for each solution
and contains one of WARN_OK=0, WARN_SINGULAR=1, WARN_UNREACH=2, WARN_CNFG=3, WARN_NO_INVKIN=4 or WARN_SWE_EXCEED=5
Current configuration inq_config() [0..KIN_CONFIGS-1]
Number of configurations for the cDevice inq_num_configs()
Configuration Solution IDs for the cDevice inq_cnfg_soln() More...
 
static ER_DllExport char * inq_kin_user_data_file (void)
 Kinematics data file for user kinematics. More...
 
static ER_DllExport double * inq_achs_length (void)
 Kinematics lengths in Z direction [m] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz() More...
 
static ER_DllExport double * inq_achs_offsets1 (void)
 Kinematics lengths in X direction [m] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz() More...
 
static ER_DllExport double * inq_achs_offsets2 (void)
 Kinematics lengths in Y direction [m] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz() More...
 
static ER_DllExport double * inq_achs_rotx (void)
 Kinematics angles for X rotation [deg] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz() More...
 
static ER_DllExport double * inq_achs_roty (void)
 Kinematics angles for Y rotation [deg] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz() More...
 
static ER_DllExport double * inq_achs_rotz (void)
 Kinematics angles for Z rotation [deg] for each active joint
Calculated from "Geometric Data to next". More...
 
static ER_DllExport frameinq_achs_T_activ (void)
 Kinematics transformation to the next joint for each active joint "Geometric Data to next"
. More...
 
static ER_DllExport frameinq_achs_T0_activ (void)
 Kinematics transformation from last joint for each active joint "Geometric Data from last"
. More...
 
static ER_DllExport frameinq_kin_T_active (int active_jnt_no)
 Homogeneous-Transformation from cRobot base to active Joint coorsys
depending on current joint location. More...
 
static ER_DllExport int * inq_num_kin_user_data (void)
 Number of Sets of Kin User Data
See also inq_kin_user_data_name(), inq_kin_user_data() More...
 
static ER_DllExport char ** inq_kin_user_data_name (int idx=0)
 Special User Data Names See also inq_num_kin_user_data(), inq_kin_user_data() More...
 
static ER_DllExport float * inq_kin_user_data (int idx=0)
 Special kinematics User Data See also inq_num_kin_user_data(), inq_kin_user_data_name() More...
 
static ER_DllExport double * inq_sing_tol (void)
 Singularity tolerance for each axis [m,rad]. More...
 
static ER_DllExport double * inq_sing_tolx (void)
 translational singularity tolerance [m] More...
 
static ER_DllExport double * inq_sing_tolq (void)
 Rotational singularity tolerance [rad]. More...
 
static ER_DllExport double * inq_joint_offset (void)
 cRobot joint offsets for each active joint in [m] or [rad] More...
 
static ER_DllExport float * inq_q (int soln)
 Solution array as a result of inverse kinematics calculation
The inverse kinematics IKP calculates for each possible configuration one set of joint values,
see rob_kin_inv() and rob_kin_inv_ext()
For each solution a warning value, which is one of WARN_OK=0, WARN_SINGULAR=1, WARN_UNREACH=2, WARN_CNFG=3, WARN_NO_INVKIN=4 or WARN_SWE_EXCEED=5 is calculated, see also inq_warnings()
The current or requested robot configuration can be achieved with inq_config() [0 ... "number of possible robot configurations"-1] The current joint axis values [rad,m] can be achieved with inq_q_solut() Remarks
The Solution array has a maximum size of [KIN_CONFIGS] by [KIN_DOFS]
. More...
 
static ER_DllExport int * inq_warnings (void)
 Warning vector for inverse kinematics
For each solution a warning value, which is one of WARN_OK, WARN_SINGULAR, WARN_UNREACH, WARN_CNFG, ::, WARN_SWE_EXCEED is calculated
See also solution array inq_q() More...
 
static ER_DllExport int * inq_active_jnt_sign (void)
 Sign for active joints
+1 for positive jont direction
-1 for negative joint direction. More...
 
static ER_DllExport int inq_num_active_jnts (void)
 Number of active joints
within [1..KIN_DOFS]. More...
 
static ER_DllExport int inq_num_passive_jnts (void)
 Number of passive joints
within [1..KIN_PASSIV_JNTS]. More...
 
static ER_DllExport float * inq_q_solut_passive (void)
 Desired passive joint axis values. More...
 
static ER_DllExport float * inq_swe_min_passive (void)
 Minimum travel ranges for passive joints. More...
 
static ER_DllExport float * inq_swe_max_passive (void)
 Maximum travel ranges for passive joints. More...
 
static ER_DllExport int inq_num_configs (void)
 Number of cRobot configurations within [1..KIN_CONFIGS]. More...
 
static ER_DllExport int inq_config (void)
 Return current robot configuration
within [0..KIN_CONFIGS-1], see also inq_num_configs() More...
 
static ER_DllExport int * inq_config_ext (void)
 Return pointer of current robot configuration
within [0..KIN_CONFIGS-1], see also inq_config() and inq_num_configs() More...
 
static ER_DllExport int * inq_cnfg_soln (void)
 Return robot configuration solution IDs
Remarks
All values should be different, i.e. [0 1 2 3 4 5 6 7]
Examples:
EASY-ROB mathematical solution order [0 1 2 3 4 5 6 7]
fits to ...
--> Fanuc solution order NUT , FUT , NDT , FDT , NDB , FDB , NUB , FUB -> [0 1 2 3 4 5 6 7]
--> Comau solution order — , –W , -E- , -EW , SE- , SEW , S– , S-W -> [0 4 2 6 1 5 3 7]
--> Kuka    solution order B010, B110, B000, B100, B001, B101, B011, B111 -> [0 1 2 3 4 5 6 7]
--> ABB solution order Cfg1, Cfg2, Cfg3, Cfg4, Cfg5, Cfg6, Cfg7, Cfg8 -> [0 4 2 6 1 5 3 7]. More...
 
static ER_DllExport int * inq_turn_enable (void)
 Turns enabled
The turn_enable is set automatically for PTP motion and if the PTP calculation mode is PTP_TARGET_CALC_MODE_TURNS. More...
 
static ER_DllExport int * inq_turn_value (void)
 Index for Turn Range, default=0
The turn_value depends on current robot joints and the defined turn_interval. More...
 
static ER_DllExport int calc_TurnValue (float *q=NULL, int *turn_value=NULL)
 Calculates turn value depending on robot joints q
The turn_value depends on current robot joints and the defined turn_interval
If q is NULL, this function uses the current robot joints inq_q_solut()
If turn_value is NULL, the results are in inq_turn_value() More...
 
static ER_DllExport ROB_DHinq_rob_dh_activ (void)
 Denavit-Hartenberg-Transformation to the next joint for each active joint "Geometric Data to next". More...
 
static ER_DllExport ROB_DHinq_rob_dh0_passiv (void)
 Denavit-Hartenberg-Transformation to previous joint for each passive joint "Geometric Data from last". More...
 
static ER_DllExport ROB_DHinq_rob_dh_passiv (void)
 Denavit-Hartenberg-Transformation to next joint for each passive joint "Geometric Data to next"
see inq_rob_dh0_passiv() More...
 
static ER_DllExport char * inq_robot_name (void)
 Name of cRobot. More...
 
static ER_DllExport char * inq_robot_fln_name (void)
 File name of cRobot. More...
 
static ER_DllExport int * inq_robot_type (void)
 Type of device, i.e. Robot, Tool, etc. More...
 
static ER_DllExport char * inq_robot_type_s (int type_idx=0)
 Name of current robot type
see inq_robot_type() More...
 
static ER_DllExport int * inq_robot_enabled (void)
 Dis- or enable current robot. More...
 
static ER_DllExport int * inq_robot_render (void)
 Render of cRobot. More...
 
static ER_DllExport int * inq_tool_render (void)
 Render of cRobots Tool. More...
 
static ER_DllExport int * inq_robot_collision (void)
 1-def, robot is in collision queue, if robot_collision disabled, no collision check More...
 
static ER_DllExport int * inq_tool_collision (void)
 1-def, tool is in collision queue, if tool_collision disabled, no collision check More...
 
static ER_DllExport int * inq_robot_ref_collision (void)
 0-def, collision chk vs. reference device
More...
 
static ER_DllExport int * inq_robot_itself_collision (void)
 0-def, collision chk vs. itself device
More...
 
static ER_DllExport int * inq_kin_connect_dof_activ (void)
 Dof array where active joints are connected to [-num_pJnts, ... , 0 , num_aJnts, tip]
Remarks
A negative idx represents a passive joint
A positive idx represents an active joint
Zero represents the robot base
see inq_kin_chain_type_activ(), inq_kin_type_activ(), inq_kin_chain_type_activ() More...
 
static ER_DllExport char * inq_kin_direction_activ (void)
 'X'-,'Y'- or 'Z'- direction for active joints
Remarks
For a six axis robot the direction string could be "ZYYXYX"
see inq_kin_type_activ(), inq_kin_chain_type_activ() More...
 
static ER_DllExport char * inq_kin_type_activ (void)
 'T'- translational-, 'R'- revolute for active joints Remarks
For a six axis robot with six rotational joints, the type string could be "RRRRRR"
see inq_kin_direction_activ(), inq_kin_chain_type_activ() More...
 
static ER_DllExport char * inq_kin_chain_type_activ (void)
 'C' in kin chain (default); '_' NOT in kin. chain; '-' separated and NOT in kin.chain
Remarks
For a six axis robot with six rotational joints in a serial chain, the chain type string could be "CCCCCC"
see inq_kin_direction_activ(), inq_kin_type_activ() More...
 
static ER_DllExport int * inq_kin_id (void)
 Kinematics ID. More...
 
static ER_DllExport float * inq_bdxw (void)
 Cartesian Error in Tcp w.r.t. robot base
see also inq_dq() More...
 
static ER_DllExport float * inq_dq (void)
 Joint error
see also inq_bdxw() More...
 
static ER_DllExport int * inq_kin_connect_dof_passiv (void)
 Dof array where passive joints are connected to [-num_pJnts, ... , 0 , num_aJnts]
Remarks
A negative idx represents a passive joint
A positive idx represents an active joint
Zero represents the robot base
see inq_kin_chain_type_passiv(), inq_kin_type_passiv(), inq_kin_direction_passiv() More...
 
static ER_DllExport char * inq_kin_direction_passiv (void)
 'X'-,'Y'- or 'Z'- direction for passive joints
Remarks
For a two passive joints the direction string could be "XZ"
see inq_kin_type_passiv(), inq_kin_direction_passiv() More...
 
static ER_DllExport char * inq_kin_type_passiv (void)
 'T'- translational-, 'R'- revolute for passive joints
Remarks
For a two passive joints the type string could be "TR"
see inq_kin_direction_passiv(), inq_kin_direction_passiv() More...
 
static ER_DllExport char * inq_kin_chain_type_passiv (void)
 'C' in kin chain (default); '_' NOT in kin. chain; '-' separated and NOT in kin.chain
Remarks
For a passive joints within a serial chain of active joints, the chain type string could be "C"
see inq_kin_direction_passiv(), inq_kin_type_passiv() More...
 
static ER_DllExport char * inq_kin_move_base_type_passiv (void)
 'B' passive Jnt is move base; '-' passive Jnt is NOT a move base
Remarks
A "B" denotes that the passive joint represents a moveable base, see constant transformation inq_pjntTmb()
A "-" denotes that the passive joint does not represent the move base, which is the normal case
see inq_kin_direction_passiv(), inq_kin_type_passiv() More...
 
static ER_DllExport char * inq_kin_calc_passiv (int passiv_jnt_no)
 Formula for mathematical dependency for passive joints. More...
 
static ER_DllExport int * inq_kin_attach_dof_passiv (void)
 Index of aJnt, where pJnt is attached to
If 0, the passive joint is attached to the robot base. More...
 
static ER_DllExport frameinq_kin_achs_T0_passiv (int passiv_jnt_no)
 Homogeneous-Transformation to previous joint for each passive joint "Geometric Data from last". More...
 
static ER_DllExport frameinq_kin_achs_T_passiv (int passiv_jnt_no)
 Homogeneous-Transformation to next joint for each passive joint "Geometric Data to next"
see inq_kin_achs_T0_passiv() More...
 
static ER_DllExport frameinq_kin_T_passiv (int passiv_jnt_no)
 Homogeneous-Transformation from cRobot base to passive Joint coorsys
depending on current joint location. More...
 
static ER_DllExport double * inq_univ_trans_tol_rad (void)
 Square of cartesian orientation tolerance [rad^2]
Used for numerical solution for inverse kinematics.
The cartesian orientation tolerance value determine the termination criteria for the iteration
Remarks
An orientation tolerance of 0.1 [deg] results in 3.0462e-006 [rad^2] = (0.1*pi/180)^2 [rad^2]. More...
 
static ER_DllExport double * inq_univ_trans_tol_m (void)
 Square of cartesian position tolerance [m^2]
Used for numerical solution for inverse kinematics.
The cartesian position tolerance value determine the termination criteria for the iteration
Remarks
An position tolerance of 0.1 [mm] results in 1.0e-008 [m^2] = (0.1/1000)^2 [m^2]. More...
 
static ER_DllExport int * inq_univ_trans_ilimit (void)
 Number of maximum iterations
Used for numerical solution for inverse kinematics.
This value determine the termination criteria for the iteration
The default value is 150. If the minimum error or other termination criteria are not fulfilled, the iterration will stop. More...
 
static ER_DllExport double * inq_univ_trans_mask (void)
 Cartesian mask
Used for numerical solution for inverse kinematics.
The cartesian mask allows to mask out one or more cartesian degree of freedom ()
X, Y, Z, Rx, Ry, Rz. More...
 
static ER_DllExport double * inq_univ_trans_weight (void)
 Joint weight
Used for numerical solution for inverse kinematics.
The joint weight allows to weight each joint. Valid values should be between [0..1]. More...
 
static ER_DllExport frame ** inq_univ_trans_T (void)
 Address to Target location base to tip, obsolete
Used for numerical solution for inverse kinematics. More...
 
static ER_DllExport void ** inq_kin_usr_ptr (void)
 Access user pointer for user kinematics in er_kin.dll
This allows the user to allocate individual memory.
EASY-ROB administrates this pointer, related to the current device. More...
 
- Static Public Member Functions inherited from ER_CAPI_DEVICES
static ER_DllExport int data_update_all_devices (void)
 Forces mathematical update for all devices, use before calling chk_limits(::AUX_UPDATE_IDX_COLLISION)
Calculates for alle devices the forward kinematics, all joints coorsys and the devices location w.r.t world. More...
 
static ER_DllExport int inq_Get_n_devices (void)
 Get number of current loaded robots in a workcell. More...
 
static ER_DllExport int inq_Get_c_device_idx (void)
 Get current device idx [1..n_devices]. More...
 
static ER_DllExport ER_UID inq_Get_c_device_uid (void)
 Get current device unique id. More...
 
static ER_DllExport int inq_Set_device_idx (int device_idx)
 Sets current device idx [1..n_devices]. More...
 
static ER_DllExport int inq_Set_device_uid (ER_UID device_uid)
 Sets current device unique id. More...
 
static ER_DllExport int inq_Set_device_name (char *device_name)
 Sets current device by name of the robot
Remarks
A device name must be unique. More...
 
static ER_DllExport int inq_Get_device_idx_by_uid (ER_UID uid)
 Gets device idx by device unique id
if the uid is not valid, -1 is returned. More...
 
static ER_DllExport ER_UID inq_Get_device_uid_by_idx (int idx)
 Get device unique uid by device idx
if idx is not valid, -1 is returned. More...
 
static ER_DllExport char * inq_Get_device_name_by_uid (ER_UID uid)
 Get device name by device unique id
if uid is not valid, NULL is returned. More...
 
static ER_DllExport char * inq_Get_device_name_by_idx (int idx)
 Get device name by device idx [1..n_devices]
if idx is not valid, NULL is returned. More...
 
static ER_DllExport int inq_Get_device_idx_by_name (char *device_name)
 Get device idx by device name
if 'device name' is not valid, -1 is returned. More...
 
static ER_DllExport ER_UID inq_Get_device_uid_by_name (char *device_name)
 Get device unique uid by device name
if 'device name' is not valid, -1 is returned. More...
 
static ER_DllExport int * inq_device_ref_sys_type (void)
 Reference type of the current device
The reference type (attach location) can be one of the following values.
REF_NO_REF, REF_BASE, REF_TOOL, REF_WORLD, REF_WOBJ, REF_TAG, REF_CAD, REF_TIP, REF_JNT, REF_GRAB. More...
 
static ER_DllExport char * inq_device_ref_sys_type_name (void)
 Reference type name of the current device
The reference type name (name of attach location) depends of one of the following values.
REF_NO_REF, REF_BASE, REF_TOOL, REF_WORLD, REF_WOBJ, REF_TAG, REF_CAD, REF_TIP, REF_JNT, REF_GRAB
See also inq_device_ref_sys_type() More...
 
static ER_DllExport int * inq_device_ref_sys_grp (void)
 Reference group of current device
The reference group depends on the attach location.
e.g.: If the cDevice is attacehd to another robot, the returned reference group will ROBOT_GRP
If the cDevice is not attached, the returned reference group will be UNDEF_GRP
The reference group is one of UNDEF_GRP=-1, ROBOT_GRP=0, TOOL_GRP=1, BODY_GRP=2. More...
 
static ER_DllExport ER_UID * inq_device_ref_sys_grp_uid (void)
 Unique ID of reference device/robot
The Unique ID depends on the attach location. More...
 
static ER_DllExport char * inq_device_ref_sys_name (void)
 Reference name of the current device
The reference type name (name of attach location) depends of one of the following values.
REF_NO_REF, REF_BASE, REF_TOOL, REF_WORLD, REF_WOBJ, REF_TAG, REF_CAD, REF_TIP, REF_JNT, REF_GRAB
See also inq_device_ref_sys_type(), inq_device_ref_sys_type_name() Remarks
In case of the reference type is REF_CAD, the name of the reference body is returned. More...
 
static ER_DllExport int * inq_device_ref_sys_jnt_idx (void)
 Reference joint idx of the cDevice, if the reference type is REF_JNT
The index of reference joint is returned
For active joints a positive value > 0 is returned
For passive joints a negative value < 0 is returned
0 is returned if the cDevice is attached to the robot base or if the reference type is not REF_JNT. More...
 
static ER_DllExport int Device_Create (char *robot_name)
 Creates a new device with one rotational axis in z direction. More...
 
static ER_DllExport int Device_ReAttach_by_name (int new_reference_type, char *new_reference_device_name, int new_reference_jnt_idx, bool keep_world_position)
 Attaches the current device to another device
Attaches the current device to another device, given by new_reference_device_name
The attach location can be one of the following values.
REF_NO_REF - no reference system defined
REF_BASE - reference system is robot Base coorsys
REF_TOOL - reference system is robot Tool, Tcp coorsys
REF_WORLD - reference system is World, Inertia coorsys
REF_WOBJ - reference system is path work object
REF_TAG - reference system is tag
REF_CAD - reference system is geometry
REF_TIP - reference system is robot Flange, Tip coorsys
REF_JNT - reference system is a robot Joint
REF_GRAB - reference system is robot Flange, Tip coorsys
Parameter keep_world_position determine if the current device will keep its current world position or will "jump" to the defined attach location
See also Device_ReAttach_by_idx(), Device_ReAttach_by_uid()
Remarks
Make sure that the device to be attached to is current inq_Set_device_idx() More...
 
static ER_DllExport int Device_ReAttach_by_idx (int new_reference_type, int new_reference_device_idx, int new_reference_jnt_idx, bool keep_world_position)
 Attaches the current device to another device
Attaches the current device to another device, given by new_reference_device_idx
The attach location can be one of the following values.
REF_NO_REF - no reference system defined
REF_BASE - reference system is robot Base coorsys
REF_TOOL - reference system is robot Tool, Tcp coorsys
REF_WORLD - reference system is World, Inertia coorsys
REF_WOBJ - reference system is path work object
REF_TAG - reference system is tag
REF_CAD - reference system is geometry
REF_TIP - reference system is robot Flange, Tip coorsys
REF_JNT - reference system is a robot Joint
REF_GRAB - reference system is robot Flange, Tip coorsys
Parameter keep_world_position determine if the current device will keep its current world position or will "jump" to the defined attach location
See also Device_ReAttach_by_name(), Device_ReAttach_by_uid()
Remarks
Make sure that the device to be attached to is current inq_Set_device_idx()
The device idx is within [1..n_devices]. More...
 
static ER_DllExport int Device_ReAttach_by_uid (int new_reference_type, ER_UID new_reference_device_uid, int new_reference_jnt_idx, bool keep_world_position)
 Attaches the current device to another device
Attaches the current device to another device, given by new_reference_device_uid
The attach location can be one of the following values.
REF_NO_REF - no reference system defined
REF_BASE - reference system is robot Base coorsys
REF_TOOL - reference system is robot Tool, Tcp coorsys
REF_WORLD - reference system is World, Inertia coorsys
REF_WOBJ - reference system is path work object
REF_TAG - reference system is tag
REF_CAD - reference system is geometry
REF_TIP - reference system is robot Flange, Tip coorsys
REF_JNT - reference system is a robot Joint
REF_GRAB - reference system is robot Flange, Tip coorsys
Parameter keep_world_position determine if the current device will keep its current world position or will "jump" to the defined attach location
See also Device_ReAttach_by_name(), Device_ReAttach_by_idx()
Remarks
Make sure that the device to be attached to is current inq_Set_device_idx() More...
 
static ER_DllExport int Tool_Device_by_name (char *tool_device_name)
 Sets tool data to the device specified by name
The current device takes over the current tool data of the device tool_device_name
See also Tool_Device_by_idx(), Tool_Device_by_uid()
Remarks
This is not a copy of the tool data.
The new tool data for the current device is calculated by the transformtion from the current device tip to the tcp location of the tool device. More...
 
static ER_DllExport int Tool_Device_by_idx (int tool_device_idx)
 Sets tool data to the device specified by idx
The current device takes over the current tool data of the device tool_device_idx
See also Tool_Device_by_name(), Tool_Device_by_uid()
Remarks
This is not a copy of the tool data.
The new tool data for the current device is calculated by the transformtion from the current device tip to the tcp location of the tool device. More...
 
static ER_DllExport int Tool_Device_by_uid (ER_UID tool_device_uid)
 Sets tool data to the device specified by unique id
The current device takes over the current tool data of the device tool_device_uid
See also Tool_Device_by_name(), Tool_Device_by_idx()
Remarks
This is not a copy of the tool data.
The new tool data for the current device is calculated by the transformtion from the current device tip to the tcp location of the tool device. More...
 
static ER_DllExport int * inq_device_link_ref_sys_type (void)
 Linkage reference type of the current device
The linkage reference type can be one of the following values.
REF_NO_REF if cDevice is not synchrnized
REF_JNT if cDevice is linked by joint to another device
See inq_device_link_ref_sys_grp_uid(), inq_device_link_ref_sys_jnt_link_idx(), Device_Link_by_name() More...
 
static ER_DllExport int * inq_device_sync_ref_sys_type (void)
 Obsolete, use inq_device_link_ref_sys_type() More...
 
static ER_DllExport char * inq_device_link_ref_sys_type_name (void)
 Linkage reference type name of the current device
The linkage reference type name depends on the inq_device_link_ref_sys_type() and can be one of the following values.
REF_NO_REF if cDevice is not synchrnized
REF_JNT if cDevice is linked by joint to another device
See inq_device_link_ref_sys_type() More...
 
static ER_DllExport char * inq_device_sync_ref_sys_type_name (void)
 Obsolete, use inq_device_link_ref_sys_type_name() More...
 
static ER_DllExport ER_UID * inq_device_link_ref_sys_grp_uid (void)
 Linkage Unique ID of the reference device current device
The Unique ID depends on the linkage reference type, which is REF_JNT if linked. More...
 
static ER_DllExport ER_UID * inq_device_sync_ref_sys_grp_uid (void)
 Obsolete, use inq_device_link_ref_sys_grp_uid() More...
 
static ER_DllExport int * inq_device_link_ref_sys_jnt_link_idx (void)
 Linkage joint index vector, if the linkage reference type is REF_JNT and valid unique ID exist
The joint index vector contains for each active Jnt a linkage index
This linkage index is

0 if linked with an active joint of a sync. ref. device

< 0 if linked with a passive joint of a sync. ref. device
= 0 if no linkage
See inq_device_link_ref_sys_type(), inq_device_link_ref_sys_grp_uid. More...

 
static ER_DllExport int * inq_device_sync_ref_sys_jnt_sync_idx (void)
 Obsolete, use inq_device_link_ref_sys_jnt_link_idx() More...
 
static ER_DllExport int Device_Link_by_name (int new_reference_type, char *new_reference_device_name=NULL, int *new_reference_jnt_link_idx=NULL)
 Link current device to another device by name
new_reference_type one of REF_NO_REF=0 or REF_JNT=9
new_reference_device_name name of device to synchonize with
new_reference_jnt_sync_idx reference joint idxs for each Jnt, if new_reference_type is REF_JNT
See Device_Link_by_idx(), Device_Link_by_uid() More...
 
static ER_DllExport int Device_Sync_by_name (int new_reference_type, char *new_reference_device_name=NULL, int *new_reference_jnt_link_idx=NULL)
 Obsolete, use Device_Link_by_name() More...
 
static ER_DllExport int Device_Link_by_idx (int new_reference_type, int new_reference_device_idx=0, int *new_reference_jnt_link_idx=NULL)
 Link current device to another device by idx
new_reference_type one of REF_NO_REF=0 or REF_JNT=9
new_reference_device_idx idx of device to synchonize with, [1..n_devices]
new_reference_jnt_sync_idx reference joint idxs for each Jnt, if new_reference_type is REF_JNT See Device_Link_by_name(), Device_Link_by_uid() More...
 
static ER_DllExport int Device_Sync_by_idx (int new_reference_type, int new_reference_device_idx=0, int *new_reference_jnt_link_idx=NULL)
 Obsolete, use Device_Link_by_idx() More...
 
static ER_DllExport int Device_Link_by_uid (int new_reference_type, ER_UID new_reference_device_uid=0, int *new_reference_jnt_link_idx=NULL)
 Link current device to another device by uid
new_reference_type one of REF_NO_REF=0 or REF_JNT=9
new_reference_device_uid uid of device to synchonize with
new_reference_jnt_sync_idx reference joint idxs for each Jnt, if new_reference_type is REF_JNT See Device_Link_by_name(), Device_Link_by_idx() More...
 
static ER_DllExport int Device_Sync_by_uid (int new_reference_type, ER_UID new_reference_device_uid=0, int *new_reference_jnt_link_idx=NULL)
 Obsolete, use Device_Link_by_uid() More...
 

Additional Inherited Members

- Static Public Attributes inherited from ER_CAPI_ROB
static ER_CAPI_ROB_KIN er_capi_rob_kin
 Method class forward-, Inverse kinematics, desired robot joints, tools, position w.r.t. world and reference system. More...
 
static ER_CAPI_ROB_ATRIBUTES er_capi_rob_attributes
 Method class for robot/device attributes, travel ranges, home position, device name, ... More...
 
static ER_CAPI_ROB_DYN er_capi_rob_dyn
 Method class for dynamics, controller parameter, sampling rates. More...
 
- Static Public Attributes inherited from ER_CAPI_DEVICES
static ER_CAPI_ROB er_capi_rob
 Method class kinematics and transformations. More...
 
static ER_CAPI_MOP er_capi_mop
 Method class for trajectory planning and -execution. More...
 
- Static Public Attributes inherited from ER_CAPI
static ER_CAPI_USER_IO er_capi_user_io
 Method class for interaction with EASY-ROB. More...
 
static ER_CAPI_DEVICES er_capi_devices
 Method class to create, attach, update devices, for kinematics calculations and for trajectory planning and -execution. More...
 
static ER_CAPI_SIM er_capi_sim
 Method class for simulation settings. More...
 
static ER_CAPI_TARGETS er_capi_targets
 Method class for paths and tags. More...
 
static ER_CAPI_CAD er_capi_cad
 Method class for for 3D CAD Data import and -export, changing attributes and positions. More...
 
static ER_CAPI_SYS er_capi_sys
 Method class for mathematical calculations, simulation status, units. More...
 

Detailed Description

Method class forward-, Inverse kinematics, desired robot joints, tools, position w.r.t. world and reference system.

Member Function Documentation

◆ calc_TurnValue()

static ER_DllExport int ER_CAPI_ROB_KIN::calc_TurnValue ( float *  q = NULL,
int *  turn_value = NULL 
)
static

Calculates turn value depending on robot joints q
The turn_value depends on current robot joints and the defined turn_interval
If q is NULL, this function uses the current robot joints inq_q_solut()
If turn_value is NULL, the results are in inq_turn_value()

Return values
0- OK
-1- Error

◆ inq_a_solut()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_a_solut ( void  )
static

Desired joint accel values.

Return values
pointerto joint acceleration, KIN_DOFS

◆ inq_achs_length()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_achs_length ( void  )
static

Kinematics lengths in Z direction [m] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz()

Return values
pointerto vector, maximum size KIN_DOFS

◆ inq_achs_offsets1()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_achs_offsets1 ( void  )
static

Kinematics lengths in X direction [m] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz()

Return values
pointerto vector, maximum size KIN_DOFS

◆ inq_achs_offsets2()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_achs_offsets2 ( void  )
static

Kinematics lengths in Y direction [m] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz()

Return values
pointerto vector, maximum size KIN_DOFS

◆ inq_achs_rotx()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_achs_rotx ( void  )
static

Kinematics angles for X rotation [deg] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz()

Return values
pointerto vector, maximum size KIN_DOFS

◆ inq_achs_roty()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_achs_roty ( void  )
static

Kinematics angles for Y rotation [deg] for each active joint
Calculated from "Geometric Data to next"
Remarks
Usage in conjunction with inq_achs_length(), inq_achs_offsets1(), inq_achs_offsets2(), inq_achs_rotx(), inq_achs_roty(), inq_achs_rotz()

Return values
pointerto vector, maximum size KIN_DOFS

◆ inq_achs_rotz()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_achs_rotz ( void  )
static

Kinematics angles for Z rotation [deg] for each active joint
Calculated from "Geometric Data to next".

Return values
pointerto vector, maximum size KIN_DOFS

◆ inq_achs_T0_activ()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_achs_T0_activ ( void  )
static

Kinematics transformation from last joint for each active joint "Geometric Data from last"
.

// Example:
int num_dofs = er_rob_kin.inq_num_active_jnts(); // number of active joints
for (int i=0;i<num_dofs;i++)
{
frame *T = &er_rob_kin.inq_achs_T0_activ()[i]; // transformation to last joint
}
...
Return values
pointerto FRAME, maximum size KIN_DOFS

◆ inq_achs_T_activ()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_achs_T_activ ( void  )
static

Kinematics transformation to the next joint for each active joint "Geometric Data to next"
.

// Example:
int num_dofs = er_rob_kin.inq_num_active_jnts(); // number of active joints
for (int i=0;i<num_dofs;i++)
{
frame *T = &er_rob_kin.inq_achs_T_activ()[i]; // transformation to next joint
}
...
Return values
pointerto FRAME, maximum size KIN_DOFS

◆ inq_active_jnt_sign()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_active_jnt_sign ( void  )
static

Sign for active joints
+1 for positive jont direction
-1 for negative joint direction.

Return values
pointerto vector, KIN_DOFS

◆ inq_bBase()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_bBase ( void  )
static

Program shift w.r.t. robot base
This method takes effect when executing a motion command given by values, such as
PTP 1.6101 0.8421 1.9112 20.3529 180.0000 0.0000
See inq_iBase()

Return values
pointerto FRAME

◆ inq_bdxw()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_bdxw ( void  )
static

Cartesian Error in Tcp w.r.t. robot base
see also inq_dq()

Return values
pointerto float for cart. error

◆ inq_bT0()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_bT0 ( void  )
static

Robot Base to first joint of kinematics chain.

Return values
pointerto FRAME

◆ inq_bTmb()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_bTmb ( void  )
static

Robot base to moveable base frame.

Return values
pointerto FRAME

◆ inq_bTpjnt_ref()

static ER_DllExport frame** ER_CAPI_ROB_KIN::inq_bTpjnt_ref ( void  )
static

Reference of robot base to passive joints as move base, get from 'B' and ax_idx.

Return values
pointerto FRAME

◆ inq_bTt()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_bTt ( void  )
static

Robot Base to Tip (flange)

Return values
pointerto FRAME

◆ inq_bTw()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_bTw ( void  )
static

Robot Base to TCP.

Return values
pointerto FRAME

◆ inq_cnfg_soln()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_cnfg_soln ( void  )
static

Return robot configuration solution IDs
Remarks
All values should be different, i.e. [0 1 2 3 4 5 6 7]
Examples:
EASY-ROB mathematical solution order [0 1 2 3 4 5 6 7]
fits to ...
--> Fanuc solution order NUT , FUT , NDT , FDT , NDB , FDB , NUB , FUB -> [0 1 2 3 4 5 6 7]
--> Comau solution order — , –W , -E- , -EW , SE- , SEW , S– , S-W -> [0 4 2 6 1 5 3 7]
--> Kuka    solution order B010, B110, B000, B100, B001, B101, B011, B111 -> [0 1 2 3 4 5 6 7]
--> ABB solution order Cfg1, Cfg2, Cfg3, Cfg4, Cfg5, Cfg6, Cfg7, Cfg8 -> [0 4 2 6 1 5 3 7].

Robot Type ER Kuka Fanuc ABB Comau
Robot Type ER Kuka Fanuc ABB Comau
Return values
VectorRobot configuration solution IDs, maximum size KIN_CONFIGS

◆ inq_config()

static ER_DllExport int ER_CAPI_ROB_KIN::inq_config ( void  )
static

Return current robot configuration
within [0..KIN_CONFIGS-1], see also inq_num_configs()

Return values
Currentrobot configuration

◆ inq_config_ext()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_config_ext ( void  )
static

Return pointer of current robot configuration
within [0..KIN_CONFIGS-1], see also inq_config() and inq_num_configs()

Return values
pointerto current robot configuration

◆ inq_ctool_idx()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_ctool_idx ( void  )
static

Get current tool idx [0..KIN_TOOLS-1].

Return values
pointerto cTool idx

◆ inq_dq()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_dq ( void  )
static

Joint error
see also inq_bdxw()

Return values
pointerto float for joint error

◆ inq_ext_Tcp()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_ext_Tcp ( void  )
static

Transformation of external Tcp w.r.t. world coorsys.

Return values
pointerto FRAME

◆ inq_ext_Tcp_base()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_ext_Tcp_base ( void  )
static

Transformation of external Tcp w.r.t. robot base.

Return values
pointerto FRAME

◆ inq_ext_Tcp_idx()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_ext_Tcp_idx ( void  )
static

Enable/disable external Tcp for cRobot
Set *inq_ext_Tcp_idx()=1 to enable external TCP
Use inq_ext_Tcp() to define the external TCP location w.r.t. world coorsys.

Return values
statusexternal TCP

◆ inq_fwd_kin_reason()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_fwd_kin_reason ( void  )
static

Reason for calculation the forward kinematics, return FWD_REASON_UNKNOWN ... FWD_REASON_CAD_EXPORT.

Return values
pointerto value

◆ inq_iBase()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_iBase ( void  )
static

Program shift w.r.t. world coorsys
This method takes effect when executing a motion command given by values, such as
PTP 1.6101 0.8421 1.9112 20.3529 180.0000 0.0000 See inq_bBase()

Return values
pointerto FRAME

◆ inq_invkin()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_invkin ( void  )
static

Inverse kinematics ID for cRobot.

Return values
pointerto value

◆ inq_invkin_sub()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_invkin_sub ( void  )
static

Inverse kinematics Sub-ID for cRobot.

Return values
pointerto value

◆ inq_iTb()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_iTb ( void  )
static

Attach position (reference position) to robot base
If the robot is not attached, the attach position is the world coorsys.

Return values
pointerto FRAME

◆ inq_iTb_strt()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_iTb_strt ( void  )
static

Start condition, Attach position (reference position) to robot base.

Return values
pointerto FRAME

◆ inq_iTi_ref()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_iTi_ref ( void  )
static

World to attach position (reference position) of robot
This location is already updated, when calling data_update_all_devices()

Return values
pointerto FRAME

◆ inq_joint_offset()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_joint_offset ( void  )
static

cRobot joint offsets for each active joint in [m] or [rad]

Return values
pointerto vector, KIN_DOFS

◆ inq_kin_achs_T0_passiv()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_kin_achs_T0_passiv ( int  passiv_jnt_no)
static

Homogeneous-Transformation to previous joint for each passive joint "Geometric Data from last".

// Example:
int num_dofs_passive = er_rob_kin.inq_num_passive_jnts(); // number of passive joints
for (int i=0;i<num_dofs_passive;i++)
{
frame *pT0 = er_rob_kin.inq_kin_achs_T0_passiv(i); // transformation from last joint
frame *pT = er_rob_kin.inq_kin_achs_T_passiv(i); // transformation to next joint
er_user_io_dialog._info_line_msg_T_vec(0," Ti from last Jnt",pT0);
er_user_io_dialog._info_line_msg_T_vec(0," Ti to next Jnt",pT);
}
...
Parameters
[in]passiv_jnt_noidx for passive joint [0..KIN_PASSIV_JNTS-1]
Return values
pointerto FRAME

◆ inq_kin_achs_T_passiv()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_kin_achs_T_passiv ( int  passiv_jnt_no)
static

Homogeneous-Transformation to next joint for each passive joint "Geometric Data to next"
see inq_kin_achs_T0_passiv()

Parameters
[in]passiv_jnt_noidx for passive joint [0..KIN_PASSIV_JNTS-1]
Return values
pointerto FRAME

◆ inq_kin_attach_dof_passiv()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_kin_attach_dof_passiv ( void  )
static

Index of aJnt, where pJnt is attached to
If 0, the passive joint is attached to the robot base.

Return values
pointerto int array for active joint index, KIN_PASSIV_JNTS

◆ inq_kin_calc_passiv()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_kin_calc_passiv ( int  passiv_jnt_no)
static

Formula for mathematical dependency for passive joints.

Parameters
[in]passiv_jnt_noidx for passive joint [0..KIN_PASSIV_JNTS-1]
Return values
pointerto char for math formula

◆ inq_kin_chain_type_activ()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_kin_chain_type_activ ( void  )
static

'C' in kin chain (default); '_' NOT in kin. chain; '-' separated and NOT in kin.chain
Remarks
For a six axis robot with six rotational joints in a serial chain, the chain type string could be "CCCCCC"
see inq_kin_direction_activ(), inq_kin_type_activ()

Return values
pointerto char for joint chain type

◆ inq_kin_chain_type_passiv()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_kin_chain_type_passiv ( void  )
static

'C' in kin chain (default); '_' NOT in kin. chain; '-' separated and NOT in kin.chain
Remarks
For a passive joints within a serial chain of active joints, the chain type string could be "C"
see inq_kin_direction_passiv(), inq_kin_type_passiv()

Return values
pointerto char for joint chain type

◆ inq_kin_connect_dof_activ()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_kin_connect_dof_activ ( void  )
static

Dof array where active joints are connected to [-num_pJnts, ... , 0 , num_aJnts, tip]
Remarks
A negative idx represents a passive joint
A positive idx represents an active joint
Zero represents the robot base
see inq_kin_chain_type_activ(), inq_kin_type_activ(), inq_kin_chain_type_activ()

Return values
pointerto for active joint connection, max. size KIN_DOFS+1

◆ inq_kin_connect_dof_passiv()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_kin_connect_dof_passiv ( void  )
static

Dof array where passive joints are connected to [-num_pJnts, ... , 0 , num_aJnts]
Remarks
A negative idx represents a passive joint
A positive idx represents an active joint
Zero represents the robot base
see inq_kin_chain_type_passiv(), inq_kin_type_passiv(), inq_kin_direction_passiv()

Return values
pointerto int for passive joint connextion, max. size KIN_PASSIV_JNTS

◆ inq_kin_direction_activ()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_kin_direction_activ ( void  )
static

'X'-,'Y'- or 'Z'- direction for active joints
Remarks
For a six axis robot the direction string could be "ZYYXYX"
see inq_kin_type_activ(), inq_kin_chain_type_activ()

Return values
pointerto char for active joint direction

◆ inq_kin_direction_passiv()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_kin_direction_passiv ( void  )
static

'X'-,'Y'- or 'Z'- direction for passive joints
Remarks
For a two passive joints the direction string could be "XZ"
see inq_kin_type_passiv(), inq_kin_direction_passiv()

Return values
pointerto char for passive joint direction

◆ inq_kin_id()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_kin_id ( void  )
static

Kinematics ID.

Return values
pointerto int for kin id

◆ inq_kin_move_base_type_passiv()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_kin_move_base_type_passiv ( void  )
static

'B' passive Jnt is move base; '-' passive Jnt is NOT a move base
Remarks
A "B" denotes that the passive joint represents a moveable base, see constant transformation inq_pjntTmb()
A "-" denotes that the passive joint does not represent the move base, which is the normal case
see inq_kin_direction_passiv(), inq_kin_type_passiv()

Return values
pointerto char for move base type

◆ inq_kin_T_active()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_kin_T_active ( int  active_jnt_no)
static

Homogeneous-Transformation from cRobot base to active Joint coorsys
depending on current joint location.

// Example:
int num_dofs = er_rob_kin.inq_num_active_jnts(); // number of active joints
for (i=0;i<num_dofs;i++)
{
frame *T = er_rob_kin.inq_kin_T_active(i); // Robot base to active Joint coorsys #i=(0..)
er_user_io_dialog._info_line_msg_T_vec(0," bTi aJnt coorsys",T);
}
...
Parameters
[in]active_jnt_no- active joint idx [0..KIN_DOFS-1]
Return values
pointerto FRAME

◆ inq_kin_T_passiv()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_kin_T_passiv ( int  passiv_jnt_no)
static

Homogeneous-Transformation from cRobot base to passive Joint coorsys
depending on current joint location.

Parameters
[in]passiv_jnt_no- passive joint idx [0..KIN_PASSIV_JNTS-1]
Return values
pointerto FRAME

◆ inq_kin_type_activ()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_kin_type_activ ( void  )
static

'T'- translational-, 'R'- revolute for active joints Remarks
For a six axis robot with six rotational joints, the type string could be "RRRRRR"
see inq_kin_direction_activ(), inq_kin_chain_type_activ()

Return values
pointerto char for active joint type

◆ inq_kin_type_passiv()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_kin_type_passiv ( void  )
static

'T'- translational-, 'R'- revolute for passive joints
Remarks
For a two passive joints the type string could be "TR"
see inq_kin_direction_passiv(), inq_kin_direction_passiv()

Return values
pointerto char for passive joint direction

◆ inq_kin_user_data()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_kin_user_data ( int  idx = 0)
static

Special kinematics User Data See also inq_num_kin_user_data(), inq_kin_user_data_name()

Parameters
[in]idxof set [0..KIN_USER_DATA-1]
Return values
pointerto vector, size KIN_USER_DATA

◆ inq_kin_user_data_file()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_kin_user_data_file ( void  )
static

Kinematics data file for user kinematics.

Return values
pointerto char

◆ inq_kin_user_data_name()

static ER_DllExport char** ER_CAPI_ROB_KIN::inq_kin_user_data_name ( int  idx = 0)
static

Special User Data Names See also inq_num_kin_user_data(), inq_kin_user_data()

Parameters
[in]idxof set [0..KIN_USER_DATA-1]
Return values
pointerto string array, each MAXSTR

◆ inq_kin_usr_ptr()

static ER_DllExport void** ER_CAPI_ROB_KIN::inq_kin_usr_ptr ( void  )
static

Access user pointer for user kinematics in er_kin.dll
This allows the user to allocate individual memory.
EASY-ROB administrates this pointer, related to the current device.

// Example:
...
// 1. allocate some user memory
void **kin_usr_ptr = er_rob_kin.inq_kin_usr_ptr(); // access kinematics user pointer
MY_USR_KIN *p = (MY_USR_KIN *)*kin_usr_ptr; // cast void pointer to own data type, to access the content
if (p==NULL)
{
p = new MY_USR_KIN;
*kin_usr_ptr = (void *)p; // copy new address
if (p==NULL) {
er_user_io_dialog._info_line_msg(0,"Error, cannot allocate user memory");
return 1; // Error
}
}
...
// 2. use user memory
void **kin_usr_ptr = er_rob_kin.inq_kin_usr_ptr(); // access kinematics user pointer
MY_USR_KIN *p = (MY_USR_KIN *)*kin_usr_ptr;
if (p==NULL) {
er_user_io_dialog._info_line_msg(0,"Error using user pointer");
return 1; // Error
}
...
// 3. free user momory
void **kin_usr_ptr = er_rob_kin.inq_kin_usr_ptr(); // access kinematics user pointer
MY_USR_KIN *p = (MY_USR_KIN *)*kin_usr_ptr;
if (p) {
delete p;
p=NULL;
*kin_usr_ptr = (void *)p; // copy new address
}
...
Return values
pointerto user defined memory

◆ inq_mbTt()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_mbTt ( void  )
static

Moveable base to Tip.

Return values
pointerto FRAME

◆ inq_mbTw()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_mbTw ( void  )
static

Moveable base to TCP.

Return values
pointerto FRAME

◆ inq_move_base()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_move_base ( void  )
static

Moveable base mode
Used for special kinematics such as a CMM with a moving table as joint 1.

Return values
0- Robot base fix (default)
1- Robot base is moveable

◆ inq_move_base_jnt()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_move_base_jnt ( void  )
static

Passive joint idx representing the moveable base.

Return values
0- Fix base, no moveable base
passivejoint idx of moveable base

◆ inq_move_base_name()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_move_base_name ( void  )
static

Name for moveable base.

Return values
nameof moveable joint, MAXSTR

◆ inq_num_active_jnts()

static ER_DllExport int ER_CAPI_ROB_KIN::inq_num_active_jnts ( void  )
static

Number of active joints
within [1..KIN_DOFS].

Return values
Numberof active joints

◆ inq_num_configs()

static ER_DllExport int ER_CAPI_ROB_KIN::inq_num_configs ( void  )
static

Number of cRobot configurations within [1..KIN_CONFIGS].

Return values
Numberof cRobot configurations

◆ inq_num_kin_user_data()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_num_kin_user_data ( void  )
static

Number of Sets of Kin User Data
See also inq_kin_user_data_name(), inq_kin_user_data()

Return values
numberof sets

◆ inq_num_passive_jnts()

static ER_DllExport int ER_CAPI_ROB_KIN::inq_num_passive_jnts ( void  )
static

Number of passive joints
within [1..KIN_PASSIV_JNTS].

Return values
Numberof passive joints

◆ inq_num_tool()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_num_tool ( void  )
static

Number of available tools [1..KIN_TOOLS].

Return values
pointerto number of tool

◆ inq_pjntTmb()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_pjntTmb ( void  )
static

Transformation from passive joint to moveable base frame.

Return values
pointerto FRAME

◆ inq_pjntTmb_ref()

static ER_DllExport frame** ER_CAPI_ROB_KIN::inq_pjntTmb_ref ( void  )
static

Reference, points to inq_pjntTmb() per default.

Return values
pointerto FRAME

◆ inq_q()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_q ( int  soln)
static

Solution array as a result of inverse kinematics calculation
The inverse kinematics IKP calculates for each possible configuration one set of joint values,
see rob_kin_inv() and rob_kin_inv_ext()
For each solution a warning value, which is one of WARN_OK=0, WARN_SINGULAR=1, WARN_UNREACH=2, WARN_CNFG=3, WARN_NO_INVKIN=4 or WARN_SWE_EXCEED=5 is calculated, see also inq_warnings()
The current or requested robot configuration can be achieved with inq_config() [0 ... "number of possible robot configurations"-1] The current joint axis values [rad,m] can be achieved with inq_q_solut() Remarks
The Solution array has a maximum size of [KIN_CONFIGS] by [KIN_DOFS]
.

// Example:
int num_dofs = er_rob_kin.inq_num_active_jnts();// number of active joints
int num_configs = er_rob_kin.inq_num_configs(); // number of possible robot configurations 1..KIN_CONFIGS
int cconfigs = er_rob_kin.inq_config(); // current robot configuration [0 ... "number of possible robot configurations"-1]
int *warnings = er_rob_kin.inq_warnings(); // warning for each configuration , one of ::WARN_OK, ::WARN_SINGULAR, ::WARN_UNREACH, ::WARN_CNFG, ::, ::WARN_SWE_EXCEED
for (int soln=0;soln<num_configs;soln++)
{
q = er_rob_kin.inq_q(soln); // get one set from solution array
...
for(i=0;i<num_dofs;i++)
{
q[i] = ...;
{
if (q[i] < -PI) q[i] += 2*PI;
else if (q[i] > PI) q[i] -= 2*PI;
}
}
...
warnings[soln] = WARN_OK;
}
...
Parameters
[in]soln[0..KIN_CONFIGS-1]
Return values
pointerto one set of solution angles, maximum size KIN_DOFS

◆ inq_q_solut()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_q_solut ( void  )
static

Desired active joint axis values.

Return values
pointerto desired joints, KIN_DOFS

◆ inq_q_solut_passive()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_q_solut_passive ( void  )
static

Desired passive joint axis values.

Return values
pointerto vector, KIN_PASSIV_JNTS

◆ inq_q_strtpos()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_q_strtpos ( void  )
static

Start condition joint axis location.

Return values
pointerto start condition joints

◆ inq_rob_dh0_passiv()

static ER_DllExport ROB_DH* ER_CAPI_ROB_KIN::inq_rob_dh0_passiv ( void  )
static

Denavit-Hartenberg-Transformation to previous joint for each passive joint "Geometric Data from last".

// Example:
int num_dofs_passive = er_rob_kin.inq_num_passive_jnts(); // number of passive joints
for (int i=0;i<num_dofs_passive;i++)
{
ROB_DH *dho = &er_rob_kin.inq_rob_dh0_passiv()[i]; // transformation from last joint
ROB_DH *dh = &er_rob_kin.inq_rob_dh_passiv()[i]; // transformation to next joint
frame T;
er_user_io_dialog._info_line_msg_T_vec(0," DH Ti from last Jnt",&T);
er_user_io_dialog._info_line_msg_T_vec(0," DH Ti to next Jnt",&T);
}
...
Return values
pointerto Denavit Hartenberg Parameter ROB_DH, maximum size KIN_DOFS

◆ inq_rob_dh_activ()

static ER_DllExport ROB_DH* ER_CAPI_ROB_KIN::inq_rob_dh_activ ( void  )
static

Denavit-Hartenberg-Transformation to the next joint for each active joint "Geometric Data to next".

// Example:
int num_dofs = er_rob_kin.inq_num_active_jnts(); // number of active joints
for (int i=0;i<num_dofs;i++)
{
ROB_DH *dh = &er_rob_kin.inq_rob_dh_activ()[i]; // transformation to next joint
frame T;
er_user_io_dialog._info_line_msg_T_vec(0," DH Ti next Jnt",&T);
}
...
Return values
pointerto Denavit Hartenberg Parameter ROB_DH, maximum size KIN_DOFS

◆ inq_rob_dh_passiv()

static ER_DllExport ROB_DH* ER_CAPI_ROB_KIN::inq_rob_dh_passiv ( void  )
static

Denavit-Hartenberg-Transformation to next joint for each passive joint "Geometric Data to next"
see inq_rob_dh0_passiv()

Return values
pointerto Denavit Hartenberg Parameter ROB_DH, maximum size KIN_DOFS

◆ inq_robot_collision()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_robot_collision ( void  )
static

1-def, robot is in collision queue, if robot_collision disabled, no collision check

Return values
pointerto robot collision flag

◆ inq_robot_enabled()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_robot_enabled ( void  )
static

Dis- or enable current robot.

Return values
0- Robot is not active
1- Robot is active

◆ inq_robot_fln_name()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_robot_fln_name ( void  )
static

File name of cRobot.

Return values
filename *.rob
pointerto char for robot file name

◆ inq_robot_itself_collision()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_robot_itself_collision ( void  )
static

0-def, collision chk vs. itself device

Return values
pointerto device itself collision flag

◆ inq_robot_name()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_robot_name ( void  )
static

Name of cRobot.

Return values
pointerto char for 'robot name'

◆ inq_robot_ref_collision()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_robot_ref_collision ( void  )
static

0-def, collision chk vs. reference device

Return values
pointerto device reference collision flag

◆ inq_robot_render()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_robot_render ( void  )
static

Render of cRobot.

Return values
0- SMOOTH_RENDER
4- INVISIBLE

◆ inq_robot_type()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_robot_type ( void  )
static

Type of device, i.e. Robot, Tool, etc.

Return values
2- ROBOT
3- TOOL
4- TRACK
5- CONVEYOR
6- POSITIONER
7- EXTAXIS
8- FIXTURE
9- ACCESSORY
10- MISCELLANEOUS
11- WORKPIECE
12- SENSOR

◆ inq_robot_type_s()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_robot_type_s ( int  type_idx = 0)
static

Name of current robot type
see inq_robot_type()

Parameters
[in]type_idxType of device
Return values
pointerto char for current robot type

◆ inq_sing_tol()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_sing_tol ( void  )
static

Singularity tolerance for each axis [m,rad].

Return values
pointerto value

◆ inq_sing_tolq()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_sing_tolq ( void  )
static

Rotational singularity tolerance [rad].

Return values
pointerto value

◆ inq_sing_tolx()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_sing_tolx ( void  )
static

translational singularity tolerance [m]

Return values
pointerto value

◆ inq_swe_max_passive()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_swe_max_passive ( void  )
static

Maximum travel ranges for passive joints.

Return values
pointerto vector, KIN_PASSIV_JNTS

◆ inq_swe_min_passive()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_swe_min_passive ( void  )
static

Minimum travel ranges for passive joints.

Return values
pointerto vector, KIN_PASSIV_JNTS

◆ inq_tool_collision()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_tool_collision ( void  )
static

1-def, tool is in collision queue, if tool_collision disabled, no collision check

Return values
pointerto tool collision flag

◆ inq_tool_name()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_tool_name ( void  )
static

Get current tool name.

Return values
tool_name,MAXSTR

◆ inq_tool_name_idx()

static ER_DllExport char* ER_CAPI_ROB_KIN::inq_tool_name_idx ( int  ctool_idx)
static

Get tool name by tool idx.

Parameters
[in]ctool_idxTool idx [0..KIN_TOOLS-1]
Return values
tool_nameby tool idx, MAXSTR

◆ inq_tool_render()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_tool_render ( void  )
static

Render of cRobots Tool.

Return values
0- SMOOTH_RENDER
4- INVISIBLE

◆ inq_tTw()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_tTw ( void  )
static

Current Tool frame, Robot Tip (flange) to TCP.

Return values
pointerto FRAME

◆ inq_tTw_data_idx()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_tTw_data_idx ( int  ctool_idx)
static

Tool data for ctool_idx.

Parameters
[in]ctool_idxTool idx [0..KIN_TOOLS-1]
Return values
pointerto FRAME

◆ inq_tTw_data_strt_idx()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_tTw_data_strt_idx ( int  ctool_no)
static

Start condition, Tool data for ctool_idx.

Parameters
[in]ctool_noTool idx [0..KIN_TOOLS-1]
Return values
pointerto FRAME

◆ inq_tTw_strt()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_tTw_strt ( void  )
static

Start condition, Tool frame: Robot Tip to TCP.

Return values
pointerto FRAME

◆ inq_turn_enable()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_turn_enable ( void  )
static

Turns enabled
The turn_enable is set automatically for PTP motion and if the PTP calculation mode is PTP_TARGET_CALC_MODE_TURNS.

Return values
pointerto turn_enable

◆ inq_turn_value()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_turn_value ( void  )
static

Index for Turn Range, default=0
The turn_value depends on current robot joints and the defined turn_interval.

Return values
pointerto turn_value, KIN_DOFS

◆ inq_univ_trans_ilimit()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_univ_trans_ilimit ( void  )
static

Number of maximum iterations
Used for numerical solution for inverse kinematics.
This value determine the termination criteria for the iteration
The default value is 150. If the minimum error or other termination criteria are not fulfilled, the iterration will stop.

Return values
pointerto value

◆ inq_univ_trans_mask()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_univ_trans_mask ( void  )
static

Cartesian mask
Used for numerical solution for inverse kinematics.
The cartesian mask allows to mask out one or more cartesian degree of freedom ()
X, Y, Z, Rx, Ry, Rz.

Return values
pointerto mask vector, maximum size DOF6

◆ inq_univ_trans_T()

static ER_DllExport frame** ER_CAPI_ROB_KIN::inq_univ_trans_T ( void  )
static

Address to Target location base to tip, obsolete
Used for numerical solution for inverse kinematics.

Return values
pointerto FRAME adress

◆ inq_univ_trans_tol_m()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_univ_trans_tol_m ( void  )
static

Square of cartesian position tolerance [m^2]
Used for numerical solution for inverse kinematics.
The cartesian position tolerance value determine the termination criteria for the iteration
Remarks
An position tolerance of 0.1 [mm] results in 1.0e-008 [m^2] = (0.1/1000)^2 [m^2].

Return values
pointerto value

◆ inq_univ_trans_tol_rad()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_univ_trans_tol_rad ( void  )
static

Square of cartesian orientation tolerance [rad^2]
Used for numerical solution for inverse kinematics.
The cartesian orientation tolerance value determine the termination criteria for the iteration
Remarks
An orientation tolerance of 0.1 [deg] results in 3.0462e-006 [rad^2] = (0.1*pi/180)^2 [rad^2].

Return values
pointerto value

◆ inq_univ_trans_weight()

static ER_DllExport double* ER_CAPI_ROB_KIN::inq_univ_trans_weight ( void  )
static

Joint weight
Used for numerical solution for inverse kinematics.
The joint weight allows to weight each joint. Valid values should be between [0..1].

Return values
pointerto joint weight vector, maximum size KIN_DOFS

◆ inq_v_solut()

static ER_DllExport float* ER_CAPI_ROB_KIN::inq_v_solut ( void  )
static

Desired joint speed values.

Return values
pointerto joint speed, KIN_DOFS

◆ inq_warnings()

static ER_DllExport int* ER_CAPI_ROB_KIN::inq_warnings ( void  )
static

Warning vector for inverse kinematics
For each solution a warning value, which is one of WARN_OK, WARN_SINGULAR, WARN_UNREACH, WARN_CNFG, ::, WARN_SWE_EXCEED is calculated
See also solution array inq_q()

Return values
pointerto vector, maximum size KIN_CONFIGS

◆ inq_wTwo()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_wTwo ( void  )
static

Tool Offset frame, Robot Tcp' to TCP.

Return values
pointerto FRAME

◆ inq_wTwo_strt()

static ER_DllExport frame* ER_CAPI_ROB_KIN::inq_wTwo_strt ( void  )
static

Start condition, Tool Offset frame: Robot Tcp' to TCP.

Return values
pointerto FRAME

◆ rob_kin_chk_travel_range()

static ER_DllExport int ER_CAPI_ROB_KIN::rob_kin_chk_travel_range ( float *  q)
static

Checks if all joint data are inside a valid travel range.

Parameters
[in]qjoint data in [m] or [rad] if revolute joint, maximum size KIN_DOFS
Return values
0- OK
1- Joint limits are exceeded

◆ rob_kin_inv()

static ER_DllExport int ER_CAPI_ROB_KIN::rob_kin_inv ( frame bTt)
static

Calculate inverse kinematics solution IKP bTt - Robot Base to Tip (Flange), Results in inq_q_solut()
This method calculates all possible solutions, depending on the number of configurations inq_num_configs() of the robot
The warning vector inq_warnings() gives more detailed information for each solution
and contains one of WARN_OK=0, WARN_SINGULAR=1, WARN_UNREACH=2, WARN_CNFG=3, WARN_NO_INVKIN=4 or WARN_SWE_EXCEED=5
Current configuration inq_config() [0..KIN_CONFIGS-1]
Number of configurations for the cDevice inq_num_configs()
See code example in rob_kin_inv_ext()

Parameters
[in]bTtRobot base to flange
Return values
warnOne of WARN_OK to WARN_SWE_EXCEED

◆ rob_kin_inv_ext()

static ER_DllExport int ER_CAPI_ROB_KIN::rob_kin_inv_ext ( frame bTw,
float *  q_solut,
int  shortest_angle 
)
static

Calculate inverse kinematics solution IKP bTw - Robot Base to Wrist (TCP), Results in q_solut()
This method calculates all possible solutions, depending on the number of configurations inq_num_configs() of the robot
The warning vector inq_warnings() gives more detailed information for each solution
and contains one of WARN_OK=0, WARN_SINGULAR=1, WARN_UNREACH=2, WARN_CNFG=3, WARN_NO_INVKIN=4 or WARN_SWE_EXCEED=5
Current configuration inq_config() [0..KIN_CONFIGS-1]
Number of configurations for the cDevice inq_num_configs()
Configuration Solution IDs for the cDevice inq_cnfg_soln()

// Example:
int JogInverse( int coorsys, int direction, float delta, int output )
// Jogs the cRobot Tcp by the amount of \p delta, w.r.t. the given coorsys and direction
// [in] coorsys 0 - w.r.t world, 1- w.r.t. RBase ... tbd, 2- w.r.t Tcp
// [in] direction 1 +x, -1 -x, 2 +y, -2 -y, .....
// [in] delta in mm or DEG
// [in] output 0-no output, 1-make some output to the message window
{
float *q = er_rob_kin.inq_q_solut(); // pointer to desired joint data
float *q_dyn= er_rob_dyn.inq_q_dyn(); // pointer to actual joint data
int n_dof = er_rob_kin.inq_num_active_jnts(); // number of robot joints
if (output) er_user_io_dialog._info_line_msg(0,"cRobot name %s has %d axis",er_rob_kin.inq_robot_name(),n_dof);
// Get and "printf" some important locations for cRobot to the message window
if (output) er_user_io_dialog._info_line_msg_T_vec(0,"World to RefCoorsys iTi_ref",iTi_ref);
if (output) er_user_io_dialog._info_line_msg_T_vec(0,"RefCoorsys to RBase iTb",iTb);
if (output) er_user_io_dialog._info_line_msg_T_vec(0,"RBase to Tip bTt",bTt);
if (output) er_user_io_dialog._info_line_msg_T_vec(0,"RTip to TCP tTw",tTw);
if (output) er_user_io_dialog._info_line_msg_T_vec(0,"RBase to TCP bTw",tTw);
if (output) er_user_io_dialog._info_line_msg_q(0,"cAxis data q",q);
// calculate the current Robot tcp location w.r.t world coorsys
// iTw = iTi_ref * iTb * bTw
frame iTw;
er_sys_mathematics.mul_T_T_T(&iTw,iTi_ref,iTb,bTw);
if (output) er_user_io_dialog._info_line_msg_T_vec(0,"World to TCP iTw",&iTw);
// calc frame dT from [in] delta, depending on given direction
FRAME dT;
er_sys_mathematics.rob_kin_frame_ident(&dT); // set frame dT to identity
float vec[DOF6+1] = {0,0,0, 0,0,0 ,0}; // initialize vector to zero
// X - direction
if (direction==1) vec[0] = delta*mm2m;
else if (direction==-1) vec[0] = -delta*mm2m;
// Y - direction
if (direction==2) vec[1] = delta*mm2m;
else if (direction==-2) vec[1] = -delta*mm2m;
// Z - direction
if (direction==3) vec[2] = delta*mm2m;
else if (direction==-3) vec[2] = -delta*mm2m;
// RotX - direction
if (direction==4) vec[3] = delta*fRAD;
else if (direction==-4) vec[3] = -delta*fRAD;
// RotY - direction
if (direction==5) vec[4] = delta*fRAD;
else if (direction==-5) vec[4] = -delta*fRAD;
// RotZ - direction
if (direction==6) vec[5] = delta*fRAD;
else if (direction==-6) vec[5] = -delta*fRAD;
er_sys_mathematics.vec_to_frame_idx(vec,&dT,ROT_XYZ); // convert vector 'vec' to FRAME dT
// calc new Target iTw depending on coorsys
switch (coorsys)
{
case 0: // w.r.t. world
break;
case 1: // w.r.t. RBase ... tbd
break;
case 2: // w.r.t. Tcp
break;
}
if (output) er_user_io_dialog._info_line_msg_T_vec(0,"dT",&dT);
if (output) er_user_io_dialog._info_line_msg_T_vec(0,"New World to TCP iTw",&iTw);
// calc new RBase to TCP location, bTw_new = inv(iTb) * inv(iTi_ref) * iTw
frame bTw_new;
er_sys_mathematics.mul_invT_invT_T(&bTw_new,iTb,iTi_ref,&iTw);
// calling inverse kinematics using shortest angle
int shortest_angle=1;
er_rob_kin.rob_kin_inv_ext(&bTw_new,q,shortest_angle); // [in] bTw_new, shortest_angle [out] q
// copy the solution angle 'q' to the actual robot angle 'q_dyn'
for (int i=0;i<n_dof;i++) q_dyn[i]=q[i];
// update alle kinematics, using new calculated joint data
if (output) er_user_io_dialog._info_line_msg_q(0,"New Axis data q",q);
int err=0;
int res=0;
er_user_io_dialog._info_line_msg(0,"Active Travel Ranges are exceeded");
err|=res;
er_user_io_dialog._info_line_msg(0,"Passive Travel Ranges are exceeded");
err|=res;
er_user_io_dialog._info_line_msg(0,"max. Joint Speeds are exceeded");
err|=res;
er_user_io_dialog._info_line_msg(0,"max. Joint Acceleration are exceeded");
err|=res;
er_user_io_dialog._info_line_msg(0,"Collision occured");
err|=res;
return err;
}
main()
{
JogInverse(0,-3,50, 1); // w.r.t world, -Z by 50mm, make some output
JogInverse(0,-1,50, 1); // w.r.t world, -X by 50mm, make some output
JogInverse(0, 2,50, 1); // w.r.t world, +Y by 50mm, make some output
JogInverse(2,-6, 5, 1); // w.r.t Tcp, -Rotz by 5 deg, make some output
JogInverse(2, 6, 5, 1); // w.r.t Tcp, Rotz by 5 deg, make some output
}
Parameters
[in]bTwRobot base to Tcp (wrist center)
[out]q_solutJoint solution data for the current configuration
[in]shortest_angle1 for shortest angles
Return values
warnone of WARN_OK to WARN_SWE_EXCEED

◆ rob_kin_jacobian_q()

static ER_DllExport int ER_CAPI_ROB_KIN::rob_kin_jacobian_q ( float *  qn,
frame tTw,
float *  jac,
int  n_dofs,
float  delta_scale = 1 
)
static

Calculation of Jacobian matrix
This method calculates, depending on robots joint location q , the jacobian matrix in the flange (Tip) or in Tcp w.r.t. the robots base.
If parameter tTw is NULL, the jacobian is in the Tip.
Remarks
For known kinematics, the jacobian is calculated analytically.
For unknown or user defined kinematics, those with mathematically joint dependencies for example, the jacobian matrix is calculated computerized.
In this case a deviation of dR=0.01deg for rotational and dx=1mm for translational joints will be taken.
Parameter delta_scale allows to change these values.

// Example:
float *q = er_rob_kin.inq_q_solut(); // pointer to desired joint data
int num_dofs = er_rob_kin.inq_num_active_jnts(); // number of robot joints
frame *tTw = er_rob_kin.inq_tTw(); // Current Tool frame, Robot Tip (flange) to TCP
float *Jac = new float[DOF6*num_dofs]; // Jacobian (DOF6 x num_dofs)
if (Jac)
{
float delta_scale = 0.5f; // scaling for computerized calculation of jacobian matrix
er_rob_kin.rob_kin_jacobian_q(q,tTw,Jac,num_dofs,delta_scale); // in Tcp
er_user_io_dialog._info_line_msg_M(0,"Jac in Tcp",Jac,DOF6,num_dofs);
er_rob_kin.rob_kin_jacobian_q(q,NULL,Jac,num_dofs,delta_scale); // in Tip
er_user_io_dialog._info_line_msg_M(0,"Jac in Tip",Jac,DOF6,num_dofs);
delete Jac;
}
...
Parameters
[in]qninput joint values
[in]tTwtool, from Robot Tip (flange) to Tcp
[out]jacJacobian matrix in Tip or Tcp w.r.t. Robot base
[in]n_dofsnumber dof
[in]delta_scalescaling for computerized calculation of jacobian matrix
Return values
0- OK
-1- Error

◆ rob_kin_joint_rot()

static ER_DllExport int ER_CAPI_ROB_KIN::rob_kin_joint_rot ( int  joint_dof)
static

Get active robot joint type
An active robot joint type can be rotational or prismatic
See rob_kin_joint_trans()

Parameters
[in]joint_dofnumber of joint [0 ... KIN_DOFS]
Return values
1- Joint is rotational
0- Joint translational

◆ rob_kin_joint_trans()

static ER_DllExport int ER_CAPI_ROB_KIN::rob_kin_joint_trans ( int  joint_dof)
static

Get active robot joint type
An active robot joint type can be rotational or prismatic
See rob_kin_joint_rot()

Parameters
[in]joint_dofnumber of joint [0 ... KIN_DOFS]
Return values
1- Joint is translational
0- Joint rotational

◆ rob_kin_q_in_travel_range()

static ER_DllExport int ER_CAPI_ROB_KIN::rob_kin_q_in_travel_range ( float *  q)
static

Transforms all revolute joints into valid travel range.

Parameters
[in]qjoint data in [m] or [rad] if revolute joint, maximum size KIN_DOFS
Return values
0- OK

◆ rob_kin_set_warnings()

static ER_DllExport void ER_CAPI_ROB_KIN::rob_kin_set_warnings ( int  warn)
static

Predefine or set the warning for all inverse solution
Use for the API for inverse kinematics
Parameter warn is one of WARN_OK, WARN_SINGULAR, WARN_UNREACH, WARN_CNFG, ::, WARN_SWE_EXCEED.

Parameters
[in]warnwarning level

◆ rob_kin_to_DEG()

static ER_DllExport float ER_CAPI_ROB_KIN::rob_kin_to_DEG ( int  joint_dof)
static

Returns DEG if joint is rotational, else 1.

Parameters
[in]joint_dofnumber of joint [0 ... KIN_DOFS]
Return values
scaleDEG or 1

◆ rob_kin_to_RAD()

static ER_DllExport float ER_CAPI_ROB_KIN::rob_kin_to_RAD ( int  joint_dof)
static

Returns RAD if joint is rotational, else 1.

Parameters
[in]joint_dofnumber of joint [0 ... KIN_DOFS]
Return values
scaleRAD or 1

◆ rob_kin_user_msg()

static ER_DllExport void ER_CAPI_ROB_KIN::rob_kin_user_msg ( char *  s)
static

Displays message to the message window.

Parameters
[in]smessage text, HS_MAXSTR

◆ rob_kin_vortrans()

static ER_DllExport int ER_CAPI_ROB_KIN::rob_kin_vortrans ( frame bTt)
static

Calling forward kinematics
The input joint values are in inq_q_solut()
See also rob_kin_vortrans_q()

// Example:
float *q = er_rob_kin.inq_q_solut(); // pointer to desired joint data
frame bTt; // Robot base to Tip
er_rob_kin.rob_kin_vortrans(&bTt); // bTt = fwd (q);
...
Parameters
[out]bTtRobot base to Tip (flange)
Return values
0- OK
-1- Error

◆ rob_kin_vortrans_q()

static ER_DllExport int ER_CAPI_ROB_KIN::rob_kin_vortrans_q ( float *  qn,
frame bTt,
frame mbTt,
int  n_dofs 
)
static

Calling forward kinematics
The forward kinematics calculates, depending on joint location q , the location of the flange (Tip) w.r.t. the robots base bTt
See also rob_kin_vortrans()

// Example:
float *q = er_rob_kin.inq_q_solut(); // pointer to desired joint data
float *q_dyn = er_rob_dyn.inq_q_dyn(); // pointer to actual joint data
int num_dofs = er_rob_kin.inq_num_active_jnts(); // number of robot joints
frame bTt; // Robot base to Tip
frame mbTt; // movable Robot base to Tip (same as bTt, if the device has no moveable base)
er_rob_kin.rob_kin_vortrans_q(q,&bTt,&mbTt,num_dofs); // bTt = fwd (q);
// add Tool data ...
frame *tTw = er_rob_kin.inq_tTw(); // Current Tool frame, Robot Tip (flange) to TCP
frame bTw; // Robot base to Tcp
er_sys_mathematics.mul_T_T(&bTw,&bTt,tTw);
...
Parameters
[in]qninput joint values
[out]bTtRobot base to Tip (flange)
[out]mbTtmoveable Robot base to Tip (flange)
[in]n_dofsnumber dof
Return values
0- OK
-1- Error

The documentation for this class was generated from the following file: