# Detecting and Solving Tube Entanglement in Bin Picking Operations
## 2 Related Work  
Three of the more complex tasks in bin picking are grasp planning, motion planning, and failure detection. Grasp planning aims to find a collision-free configuration for the robotic gripper that allows it to pick-up an object. Common parameters for this configuration include the grasping point on the object, the approach vector and the gripper's orientation [4]. Grasp planning approaches are typically divided into a synthesis and analysis phase, where grasp configurations are generated and evaluated, respectively [5]. Most of the earlier works on grasp planning present analytical approaches, which aim to find grasps that optimize certain physical properties such as force-closure (where the grasp is resilient against external wrenches applied on the object being picked) or stability [6]. However, these approaches typically have the disadvantages of requiring accurate geometric models for the objects, having a high computational cost and few of them taking into account the constraints of the task at hand [7]. Nowadays, most researchers use empirical (or data-driven) methods to avoid a complex mathematical formulation of the problem by relying on prior knowledge. Empirical methods include learning-based techniques, which rely on previously acquired knowledge, and heuristic techniques, which use directly a representation of the scene. [PERSON] et al. used depth images to compute a set of grasp candidates and trained a Convolutional Neural Network (CNN) using simulated examples to determine if grasping a given candidate and applying a lifting motion leads to entanglement [2]. To the best of the authors' knowledge, this is the only other paper that explicitly deals with random bin picking of entangled objects. Heuristic methods do not need previous training and instead require parameter tuning. They also have the advantage of allowing users to more easily understand why a given decision was made. [PERSON] et al. modeled the objects as a set of primitives (namely cylinders) and used a system of rules to define a set of grasping configurations, which take into account the geometry of the robot gripper and arm [8]. [PERSON] et al. resorted to simple metrics for grasp evaluation such as the object's proximity of the nearest object and determined the best objects to be picked before finding the most suitable grasps [9]. These contributions inspired the grasp planning solution of this manuscript, which also uses empirical methods and heuristics for grasp synthesis and evaluation. Motion planning is used to determine a trajectory for the gripper, namely after grasping an object. Most of the research focuses on the particular case of finding a trajectory that avoids the gripper and the grasped object from colliding with the environment [10; 11; 12]. Planning algorithms include exploring the gripper configuration space (or one of its sub-spaces) with random sampling or using optimization techniques to minimize an objective function subject to equality and inequality constraints (such as keeping the gripper horizontal or preventing each of the robot arm's joints from exceeding a certain velocity). However, in the problem at hand, due to tube entanglement, in many cases, collision is unavoidable and the objects' pose may change as a certain tube is grasped, which must be taken into consideration when determining if a trajectory leads to multiple tubes being picked. Thus, this article proposes an alternative solution that involves evaluating trajectories using the Gazebo physics engine [13]. Failure detection is crucial in bin picking operations. If an item falls outside a robot's working area, it may compromise the following steps in an assembly line. For this reason, companies spend much money on regular quality checks for their products and manufacturing pipelines. Force/torque sensors have been used several times to detect if pick-and-place operations were successful [14; 15; 16]. [PERSON] et al. focused on picking a set of entangled flexible tubes from a vehicle's air conditioning system [15].