Академический Документы
Профессиональный Документы
Культура Документы
The Application Program Interface (API) provides the user the ability to develope
own functions written in C programming language for user defined
The API for inverse kinematics is used when a robot kinematics is created based
on universal coordinates or Denavit Hartenberg (DH) parameter and the inverse
kinematics problem has to be solved. Many exported functions from the EASY-
ROB™ data base give full access to all needed robot data, i.e. kinematic robots
lengths, software travel ranges, joint directions, tool frame, TCP location, etc.
Mathematical routines to handle homogeneous transformation matrices are
available as well as trigonometrical functions for angle, triangle and trapezoid
calculations.
Result: er_kin.dll
EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
The inverse kinematics routine is called during TCP jogging using the mouse and
during program execution in CP mode after every interpolation step
*inq_ipo_data_dt_ipo().
Using the function call rob_kin_inv(frame *base_to_tip) forces the
calculation for the inverse kinematics solution. This function can be called from
everywhere within the API.
Kinematic
Robot Chain
Output:
Robot Joints
*inq_q_solut()
Before the robot starts to move to its new target location, the preparation routine,
which returns the required motion time for that move, is called. Afterwards,
supposed the preparation was successful, the execution routine is called in every
interpolation step to calculate intermediate locations for the robots TCP. Many
EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
exported functions give full access to the current motion planning values such as
programmed speeds and accelerations.
Result: er_ipo.dll
EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
API-DYN - Dynamics
The dynamics option allows to consider the dynamic model of the robot and the
position controller during simulation. The build-in dynamics routine for the dynamic
robot model uses a simple uncoupled 1st order model in the discrete z-space
defined by the inertia, the viscous friction and the gear ratio for each joint. Based
on the system step, the discrete model is calculated. The build-in position controller
is represented by the well known PPI Cascade Controller with pseudo analog PI
velocity controller. During the robots motion a green trace shows the desired TCP
location (generated by the motion planner) and a red trace the actual location of
the robots TCP. An output window shows the errors in joint and cartesian space at
any time. The Application Program Interface (API) for Dynamics allows to develop
user defined functions written in C for the dynamic robot model and the position
controller. Herein it will be possible to consider the real non linear coupled model of
the robot and use an integration algorithm such as Runge Kutta to solve the
inverse dynamic modell. Furthermore, a special position controller such as an
adaptive or a robot modell based controller can be implemented.
Figure API-04: Interfaces for dynamics, position controller and dynamic robot model
The above general structure shows the main important data flow between position
controller and the dynamic robot model. The algorithm for position controller and
robot model could be very complex, depending on the users requirements.
EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
Folder: .\easy_rob\er_dvlp\
Desired VC++ project er_dyn.dsw
and actual C file: dyn_user.cpp
locations Functions: int dyn_cntrl_user_1..12 Control signals for
and speeds (void **dyn_cntrl_usr_ptr) each joint:
Input: Pointer for user defined data structure, float *inq_uc()
Current desired and actual locations,
Control parameter:
Example: PPI-Cascade
*inq_cntrl_kpp(): superimposed PosCntrl
EASY-ROB *inq_cntrl_kpv(): P - underlying VelCntrl
Data Base *inq_cntrl_kiv(): I - underlying VelCntrl
*inq_cntrl_aux1..3(): auxiliary values
Library: gear ratio, robot attributes, etc.
easyrobw.lib Variable Output: Error, actual joint error,
control signal float *inq_uc()
Control Example see file dyn_user.cpp
parameter, dyn_cntrl_user_1(void **usrptr)
sample time Result Dynamic Link Library Dll er_dyn.dll
in folder .\easy_rob\
Result: er_dyn.dll
The user defined structure allows the user to store all needed data for this specific
controller (adaptive-, state variable feedback- , force controller, etc.), such as
parameter or status data, which are needed for the next sampling step. When the
routine dyn_cntrl_user_x() is called for the first time, this user pointer is NULL and
allows the user to allocate memory and to defined all initial data settings. In the
next step, EASY-ROB™ will return this pointer, thus all data are availbale for
further calculations.
EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
Folder: .\easy_rob\er_dvlp\
Control VC++ project er_dyn.dsw
signals for C file: dyn_user.cpp Actual joint position
each joint Functions: int dyn_model_user_1..12
*inq_uc() *inq_q_dyn()
(void **dyn_model_usr_ptr) actual joint speed
Input: Pointer for user defined data structure, *inq_v_dyn()
Control signal from position controller
Model parameter:
gear ratio, robot attributes, etc.
Variable Output: Error, actual joint values:
EASY-ROB float *inq_q_dyn()
Data Base float *inq_v_dyn()
Example see file dyn_user.cpp
Library: dyn_model_user_1(void **usrptr)
easyrobw.lib Result Dynamic Link Library Dll er_dyn.dll
in folder .\easy_rob\
Robot model
parameter,
model
sample time
Result: er_dyn.dll
The user defined structure allows the user to store all needed data for this specific
dynamic robot model. This pointer works in the same manner as for the position
controller. Inside the API for the robot model, it is possible to integrate high
sophisticated calculations to solve the inverse dynamic robot model with
consideration of nonlinearities for frictions, coriolis and gravity forces, inertias and
maybe elasticities in the gear boxes. The solution for the complete model can be
solved using Runge Kutta for example.
EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
Menu: Robotics
-> Robot Motion + Kinematics
EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
A selection of
"4 - Inverse Kinematic No"
in the Dialog in Figure API-08
allows the user to choose the
function for the inverse
kinematics solution defined in
er_kin.dll.
"3 - DLL inv. kin #2"
will select function
"inv_kin_user_2(frame *)"
Menu: Robotics
-> Robot Motion Planner
-> Ipo Data
will open the Input Dialog to
set the control data for the
motion planner, such as ipo
step size, vq = joint speed,
vx = cartesian speed, joint
acceleration, ov = override,
etc.
Inside the API, you can read
and write all ipo data, using
Figure API-11: Input Dialog for Motion Planner ipo data
the functions:
vq = *inq_ipo_path_vq()
vx = *inq_ipo_path_vx()
ov = *inq_ipo_path_ov_pro()
Menu: Robotics
-> Robot Motion Planner
-> Ipo Joint Code
will open the Selection Dialog
to prompt the user to choose
the function for the user
defined motion planner for the
"Joint" motion type.
This selection will enable the
2 functions,
ipo_jnt_prep_user_1() and
Figure API-12: Selection Dialog for joint motion planner code ipo_jnt_exec_user_1().
EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com