Local Contact State Space Generation Using Colored Petri Nets

6 downloads 0 Views 85KB Size Report
proaches can be found in the bibliography. Following one ... obtain the contact state graph using colored Petri nets. The .... constrained obtained contact formation as well as the ex- ..... Man and Cybernetics - Part C: Applications and Reviews,.
Local Contact State Space Generation Using Colored Petri Nets Jan Rosell Institut d’Organitzaci´o i Control de Sistemes Industrials (UPC) Diagonal 647, 08028 Barcelona, SPAIN Fax: +34 934016605 e-mail: [email protected]

Abstract The automatic synthesis of a plan to perform a robotized assembly task from a high level description of the product to be assembled is a difficult issue which involves assembly planning and task planning. One of the main scopes of task planning is the planning of contact motions, which usually relies on a graph representation of contact space. This paper deals with the automatic computation of the local contact space using colored Petri nets (CPN). The presented CPN model is to be integrated into a Petri net based system that copes with both planning issues, making use of the hierarchical nature of high level Petri nets.

1. Motivation An autonomous robotic assembly system must face problems related to both assembly planning and task planning [3]. Assembly planning is generally associated with sequence planning, i.e. the determination of a feasible and optimal sequence of operations (e.g. part matting operations) to be done in order to assemble a product. Assembly planning must take into account the availability of resources in the workcell, as well as other issues like the stability of subassemblies. Task planning deals with the translation of an assembly plan into the robot operations that may allow the successful execution of the task. Task planning involves the planning of sensory operations, gross-motion planning (the planning of the robot motions in order to avoid collisions), and finemotion planning (the planning of (contact) motions of the robot in cluttered environments with low clearances). The task planer also copes with issues related to the specification, validation and code generation of the robot program. Fine-motion planning usually requires the planning of motions in contact, which rely on a graph representation of the contact space (the space composed of the configurations of the manipulated object that produce contact with the objects in the environment) that describes the possible contact  This work was partially supported by the CICYT projects TAP990839 and DPI2001-2202.

states and their neighboring relations. The automatic generation of such graph is not an easy task, and only few approaches can be found in the bibliography. Following one of such approaches [12], this paper aims to automatically obtain the contact state graph using colored Petri nets. The motivation for using Petri nets is the following. The modelling formalism of Petri nets [9] is a powerful tool to describe Discrete Event Systems. It has been extensively used in manufacturing systems, and it has also been used in both assembly planning [1, 13] and task planning [7, 10]. Moreover, there is the need of integration of assembly planning and task planning [8]: On one hand, system flexibility and uncertainty in assembly operations give rise to the need of dynamic assembly planning, i.e. the need to change the assembly plan as a consequence of the task plan results. On the other hand task plans must be able to be updated according to assembly plan changes. An integrated planner should be described using the same modelling technique in all of its phases, since this aids the comprehension of the whole system and the resolution of conflicts and interactions between levels. Petri nets (or its more abstract expression of hierarchical high level Petri nets) is a modelling technique that suits this requirement. The paper is structured as follows. Section 2 reviews related works. Section 3 presents the Petri net framework for autonomous robotic assembly systems. Section 4 introduces the Petri net based methodology to construct the local contact space. Finally, Section 5 shows an example and Section 6 concludes the work.

2. Related Work 2.1. Contact Representation Two ways have been introduced to describe the contact situations between two objects (represented by their polyhedral models). Being A and B the manipulated and the static object, respectively, Lozano-P´erez [6] introduced the basic contacts as the following three point-contacts: a) type-A (face vs. vertex ), b) type-B (vertex  vs. face ), c) type-C (edge  vs. edge ). Any contact situation between A and B is described as a combination of these basic contacts.

Another (higher level) representation was introduced by Xiao [11]. In this approach a principal contact (PC) is defined as the contact between a pair of surface elements (vertices, edges or faces) which are not the boundary of any other contacting surface element. Any contact situation is described as a contact formation (CF) defined as a combination of principal contacts.

2.2. Contact Motion Planning Several approaches to contact motion planning rely on a graph representation of the contact situations and their neighboring relations. Some contact motion planners describe the contact situations using basic contacts, e.g. Dakin and Popplestone [2] start from a nominal trajectory synthesized from the geometric models of the parts to be assembled with zero clearance at the sites of insertion. For every critical configuration a local contact space is represented as a graph and used to plan a traversable sequence of contact states described using basic contacts. This approach considers 6 d.o.f. tasks by linializing hypersurfaces around the critical configurations. Other contact motion planners describes the contact situations using contact formations, e.g. Ji and Xiao [5] follow a two-level planning approach where a search is first done at a high-level using a graph of contact states described as contact formations, and then a low-level motion planning is performed within the set of contact configurations constrained by the same contact formation. The modelling formalism of Petri nets has been used in contact motion planning, e.g. in the approach of McCarragher [7] assembly is modelled with a Petri net, where places are either state places or control places. State places represent basic contacts of the assembly (the simultaneous marking of state places representing multi-contact situation), and transitions represent the gaining or losing of a basic contact. Control places represent conditions of external inputs that enable transition to occur and are connected to each transition by an inhibitor arc. A trajectory planner defines a performance measure and finds a path in the Petri net that maximizes it.

admissible state transitions between neighbor contact situations are found using the theory of Polyhedral Convex Cones. The method is applied to a simple 2D example. The approach of Xiao and Ji [12] describes the contact situations using principal contacts and contact formations. A containment relation between principal contacts and between contact formations is defined, which allows to determine the neighboring contact states. The contact state graph is generated following a divide-and-merge method. Subgraphs are automatically generated by relaxing seed contact formations by finding the less-constrained neighbors (defined by the containment relations). The relaxation process takes into account the topological feasibility of the lessconstrained obtained contact formation as well as the existence of a feasible path to change from one to the other. The obtained subgraphs are merged into the final contact state graph. The method is illustrated with both (complex) examples in 2D and 3D.

2.4. Discussion Representing contact situations by means of Contact Formations leads to a more concise representation of the contact state space and to more robust contact identification procedures. Moreover, following this representation, a complete procedure to automatically generate the contact state graph has been developed, as described in the previous section. Therefore, this is a promising approach to the planning of contact motions within the scope of an autonomous robotic assembly system. Also, Petri Nets have proved to be a useful tool for the planning of contact motions, although the approaches that follow this methodology do not automatically generate the Petri Net model of the task used for the planning. Taking into account the above two considerations, this paper has the objective to automatically generate the contact state graph (following the approach of Xiao and Ji [12]) using Petri Nets. The modelling by means of Petri Nets helps the understanding of the generation procedure and is the first step towards a PN-based motion planner that, as detailed in the following section, is to be integrated into an autonomous robotic assembly system.

2.3. Contact Space Generation

3. Framework Although for contact motion planning purposes, contact situations are described as a graph, few authors have tackled the (difficult) problem of automatically synthesizing such graph, being considered most of the times as the starting point of the planners. We are aware of only two approaches. The approach of Hirai [4] describes the contact situations using basic contacts. First, the existence of an admissible set of configurations (those satisfying all geometric constraints) for each possible contact situation is found by sampling, using a modified Monte Carlo method. Then, the

In an autonomous robotic assembly system there are several problems at different levels of abstraction, from assembly planning to task planning (e.g. from the generation of the assembly sequence to the real-time control of the robot motions). As stated in Section 1, there is the need of a modelling methodology that integrates them. A hierarchical approach using colored Petri nets is proposed [8]. At the highest level of the hierarchy, an Assembly Petri Net (AssPN) is proposed as a net that describes

the product to be assembled and the resources needed. AssPN provides a way to find an optimal sequence of actions (following a given cost criteria) to perform an assembly/disassembly task in a flexible manufacturing system. The execution of each action is performed by a set of robot skills, each skill being implemented as a sequence of contact motions. Skills can be modelled using Petri nets: Task Petri Nets (TkPN) are proposed for that purpose, with their reachability graph representing the contact state graph of the skill. A fixed net structure is proposed for all skills, using colors and functions to define skill particularities. Fuzzy information may be used to consider uncertainty. This paper introduces a Petri net model, as a part of TkPN, to automatically generate all the contact states to find a path in contact space to perform robot skills.

motion (translation, rotation or combined) or by a reconfiguration motion (change of configuration within the same CF) followed by an infinitesimal motion. As a difference with respect to [12], the actual existence of the transition motion is not verified. As a consequence, the information contained in the graph is the topological neighboring information, i.e. the same graph can be obtained by two topologically equivalent tasks with actual different geometry. Therefore, some of the transitions in the graph cannot actually take place for a given geometry (this problem will be tackled later on, when using the obtained graph for the motion planning), but on the other hand the obtained graph is able to take into account non-nominal CFs that can actually take place due to uncertainty.

4.2. Color Sets

4. Contact State Space Generation using CPN This section briefly describes the relaxation procedures introduced by Xiao and Ji [12], and then presents the colored Petri nets to implement them and automatically generate the contact states and their connectivity.

4.1. Relaxation Procedures Let MCN and LCN mean more-constrained neighbor and less-constrained neighbor, respectively. As developed in [12], a MCN CF composed of  principal contacts can be relaxed to a LCN CF by applying one of the following actions to each of its PCs:

 remove  

 change   to a LCN   contained in     keep  

Of course, remove and keep operators must not be applied to all the principal contacts simultaneously. Also, the relaxation operators that do not produce topologically feasible CFs are not considered, like the ones involving concave vertices or vertex-vertex contacts, or the (keep, change) operator that is not applied to a CF with two face-face PCs. The change operator involves the relaxation of PCs, which is done as follows. Let   and  be the contacting elements forming a principal contact    . Let  be the operator denoting the boundary. Then, a LCN         satisfies one of the following relations:

    and   

 

  and   

It is assumed that the MCN CFs from which the graph is to be generated are not isolated configurations in Configuration Space, i.e. a contact formation can always change to one of its neighbor contact formations by an infinitesimal

 Element: string representing a vertex, edge or face.  Border: list of Elements representing the set of convex Elements that constitue the border of another Element.  PC: record composed of four fields, two of type Element representing the contacting elements of the PC ( and  ) and two more of type Border indicating their borders (  and  ).  twoPC: record composed of two fields of type PC, representing a pair of PCs that compose a CF.  PCop: enumerated colorset containing keep, remove and change, representing the operators to relax PCs.  CFop: list of PCop with the operators to relax the PCs of a CF.  Listop: list of CFop.  ListCF: list of contact formations.  CF: record composed of the following four fields: npc of type ListCF, lop of type Listop and parents and descendants of type ListCF. ncp is the set of PCs composing the CF, lop is the list of operators to be used for relaxing the CF, parents and descendants are the MCN CFs and the LCN CFs, respectively.  CFop: Product CF  CFop.  PCop: Product PC  PCop.  twoPCop: record composed of two fields of type PCop, representing a pair of PCs that compose a CF and their associated PC-operators.

4.3. Graph generation Petri net The Petri net for the generation of the contact state graph is a hierarchical Petri net that has been implemented with Design/CPN software. At the highest level, there is the main Petri net   shown in Figure 1. Place 

CF

P

CF

In

P_IN

initializeCFs("CF1CF2")

P_IN 1‘cf1

1‘cf1

1‘cf1 [length (#npc cf1) = 2]

t_IN2

2‘e

2‘e

t_CF2

P_control

t_CF1

[length (# npc cf1) = 1]

1‘(#lop cf1) Listop

2‘e

token

[length (#npc cf1) = 2]

P_list twoPC

P_MCNCP

1‘lop1

t_relaxPC2

CF

CF

twoPC

1‘p1

P_LCNCF

P_MCNCF

1‘cf1

1‘cf1 1‘cf1

P_2PC

2‘e

2‘e

twoPCxOP

CFtoPC( )

1‘cf1

1‘cf1

P_LCNPC

1‘cf1 1‘p

t_IN1

[(#lop cf1)nil]

t_OUT1

[(#lop cf1)=nil]

t_OUT2 1‘cf1

1‘cf1 CF

P_OUT

[(#lop cf1)=nil]

t_IN2

t_MCNCF2 t_LCNCF updateCF2( )

1‘cf1++1‘cf2

t_merge

[(#lop cf1)nil]

[ merge()]

1‘e

1‘e P

I/O

token

P_control

createCF2( )

merge(cf1,cf2)

Figure 1. Petri net   .

P Out

P Out CF

CF

P_LCNCF

P_MCNCF 2‘e

is initialized with the seed CFs representing the most constrained CFs, and place   ends with all the CFs and their neighboring relations. The substitution transitions   and   , respectively linked to    and    , relax the CFs composed of one and two PCs. As a result of their firing, which is controlled by place , the updated MCN CF is placed in    and the obtained LCN CF is placed in    . The parents and descendants lists are updated recording the relationship between the original MCN CF and the obtained LCN CF. Whenever the CF tokens in    and   have an empty lop list, i.e. they cannot be further relaxed, they are placed into   by   and   , or returned to  by  and  , otherwise. Finally,  is devoted to detect tokens in   representing the same CF and to merge them. The Petri net    , shown in Figure 2, executes a CF-operator on a CF composed of two PCs. Given a token of type CF in the input port, representing a MCN CF with two PCs and the lop list with the CF operators to relax it, the net selects the first CF-operator from lop and uses it to relax the PCs by firing the substitution transition   linked to    . The initial MCN PCs with updated information and the LCN PCs are respectively placed into   and   . From these tokens the net finally places the following tokens in the output ports:

   : a CF token representing the MCN CF. If a change PC-operator was involved in the relaxation procedure then the borders of the corresponding PC in the token are updated as explained below in    , or they are left unchanged otherwise. The initial lop list is updated by eliminating the CF-operator used whenever it does not include any change PC-operator or the change PC-operators cannot be further applied, or it is left unchanged otherwise.

Figure 2. Petri net    .

   : a CF token representing the LCN CF composed of the LCN PCs in   and the corresponding lop list depending on the type of CF (the CF-operators in lop are combinations of PC-operators, excluding those that contain change for a PC that represents a contact involving a vertex). The Petri net    works in a similar but simpler manner as    . The Petri net    (not shown) executes a PC-operator (either keep, remove or change) on a pair of PCs that compose a CF. Given a token of type twoPCxOP in the input port, representing a pair of MCN PCs with their PC-operators, the net relaxes each of them by firing two substitution transitions  and  both linked to    , shown in Figure 3, that executes a PC-operator (either keep, remove or change). Given a token of type PCxOP in the input port of this net, representing a MCN PC with a PC-operator, it places the following tokens in the output ports:

   : a PC token representing either the same MCN PC if  is fired, or a void PC if  is fired, or the LCN PC generated by    if the substitution transition   is fired.    : a PC token representing either the same MCN PC if the PC-operator is either keep or remove, or the MCN PC updated by    , otherwise. The Petri net    (not shown), executes the change PC-operator. Given a token of type PCxOP in the input port, representing a MCN PC with the change PC-operator, the net places the following tokens in the output ports:

  : a PC token representing the LCN PC generated

P

5.2. Example of PC relaxation

PCxOP

In

P_PC 1‘r

1‘r 1‘r

t_keep

t_remove

[#2 r=keep] #1 r

#1 r

[#2 r=remove]

t_change

[#2 r=change]

voidPC( )

#1 r

PC P

PC

Out

P_MCNPC

P

Out

As detailed by    and    , when a PC is relaxed by the change PC-operator, several PCs can be obtained (depending on the selected element to be changed), and the original PC is modified to record the relaxation applied. As an example, when relaxing    by changing  by  , the following results:

   

P_LCNPC

Figure 3. Petri net    .

4.4. Discussion As in the original procedure, the quality of the contact space depends on the initial contact formations used to generate the contact state space, i.e. the completeness of the contact state graph depends on the seed CFs placed in  as initial marking. The complexity of the algorithm is dependant on the geometry of the problem. Nevertheless, implementing the generation of the contact state graph by means of Petri nets systematizes the procedure and aids its understanding. The marking obtained after the execution of the Petri net represents the contact states and its neighboring relations. It is to be used as initial marking of a Petri net devoted to the planning of the sequence of contact formations from the initial contact formation to the goal one.

5. An Example 5.1. Task description As an example consider the peg-in-hole assembly task of Figure 4a. Some of the PCs of the peg-in-hole task are 1 :

                                         Let                  , where  , , and  are the PC-operators keep, remove and change, respectively. The seed CFs used for the computation of the contact state graph are (Figure 4b):

  1 Note

                   

that concave verices are omitted from the borders.

(1)

And when relaxing    by changing  by  , the following results:

   

by substituting the element   ( ) by the first element of the border   ( ).

  : a PC token representing the MCN PC updated by eliminating from the corresponding border the element used to generate the LCN PC.

                                  

(2)

5.3. Example of CF relaxation As an example of using the relaxation procedure described by    , let us apply the   CF-operator to  . The following is obtained (Figure 4b):

                     If now the   CF-operator is applied, the following is  

obtained (Figure 4b):

 

                      

5.4. Results Let the following list be the set of PCs of the task, where only the contacting elements are specified (Figure 4a):        ,        ,        ,        ,        ,        ,        ,        ,        ,       ,       . After executing the Petri net of Figure 1 the CFs of the task are obtained in place   . They are listed as columns of Table 1, that shows all MCN CFs (rows) that can be relaxed to LCN CFs (columns) by the corresponding CF-operator indicated in the table.

6. Conclusions The paper has presented the use of colored Petri nets for the automatic computation of the local contact space to be used in contact motion planning. The approach is based on an existing algorithm by Xiao and Ji [12]. The CPN models are to be integrated into an autonomous robotic assembly system described as a hierarchical high level Petri net. The objective is to cope with both assembly planning and task planning problems in order to implement an autonomous robotic assembly system.

a)











  







b)









MCN CFs

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17







Figure 4. a) Planar peg-in-hole assembly task. 2







1



3

4

5

6

7

8

c,c

c,c

c,c

c,c

c,c

c,c

9

10

11

b) Example Contact Formations.

LCN CFs 12 13

14

15

16

17

18

19

20

21

22

23

24

25

                                       k,r

c,c

c,c

c,c

c,c

c,c

c,c

k,r

r,k r,k

c,r

k,r k,r

r,c r,c r,k

c,r

c,r

r,c r,c

c,r

c,r

c,r

r,k r,k

k,r k,r

r,k

r,k

k,r k,r

r,k r,k

k,r k,r r,k

r,k k,r r,k

k,r

r,k

k,r k,r

r,k c

c

c

c c

c

c

c

Table 1. Neighboring relations between CFs indicated by the CF-operators used from MCN to LCN CFs.

References [1] T. Cao and A. C. Sanderson. AND/OR Net representation for robotic task sequence planning. IEEE Trans. on Systems, Man and Cybernetics - Part C: Applications and Reviews, 28(8):104–218, May 1998. [2] G.Dakin and R. Popplestone. Simplified fine-motion planning in generalized contact space. In Proc. of the IEEE Int. Symp. on Intelligent Control, pages 281–287, 1992. [3] S. Gottschlich, C. Ramos, and D. Lyon. Assembly and task planning taxonomy. IEEE Robotics and Automation Magazine, pages 4–12, September 1994. [4] S. Hirai. Analysis and Planning of Manipulation Using the Theory of Polyhedral Convex Cones. Ph.D. thesis, Kyoto University, 1991. [5] X. Ji and J. Xiao. Planning motion compliant to complex contact states. Int. J. of Robotics Research, 20(7):446–465, June 2001. [6] T. Lozano-P´erez. Spatial planning: A configuration space approach. IEEE Trans. Comput., 32(2):108–120, 1983.

[7] B. J. McCarragher and D. Austin. Model adaptive hybrid dynamic control for constrained motion systems. IEEE Trans. on Industrial Electronics, 41(6):631–640, Dec. 1994. [8] J. Rosell. Assembly and task planning using Petri nets: A survey and a roadmap towards autonomous robotic assembly systems. Technical report IOC-DT-P-2002-13, Universitat Polit`ecnica de Catalunya, 2001. [9] M. Silva. Practice of Petri Nets in Manufacturing, chapter Introducing Petri nets, pages 1–62. Chapman & Hall, 1993. [10] D. Simon, E. C. Castaneda, and P. Freedman. Design and analysis of synchronization for real-time closed-loop control in robotics. IEEE Trans. on Control Systems Technology, 6(4):445 –461, July 1998. [11] J. Xiao. Automatic determination of topological contacts in the presence of sensing uncertainties. In Proc. of the IEEE Int. Conf. on Robotics and Automation, pages 65–70, 1993. [12] J. Xiao and X. Ji. On automatic generation of high-level contact state space. Int. J. of Robotics Research, 20(8):584– 606, July 2001. [13] X. Zha. An integrated intelligent approach and system for rapid robotic assembly prototyping, planning and control. In Proc. of the 1999 IEEE Int. Conf. on Robotics and Automation, volume I, pages 108–113, 1999.