**2. Related Work**

For solving the peg-in-hole with a dual arm robot, Ref. [17] describes the problem of insertion as a search problem of the hole, where force/torque (F/T) sensor data was used to identify the different assembly stages using thresholds. The challenge with thresholds is the continuous tuning due to changes in the assembly conditions. In this research we compare the threshold method with machine learning methods for contact states classification.

In [13] is proposed a pool of assembly primitives and maintaining an unilateral contact constraint, where the need of more advanced force control is needed to prevent the abrupt changes in contact forces. Our approach considers quasi-static motion and discrete events, which excludes complex models of the force feedback.

In [7] there is a definition of a master-slave strategy and a cooperative strategy to evaluate the assembly of the peg-in-hole with one and two arms. The advantage of such work is the use of a compliant robot with low accuracy, which can manage contact forces with less risk of damage. It also defines thresholds as trigger functions in the assembly sequence. In [8] a dual arm robot is also used using a leader-follower strategy and a sensor-less and active compliance admittance method with real time trajectory generation.

Double F/T sensors in robotics have been reported in [24,25] where two robots are used for a bi-manual peg-in-hole assembly task. Discrete event systems (DES) are used to model the assembly process. The F/T data is processed separately for each robot and compared with defined thresholds of forces and torques; qualitative values are defined due to the high variability of force/torque signals in every execution. This eliminates the need of tuning constantly.

Another dual arm system with double sensor is presented in [9], where the main focus is the manipulation of objects in a coordinated way using the F/T signals as the feedback for the impedance controller. There, the authors designed their own software platform. Our approach was using ROS, a developing platform in order to transfer knowledge to different platforms.

The single arm peg-in-hole assembly has been broadly studied in recent years. In [22] a safe learning mechanism is used to avoid damage to the system. This idea was taken for our work to prepare the robot for uncertain and unexpected conditions. In [26] the authors express their concern about their classical programming methods and how position control-based methods are not suitable for high precision assembly. In contrast, in this work we consider that the classical position control-based method can be improved by integration of machine learning.

In [27] a combination of different methods such as Principal Component Analysis (PCA), Hidden Markov Models (HMM) and time series for contact state recognition is used. The authors' approach of analysing the contact states recognition as a classification problem is suitable for our project. Expected Maximization and Gaussian Mixture Models (EM-GMM) for monitoring contact states during the peg-in-hole assembly is presented in [28], where the authors present a clear notation of the contact state classification problem that is adopted in this work.

Different searching techniques are proposed such as spiral search [29], attractive region in environment (ARIE) [30], random search in a plane [7]. Those approaches are not suitable in our project due to the high stiffness of our robot, which can be unsafe during constrained motion.

#### *2.1. Problem Definition*

Industrial robots usually lack appropriate external programming tools to design a suitable control system [9] . Moreover, industrial robots programming method is based on defining a sequence of steps in the position space. The robot is moved to a desired position, then this position is saved in order to follow a sequence of movements.

An automated assembly process is programmed to repeat a defined sequence. In case the robot cannot reach the final destination, an error recovery sequence must be programmed. In that sense, when the error position is difficult to estimate, there are few chances that this strategy will work.

When using dual arm robots for a fixtureless assembly process, an uncertain environment is produced, hence, a positioning error among the parts is expected to appear previous to the assembly stage. This positioning error is very difficult to estimate when using F/T sensors due to noisy signals that make it difficult to classify. Moreover, a robot with high accuracy and high stiffness abruptly presents changes during contact states. In such conditions, using F/T data in a qualitative force and moment templates as proposed in [31], making calculations using transformation matrix as proposed in [23], and requires continuous tuning, resulting in less successful assemblies.

By applying an appropriate assembly strategy, the automated process can be strengthened by including machine learning algorithms that drive better decision making on the process and avoid assembly failures.
