Uncertainties are inevitable in robotic assembly in unstructured environments since it is difficult to construct fixtures to guide motions of robots. This study proposes an augmented Petri net to model and control assembly tasks in an unstructured environment. Conditions and costs of state changes can be simply computed from the output functions of the Petri net model. An algorithm is also proposed to adapt the model online. The model constructed by the algorithm is more compact and efficient than an off-line model since its states and events are dynamically modified online. The proposed method is evaluated by simulations and experiments with L-type peg-in-hole assembly using a two-arm robot system.