Robotics & Computer-lntegrated Manufacturing, Vol.12,No. 1.pp.99-109,1996
ElsevierScienceLtd PrintedinGreatBritain
Pergamon
•
Paper FROM
CAD-BASED
MARTIN
PRINZ,*
KINEMATIC MODELING PROGRAMMING
TO AUTOMATED
HSU-CHANG LIU,* BARTHOLOMEW TIM LUETH'~
ROBOT
O. N N A J I *
and
*Automation and Robotics Laboratory, Department of Industrial Engineering and Operations Research, University of Massachusetts at Amherst, Amherst, MA 01003, U.S.A. and tlnstitut for Prozessrechentechnik und Robotik, Fakult~t for Informatik, Universit~it Karlsruhe, Germany
The objective of this work is twofold: firstly, to present the potential of CAD-based techniques with respect to implementing a nser-friendly tool for systematic and efficient kinematic modeling and analysis of general assembly products, and secondly, to detail the significance of this approach for the development of a Robotic Assembly Language Planning Hierarchy (RALPH), a tnsk-level automatic robot programming system. With the Product Assembly Modeler (PAM) as the environment for kinematic modeling, the geometric and topological information in the system's database is utilized to derive and solve the kinematic equations that characterize a mechanism. Spatial relationships play a central role in this process as they represent the kinematic constraints implied by the joints. The advantages of embedding kinematic analysis in PAM comprise the flexibility of modeling open and closed loop mechanisms, the visual study of motion of a mechanism, and the evaluation of the integrity of the design. PAM also provides the geometric and topological data for RALPH to generate a process plan for robotic assembly. CADbased kinematic modeling and analysis plays a key role with respect to automated programming of industrial robots due to the importance of the inverse kinematic problem.
1. INTRODUCTION Kinematics and dynamics of mechanical systems are characterized by large amplitude motion, resulting in geometric non-linearity. Design engineers have traditionally resorted to graphical techniques and physical models, due to difficulties associated with solving non-linear algebraic equations of constraint and differential equations of motion. As in any other field of engineering, the degree to which the power of computers is applied to the solving of kinematic problems, has been steadily increasing since their first introduction and availability in industry and engineering programs at universities in the 1950s. Despite the progress that has been made, it is felt that in terms of establishing a systematic approach, Computer Aided Kinematics has lagged behind compared to the developments in fields such as Finite Element Analysis or Electronic Circuit Analysis. 9 Particularly the task of modeling mechanical systems, i.e. the translation of the significant physical characteristics of a mechanism in a valid computer-suited mathematical model, is often based on "clever formulations" and intuition. Even simple mechanisms are usually too complex for direct analysis and must be represented by a model amenable to analytical evaluation. While the majority of commercially available systems support the modeling process graphically, the demands on the user's interactivity and ability to abstract a model are
prevailing. Moving each component into their exact position on the screen or defining joint types, model variables, and coordinate systems are often tedious and error-prone tasks. We suggest to place Computer Aided Design (CAD) in the center of kinematic modeling and analysis. In the area of mechanical engineering, CAD has evolved to play a central role in the advancements made over the past decade. From a pure drawing aid in its beginnings, it has matured to a tool that is capable of evaluating the design of modeled objects and of addressing and integrating product life-cycle issues from conceptual and detailed design over manufacturing and recycling. This approach, named concurrent engineering, is based on the insight that up to 80% of a product's cost is already committed in the early stages of design. A design that ignores manufacturing constraints causes avoidable expenses and delays. 27 Today, CAD is recognized for its potential to close the gap between design and manufacturing. While CAD systems have been appropriate tools for modeling single components, they have provided little support for assembly modeling. Certain requirements must be met by the CAD system to allow design and analysis of general assemblies with moving parts. The definition of a mechanism comprises two important aspects, namely the topology and the geometry of the system. More 99
100
Robotics & Computer-IntegratedManufacturing• Volume12, Number 1, 1996
specifically, modeling of mechanisms requires the definition of the bodies that make up the mechanical system, the assignment of kinematic constraints that act between pairs of bodies, and the selection of timedependent drivers. It is essential that the constraints on the relative motion of bodies in the mechanism imposed by the physical joints can be captured in assembly processes, so that the formulation of the governing kinematic equations of the system can be provided automatically. Kinematic modeling and solving play a very important role in design and manufacturing systerns, 7 e.g. fixture reconfignration planning 3 and robotic grasp planning. 2 In this paper, a CADbased kinematic modeling system is proposed which associates the kinematic modeling with assembly modeling processes, such that, constraints to kinematic pairs are automatically generated when components are appropriately assembled and kinematic analyses are determined by solving selected set(s) of constraints.
2. PRODUCT ASSEMBLY MODELER (PAM)
2.1. Computer-Aided Design for assembly There is little controversy today about the importance and value of a concept known as Design for Assembly, a subset of Design for Manufacturability. It has been propagated by a large number of researchers and engineers at universities and in industry, and its benefits are well documented in literature .4,8,23,29,30 However, CAD systems have placed little emphasis on facilitating assembly modeling. The development of a Product Assembly Modeler (PAM) in the Automation and Robotics Laboratory at the University of Massachusetts at Amherst was motivated by this deficit and the insight that there is a great potential for CAD to capture designers' intents for a product. 22 An object's form is insufficient information for reasoning about its interrelations with other objects. Therefore, PAM infers function from the features of an object by allowing the user to associate process information to the part description. As a part program is being developed, PAM prompts the user for product specification attributes such as material, processing methods, surface finishes, tolerances, as well as assembly information such as the type of bonding between components, and forces and torques required in assembly operations. Most importantly, the user can specify the relative positions of the components in the assembly by defining spatial relationships between the features of components. PAM employs a spatial relationships engine as a system kernel (see Fig. 1). In addition to interference of assembly positions, spatial relationships play a central role in linking form and function of a product. Our approach uses the following design procedure:
• Define a product's general specifications, • Model the parts in a nominal form on a CAD system, • Assign general product specifications and functions between assembly features of parts, • Distribute the general product specifications and assign them to each part automatically, • Perform mechanical analysis such as kinematic analysis. The system automatically generates the bill of materials of a product and has integrated planning modules for tolerance specification and propagation, evaluation of precedence constraints, and provides information to the Robot Assembly Language Planning Hierarchy (RALPH). 16'17 2.2. Object representation In considering representation techniques for 3D modeling, there is a trade-off between ease of creation and efficiency of manipulation. Constructive Solid Geometry (CSG) is a method of creating objects through Boolean addition and subtraction of geometric primitives. The ease of creating even fairly complex shapes gives CSG a high descriptive power. Unfortunately, the object description is not unique but depends on the specific genesis or modeling procedure of the object that the designer chose. This makes the data structure inconvenient for feature reasoning and graphical representation. Boundary Representation (B-rep), on the other hand, is tedious to create and extremely verbose but highly unambiguous, available to algorithms for geometric reasoning (which are employed in processes such as the aforementioned procedure for design and analysis of assembly products), and compatible with computer graphics software. Taking this into consideration, CSG is the method that should be used to create objects, while B-rep should be used as the format in the geometric database of a concurrent engineering system. Initial Graphics Exchange Specifications (IGES) is a neutral CAD data transformation medium that was created by the National Bureau of Standards. IGES is the link between CSG and B-rep and makes CAD-based applications independent from particular CAD systems. 3. SPATIAL RELATIONSHIPS
Spatial relationships were proposed by Popplestone et al. in 1975 to express the relative positions of parts in an assembly by specifying feature spatial relationships among them. 1'24--26 A feature can be defined as "any named entity with attributes with both form and function ''5'13 or more specifically as "a set of surfaces together with the specifications of the bounding relationships between them and which imply an engineering function on an object". 1° It is important to understand an object before attempting to reason about its interrelations with other objects or its manipulation. This understanding comes in the form
101
Automated robot programming * M. PRINZ et al.
_•
Topology Model
I Neutral Graphics T1rartsldltor Validation CAD System
Form-Function Interpreter Engine
Feature-Operatlon-ToolsErmine SpatialRelationshipsEngine Dirnensionirq[Engine TolerancePropagationEngine DesignEvaluator Engine
C~o met ry
Model
__[ DimensionTolerance
Model
Function
s- °o°LI
Unit ~r-'- I /l
I Auembly ere I Machining I Sheet-Metal Fabrication
I
Process I Planning for
Model
I
Form Feature Model
Design Advisor Engine Operation-
Tools Model
I BOM. Spatial Rel~
Other 1 process InformaLion Fig. 1. Architectureof PAM.
of feature reasoning. B-rep information, while accurately describing a parts geometry, does not contain explicit information about which surfaces comprise the parts features. Feature reasoning allows us to group related surfaces into features and then classify them into feature types. In the context of assembly modeling we consider features including planar faces and features with principal axes (e.g. cylinder, cone, and sphere). The types of spatial relationships described by Popplestone and his group include against, coplanar, fits, parax, lin, rot, and fix. A mathematical model is applied to formulate and solve the equations representing a set of spatial relationships, in order to infer the location of components inside a product. In each part or semi-assembly, a mating frame is attached on the body derived from the spatial relationships that have been assigned. The mating frame is a homogeneous transformation matrix with respect to the origin of the 3-D model of a part or semi-assembly. The condition for assembly is then expressed as an exact matching of mating frames. Our research has resulted in an extended set of spatial relationships, including: against, paralleloffset, parax-offset, aligned, incline-offset, and include-angle (see Fig. 2). Degrees of freedom of each spatial relationship is represented in terms of symmetry group and geometrical degrees set of virtual-coordinate frame. 11'12 Design with spatial relationships is ideally suited to support modeling and analysis not only of structural assemblies, but also of assemblies that contain moving parts. Each spatial relationship can be interpreted as a constraint on the degrees of freedom of a pair of mating components. Given a set of spatial relationships defining a joint, the remaining degrees of freedom associated with the kinematic pair can be inferred. A
rule-based inference engine has been developed for this purpose. For components with fixed positions in the assembly product, all degrees of freedom are eliminated (see Fig. 3). Kinematic pairs that are connected by rotational or prismatic joints retain 1 DOF. The axis about which rotational or prismatic displacement is possible is automatically generated and represented as a vector in the data structure of each joint.
3.1. Feature-based modeling of mechanisms To model a revolute joint, two spatial relationships are used: against and aligned. A revolute joint requires each member of the kinematic pair to have a cylindrical feature such as a hole or a cylindrical protrusion. By assigning an aligned spatial relationship between these cylindrical features and an against spatial relationship between two planar mating faces of the links, the degree of freedom of the kinematic pair is reduced to one. The relative displacement is now constrained to a rotation about the common axis that aligns the cylindrical features. A prismatic joint is modeled by selecting two appropriate pairs of planar mating faces and assigning against spatial relationships between the faces of each pair. This reduces the number of DOFs of the kinematic pair to one and constrains the relative displacement to a translation along the desired prismatic axis. The procedure for modeling and analysis of mechanisms with closed kinematic loops can now be outlined as follows: (1) Modeling (CSG) of the components of the mechanism, (2) Assembly of an open kinematic chain by assigning spatial relationships between components, (3) Assignment of spatial relationships to close a kinematic chain,
102
Robotics & Computer-Integrated Manufacturing • Volume 12, Number 1, 1996 x" y" z" - feature-coordinate frame x y z - v i r t u a l - c o o r d i n a t e frame
Z'.I
•
1~
'"@~'
Ze
a Z'e
offset Symmetry group of contact features: PI: T'SO(2) P2: T'SO(2)
PI: T3S0(2) P2: T3SO(2)
PI: TzSO(2) P2: S0{3)
Degrees of freedom based on geometry: Of: iplan_.z::rot._x.rot,_=| pl: |plane_z::roL_x,rot..y,rot_z| p2: Icyl_x::iln...y,rot...z| p2: isph::plan..z.roL..z] (a) (b)
Z* Z
pl: i plane_z::Un_z, roL_z| p2: Iplane_z'::tin_z',rot_z'|
(c)
,,
L,
Offset
X
Y p!
\/"
N
Symmetry group of contact features: Pt: T'SO(2) Pt: T'SO(2) P2: T'SO(2) P2: T'80(2) Degrees of freedom based on 8eometry: pt: Ipiane_z::rot_z~ p2: Iplane_z::rot_z~
(d)
pl: liin_x::roL_xl p2: ~lin_x::rot_x|
(e)
Pt: T=SO(2) PZ: T=30(2) pl: |plane_z::rot_z] p2: Iplane_z'::rot_z']
(t)
Fig. 2. Spatial relationships: (a) against, (b) parallel-offset, (c) include-angle, (d) parax-offset, (e) aligned, (f) incline-offset.
(4) Repetition of Steps 2 and 3 (for multi-loop mechanisms) until all joints are defined, (5) Inverse kinematic analysis to obtain initial assembly configuration, including evaluation of the mobility of the mechanism and selection of independent link(s). (6) Inverse kinematic analysis to determine the motion of the mechanism in response to a specified driving motion. Following this procedure, all kinematic pairs of the mechanism are being specified, including the ones that create a close kinematic loop. We will refer to
the spatial relationships used for this purpose as postspatial relationships. It is necessary to distinguish them, since their assignment does not result in an immediate graphical representation of the kinematic pair on the computer screen as is the case for all other pairs. In other words, an open, possibly branched kinematic chain is assembled and displayed before the inverse kinematic analysis is initiated. This method permits the design engineer to (1) validate the model during the assembly process, and (2) manipulate the links in the open kinematic chains by rotating or translating them in order to obtain a configuration that yields good estimates for the
103
Automated robot programming • M. PRINZ et al.
½ ,,I
1
Ill
C-F_2
C-Cyl
r °'*'-°' ~,A-F_i A- Hole_ 1
I
D~tT_D2
A-F_2 B-Cyl
A
F D.,,.T_ ,_r_2
! Tolerance chain
Dimension
Datum A-F_4
T(D2)~,/T(S2) Spatial RelaUormhips A
S2
A-F_2
DI D2 D3
A-F_4 B-F_1 C-F_I
Dqrees of Freedom
B
Against
A-F_I
B-F_I
|plane::rot]
Aligned: I) clearance fit 2) rivet.
A-Hole_ 1
B-Cyl
i::rotl Irlxl
Parallel Offset
A-F_4
B-F_2
A
Attributes
T_S1 . / / TP_SI
C
A~ainst
A-P_2
C-F_I
Aligned I) clearance fit 2) rivet. Parallel Offset
A-Hole_2
C-Cyl
I plane: :rot| |::rot~
Inxl A-F_B
C-P_2
T_SZ
.
//TP_S2
Fig. 3. Example of design with spatial relationships.
actual values o f the joint variables in the complete assembly of the mechanism*. Figure 4 shows two stages during the modeling o f a six-bar linkage with two kinematic loops, (a) before the inverse kinematic
*The numerical method applied to the solution of the kinematic equations operates with initial estimates of joint variables. The closer these values are to the actual assembly values, the faster is the convergence of this iterative method.
analysis is initiated, and (b) after the solution of the inverse kinematic problem. 4. A U T O M A T E D F O R M U L A T I O N AND SOLUTION OF KINEMATIC EQUATIONS 4.1. The inverse kinematic problem There are two principal problems in kinematic analysis, one referred to as forward kinematic analysis, the other as inverse kinematic analysis. The former concerns the problem of determining the position and orientation of an object (commonly
104
Robotics & Computer-IntegratedManufacturing• Volume 12, Number 1, 1996
(a)
(b)
Fig. 4. Modelingof a six-bar linkage:(a) beforeinversekinematicanalysis,(b) after inverse kinematicanalysis. represented by a body-fixed coordinate frame) when a series of manipulations, such as rotations and translations, is given. The latter refers to the problem of finding the magnitude of rotations and translations in a series of manipulations, that results in a desired position and orientation of an object. The task of assembling an initial configuration of a closed-loop mechanism and the determination of its motion in response to one or several specified driving motions are inverse kinematic problems. While during the assembly of structures and open kinematic chains the attachment of an additional component does not affect the position of previously assembled parts, this is generally not the case when the assembly of a part creates a closed kinematic chain. The analysis of the motion of a mechanism in terms of the displacements of the links is closely related to the assembly problem. We can interpret motion analysis as the task of repeatedly assembling the mechanism given time-discrete displacements of the input link(s). Sandor and Erdman have presented a general method for position analysis of spatial mechanisms based on transformation matrices. 2s We follow their approach with some modifications. The closing of a kinematic loop can be expressed mathematically as a series of transformations that are consistent with the constraints on the relative displacements imposed by the joints and the geometry of the links, with the condition that the coordinate system representing the effect of these transformations at the end of the loop is congruent with the one at the beginning. In other words, the product of all transformation matrices describing the traversal of the loop must equal the identity matrix. This non-linear matrix equation that must be solved during position analysis of mechanisms is referred to as the loop-closure equation. 4.2. Joint coordinate frames The use of joint coordinate frames is one of the basic concepts in representing the configuration of links in a mechanism. In our approach, the problem of attaching an initial coordinate frame to a joint is equivalent with determining the degrees of freedom of the joint and its location in the assembled open kinematic chain. Since the DOFs of a joint can be inferred from the spatial relationships defining the
kinematic pair, the z-axis of the joint frame can be oriented according to the rotational or prismatic axis of a joint, and x-axis and y-axis are added so as to form a right-hand coordinate system (see Fig. 5). In the case of a rotational joint, the spatial relationships database contains a vector aligned with the centerline of the mating cylindrical features that represent the rotational axis of the joint. We align the z-axis of the joint frame with this vector. The origin of the joint frame coincides with the intersection of the rotational axis and a plane defined by two mating faces. However, the position of the origin could be chosen arbitrarily on the rotational axis. In the case of a prismatic joint, we align the z-axis of the joint frame with the translational axis, that is represented by a vector too. The origin of the frame is located arbitrarily on the translational axis. The constant transformation matrix T(k_ 1)k relates the position and orientation of the initial frames J k - i and Jk of tWO subsequent joints in the assembled open kinematic loop. This matrix T essentially contains link geometry information. According to the DOF of joint k, a homogeneous transformation matrix Ak represents the variable relative displacement of link k. Due to the way the joint frames were set up, all variable rotations and translations take place with respect to the z-axis of the joint frames. Using this terminology, the position and orientation of a joint frame with respect to the preceding joint frame can be calculated as: Jk = J k - 1T(k- l)kAk•
(1)
The location of the link can be expressed in terms of a constant transformation matrix Pk that relates a body-fixed coordinate frame Lk to the frame of the respective joint Jk: Lk = JkPk.
(2)
Special consideration must be given to the joints that establish a connection between moving links and the ground. According to our approach, the first joint in a kinematic chain connects a link to the ground. An invariable ground frame J0 is located so as to be congruent with the initial frame of this joint. The general position and orientation of this joint frame,
105
Automated robot programming • M. P R I N Z et al.
x2
X3
yl ~
y3
(e)
x4 Fz4
Ng, 5. Joint coordinate frames.
taking a rotation or a translation into account, can then be calculated as follows:
(3)
Jl = JoAl
At the end of the open kinematic chain a loop-closing joint is defined by post-spatial relationships between geometric features of the link and the ground. At this stage of the modeling process, this joint has not been realized yet, i.e. link and ground are not connected. Two initial frames are associated with this joint: one attached to the link, J~, and one to the ground, Jg; both according to the mating features and axes of rotation or translation. The invariable ground frame at the end of the kinematic loop, Jg, can now be related to the invariable ground frame at the beginning of the loop, J0: Jo = JgTgo
(4)
4.3. The loop-closure equation We can now express the condition for loop closure as follows: Soo = A I T 1 2 A 2 T 2 3 A 3 • • •
T(n- l)nAnTgo
(5)
=I While the T matrices in the loop-closure equation contain constants, representing the geometry of the link, the A matrices contain joint variables which may be considered as belonging to one of two groups. The first consists of the vector of independent motion variables of the mechanism (tli), often called degrees of freedom or inputs of a mechanism. The second group forms the vector of dependent variables (qD). After the matrices in the loop-closure equation have been derived from the spatial relationships, the system is enabled to evaluate integrity of the design by determining the mobility of the assembly. This is also necessary because the number of driving motions must equal the number
of DOFs of the mechanism in order to produce a predictable motion. The highly non-linear loop-closure matrix equation must be solved to obtain an initial configuration of the assembled mechanism and to evaluate the dependencies between the motion of the driving link and the motion of the other links. A NewtonRaphson iterative procedure is employed to find the roots of S00-I. A first-order Taylor series expansion about ~D yields:
S00(~D,
eli)
--
I + ~-~ 0Soo(~D, qI) Aqi =- 0. (6) z...a i=1
Oqi
Beginning with an initial estimate of the dependent variables (~D), a small correction can be found such that when it is added to the estimate, a value closer to the correct value results (see Ref. 28). Displacement analysis, i.e. the study of the link configurations in response to a specified driving motion, is carried out using the same method as for the determination of the initial assembly configuration. At each discrete step in time, the driving link(s) is/are moved into a new position and the locations of the dependent links are calculated so as to satisfy the loop-closure condition. Thus, the problem of displacement analysis can be interpreted as repeatedly reassembling the mechanism with respect to specified displacements of the input link(s). Once the displacement analysis is completed, link velocities and accelerations can be analyzed given the values of the link positions at discrete points in time. 5. CAD-BASED AUTOMATED PLANNING OF ROBOTIC ASSEMBLY
5.1. The R A L P H project Manufacturing in the nineties is increasingly characterized by short product life-cycles, small batch sizes, and a high number of product variations. In
106
Robotics & Computer-IntegratedManufacturing • Volume 12, Number 1, 1996
this context, flexibility of manufacturing processes becomes an economic necessity. It is also evident that the trend towards customization in manufacturing and the advancements in process technology are intertwined, and it is impossible to make a clear distinction between cause and effect. Industrial robots have become the figureheads of the factory of the future. Automated robotic assembly offers many advantages over traditional manual assembly methods. Robots are faster, cleaner, and more accurate than the human hand and relieve workers from performing boring or dangerous tasks. As opposed to dedicated assembly equipment, robots can be programmed to adapt to a wide range of tasks, thus providing the highest level of flexibility. However, explicit robot programming requires a trained robot programmer and is time intensive. Other popular approaches to robot programming such as lead through or teach methods are often tedious and inaccurate. Our ongoing research is aimed at the development of a Robotic Assembly Language Planning Hierarchy (RALPH), an implicit robot programming system that deals with CSG-modelable objects, acquires static and dynamic information from a CAD system, reasons about the knowledge according to a task command given in pseudo-natural language, and generates a sequence of general, robot independent commands for the robot to automatically perform the task. 15'17'~s'2°'2~ It is important to note that the RALPH system is an automatic process planning system for robots, i.e. it generates an operations sheet describing a sequence of operations needed to accomplish a task and translates this process plan into the robot control language of a specific robot. The key areas of automatic robot programmers such as RALPH are world modeling, task specification, and program synthesis. The following sections concern the description of these components and their interactions in the RALPH context. 5.2. Worm modeling The foundation of our automatic robot programming system is the Product Assembly Modeler (PAM), a database and geometric reasoning system that provides information about the geometry and relationships of the components of the product that is to be assembled, the robot, and the workspace. PAM was designed as a system that captures the designer's intents for a product by specifying feature spatial relationships and process information, such as tolerances, surface finish and bonding. With its kinematic analysis engine, it is ideally suited for modeling industrial robots and calculating link configurations according to task specifications. The approach to kinematic modeling and analysis that has been presented in this context, is applicable to the modeling of industrial robots without any restriction. As a matter of fact, it can be looked at as one of the
cornerstones in the development of a truly robotindependent automatic robot programming system. 5.3. Task specification In assembly, task specification deals with the specification of configuration states from the initial state of components to the final state of the product, and degenerating the object-oriented commands into robot-oriented ones. This involves reasoning about mating relationships, robot paths, and grasping schemes. As a task level programming language, RALPH allows the user to input high-level commands in pseudo-natural language without having to worry about the specific motions that the robot has to make. This task is delegated to the RALPH's planner that decomposes the command by using several levels of planning and generates a code that is executable by a robot. The planning levels are: (1) (2) (3) (4) (5)
Product Level, Task Level, Mid Level, General Robot Level, Specific Robot Level.
The first three levels concern reasoning about assembly situations and are robot independent. They break down a command such as "ASSEMBLE productl, 50 pieces" into a set of instructions that specify elementary assembly operations such as "place (onto)" or "insert (into)" together with information about those geometric features of the components that are relevant for mating. For example, an internal mid-level command corresponding to the insertion of a bolt into a plate is formulated as: insert bolt into plate (against: face bl, face Pl, centerline b2, centerline P2)
aligned:
Feature information is obtained from the PAM database which contains the spatial relationships that define mating conditions. Based on these spatial relationships, the relative positions of components in the assembly product are inferred. 5.4. Program synthesis The two lower levels in RALPH concern the synthesis of a robot program. This is accomplished by analyzing the mid-level commands with respect to a variety of aspects such as: • • • • •
precedence constraints, feasible grasps, collision-free gross motion, fine motion, involvement of sensors.
RALPH has different planning modules for these purposes that are integrated in PAM and obtain data from the spatial relationships engine. The following example illustrates the interactions between some of the planning modules and the relevance of inverse
Automated robot programming • M. PRINZ et kinematic analysis with respect to integration. In a typical assembly operation as picking up a component and attaching it to another subassembly, the mid-level command provides a set of spatial relationships that represent the desired assembly of component and subassembly. The assembly operation can be subdivided into picking up the part and the actual assembly operation. The grasp planner determines the type of robot gripper in use and evaluates the geometric features of the objects involved in both manipulations for feasible grasps. By eliminating surfaces that are in contact or will come in contact with other objects during manipulation from the list of possible grasp faces, a set of possible grasp configurations is obtained. Each configuration is formulated as a set of spatial relationships between geometric features of the gripper and the part. The user can now select a grasp configuration from this set of feasible grasps. 6 Now, by solving an inverse kinematic problem, a robot joint configuration must be found that allows grasping the part according to these spatial relationships between gripper and part. Using our method for the automatic formulation and solution of kinematic equations base on the geometric and topological information about the robot and the assembly product, the corresponding joint values of the robot can be obtained as follows: a temporarily closed kinematic chain is automatically defined, including the robot and the part to be grasped, with the robot's based and the part fixed to the ground. We obtain the kinematic model of this chain by adding the spatial relationships between gripper and part that represent the planned grasp to the kinematic constraints imposed by the robot's joints. As mentioned before, the spatial relationships engine infers the degrees of freedom and axes of rotation or translation for each kinematic pair, thus providing the necessary data to translate the CAD data into a mathematical model for kinematic analysis. Both the initial joint values before grasping the part and the calculated values for grasping (see Fig. 6) are then provided as input to the gross motion planner in order to find a collision-free trajectory between these two configurations. The planner first creates an n-dimensional configuration space (where n is the number of DOFs of the robot), labeling each configuration as either collision-free or not collision-free*. A potential field algorithm is then applied to find a short path through the collisionfree configuration space. ~4 The resulting series of configurations determines the motion of the robot from its current position to a position that allows to grasp the part. The problem of determining the robot's motion from grasping the part to the attachment to the *The number of evaluated configurations depends on the resolution that the user specifies.
al.
107
Fig. 6. Robot configurations before and after inverse kinematic analysis. subassembly is solved in the same way as the pick-up problem. In order to calculate the robot's joint values at the time of attaching the part, the kinematic equations of the closed kinematic chain that now include the robot, the part and the subassembly are automatically formulated and solved. These values are then adjusted by a fine motion planner that obtains additional information from sensors. It is important to note that our approach allows for a high flexibility in terms of defining mechanical systems as temporarily open or closed kinematic chains, and adding or subtracting kinematic pairs according to the inputs from RALPH's planning modules. This flexibility is necessary in the context of automatic robot programming where, in contrast to mechanism analysis, changes in the kinematic model are in the nature of the subject. Once all manipulations have been planned at the general robot level, a program for a specific robot can be created. This translation is dependent on the language of the controller of the specific robot being used, but fairly straightforward when translating to a language like VAL II, developed by Unimation. 5.5. S i m u l a t i o n Simulation is an important aspect of an automatic robot programming system as it allows the user to assure the quality of a generated program without taking the risk of damaging physical devices in test runs due to program errors that might cause collisions. It is also a fast and flexible tool to study the effects of design changes with respect to manufacturability. With PAM as the core of RALPH, graphical simulation goes far beyond the creation of a computer graphics animation that displays the final results, i.e. the calculated movements of a robot's links. We utilize the potential of CAD as a rapid prototyping tool right from the initial stages of design that concern the modeling of assembly products and manufacturing environments. It is one of the major advantages of CAD-based modeling that the user has visual control during the design processes. With the capability of a system to produce forward and inverse kinematic solutions at any time and display the results graphically, there is an excellent feedback that can prevent the pursuit of misdirected design efforts at early stages, thus
108
Robotics & Computer-IntegratedMantffaeturing• Volume 12, Number 1, 1996
increasing the efficiency and productivity of the designer. 6. C O N C L U S I O N The Product Assembly Modeler (PAM) is a designer system that was developed as a concurrent engineering tool with the purpose to integrate modeling, design evaluation, and automated manufacturing process planning in the context of general assembly products. Much of the work presented here was motivated by the insight that, with the maturing of CAD in general and PAM in particular, there is great potential for the enhancement of systematic kinematic modeling and analysis, hence enabling the mechanism design engineer or process planner to accomplish his tasks more efficiently. Feature spatial relationships play a central role in deriving the governing kinematic equations of a mechanical system from the geometric information stored in the database of PAM. The spatial relationships that are associated with a kinematic pair imply constraints on the relative position and motion of the links in a mechanism. A rule-based system determines the DOFs of the kinematic pairs so that a mathematical model for kinematic analysis can be derived automatically. The algorithms used to solve the kinematic equations are based on well-established methods for iterative numerical computation and have proved to be very efficient. This is due to the fact that, before the inverse kinematic analysis is initiated, the spatial relationships of all pairs, except of those that imply a connection to the ground and a closure of a kinematic loop, are employed to assemble a possibly branched, open kinematic chain. This approach yields excellent input data for the numerical methods mentioned above, as their convergence relies on good initial estimates for the joint variables. It is important to note that PAM permits modeling of mechanisms (including robotic assembly systems) with a minimum of required input by the user, that is, the definition of spatial relationships between geometric features. This approach relieves the user from being dependent on other methods that require clever formulations and intuition to formulate a mathematical model. Modeling and analysis capabilities of PAM encompass open-loop and closed-loop, planar and spatial, single and multi-loop systems. Rather than creating an animation of a mechanism after the input of all relevant data, the designer is supported by graphical display as kinematic chains are expanded, assuring him of the accuracy and consistency of his model. Changes and extensions can be made easily and the flexibility to analyze models as open-loop or closed-loop mechanisms is particularly useful for automated planning of robotic assembly. Task-level robot programming concerns the translation of commands in pseudo-natural language into commands that are executable by specific robots.
The determination of the configuration of the robot's links, with respect to operations necessary to carry out a task, is an important aspect in this process and known as the inverse kinematic problem. In our approach, the spatial relationships that characterize a robot's interaction with its environment, e.g. when grasping a part, are added to the kinematic model of the robot in order to formulate the kinematic equations for a temporarily closed kinematic loop. Based on this formulation, a solution for the inverse kinematic problem is found.
REFERENCES
1. Ambler, A. P., Popplestone, R. J.: Inferring the positions of bodies from specified spatial relationships. Artificial Intelligence 6(2): 157-174, 1975. 2. Asad, H., Kitagawa, M.: Form closure grasping by a reconfigurable universal gripper. In A S M E 1988 Manufacturing International, April 1988. 3. Bausch, J. J., Youcef-Toumi, K.: Kinematic methods for automated fixture reconfiguration planning. In IEEE--Robotics and Automation Conference, Cincinatti, OH, May 1990. 1993. 4. Boothroyd, G., Dewhurst, P.: Product Design for Assembly. Boothroyd Dewhurst. 1987. 5. Dixon, J. R., Libardi, E. C., Nielson, E. H.: Unresolved research issues in development of design-with features systems. Proceedings of the 1988 IFIP/NFS/RPI Workshop on Geometric Modeling, January 1989. 6. Dubai, A., Nnaji, B. O.: Task oriented and featurebased grasp planning. Int. J. Robot. Comput.-Integrated Mfg 9(6): 471-484. 7. Erdman, A.: Modern Kinematics, Development in the Last Forty Years. John Wiley. 1993. 8. Gomery, R. E.: From the 'Ladder of Science' to the product development cycle. Harvard Bus. Rev. NovDee: 1989. 9. Haug, E. J.: Computer Aided Kinematics and Dynamics of Mechanical Systems, Vol. I: Basic Methods. 1989. 10. Kang, T. S., Nnaji, B. O.: Feature representation and classification for automatic process planning. J. Mfg Syst. 12(2): 1993. 11. Liu, H.: Spatial relationships in product design. In 1st Industrial Engineering Research Conference, Chicago, 20--21 May 1992, pp. 183-186. 12. Liu, H. C., Nnaji, B. O.: Design with spatial relationships. J. Mfg Syst. 10(6): 1991. 13. Luby, S. C., Dixon, J. R.: Designing with features: creating and using a features data base for evaluation of manufacturability of casting. Comput. Mech. Engng November: 25-33, 1986. 14. Millette, F.: A gross motion planner for RALPH. MSc Thesis, University of Massachusetts at Amherst, Department of Mechanical Engineering, 1992. 15. Nnaji, B. O.: A framework for CAD-based geometric reasoning for robotic assembly language. Int. J. Prod. Res. 26(5): 735-764, 1988. 16. Nnaji, B. O.: RALPH: An Automatic Robot Assembly Programmer--An Overview. SME Trans. Robot. Res. 1: 5-1-5-23, 1990. 17. Nnaji, B. O.: Theory of Automatic Robot Assembly and Programming. Chapman-Hall. 1993. 18. Nnaji, B. O., Chu, J.-Y.: A schema for CAD-based robot assembly task planning for CSG-modeled objects. J. Mfg Syst. 7(2): 131-145, 1988. 19. Nnaji, B. O., Chu, J.-Y.: RALPH static planner: CADbased obot assembly task planning for CSG-based objects. Int. J. Intelligent Syst. 5(2): 153-181, 1990.
Automated robot programming • M. PRINZ et al. 20. Nnaji, B. O., Liu, [-I.: Product assembly model for automatic robot programming. In Proceedings of CAD, CAM, Robotics and Factories of the Future Conference, Indian Institute of Technology, Delhi, India, 1989. 21. Nnaji, B. O., Liu, H.: Feature reasoning for automatic robotic assembly and machining in polyhedral representation. Int. J. Prod. Res. 28(3): 517-540, 1990. 22. Nnaji, B. O., Liu, H., Rembold, U.: A product modeler for discretecomponents. Int. J. Prod. Res. (accepted), 1995. 23. O'Grady, P., Oh, J. S.: A review of approaches to design for assembly. Concurrent Engng 1(3), 1991. 24. Popplestone, R. J.: The Edinburgh designer system as a framework for robotics. Proceedings of the IEEE Int. Conf. Robot. Auto. 3: 1972-1977, 1987. 25. Popplestone, R. J., Ambler, A. P., Bellos, I. M.: An efficient and portable implementation of RAPT.
109
Proceedings of 1st ICAA, Bedford, U.K., March 1980. IFS Publications, 1980, pp. 411-422. 26. Popplestone, R. J., Ambler, A. P., Bellos, I. M.: RAPT: an interpreter for a language describing assemblies. Artificial Intelligence 14: 79-107, 1990. 27. Rembold, U., Nnaji, B. O., Storr, A.: Computer Applications in Manufacturing, Addison Wesley. 1993. 28. Sandor, G. N., Erdman, A. G.: Advanced Mechanism Design--Analysis and Synthesis, Vol. 2. Prentice-Hall. 1984. 29. Whitney, D. E.: Real robots do need jigs. Harvard Bus. Rev. May-June, 1986. 30. Young, R. E., Greef, A., O'Grady, P.: An artificial intelligence-based constraint network system for concurrent engineering. Int. J. Prod. Res. 30(7), 1992.