In the last years the growth of the robotic and industrial automation market has been exponential and all the projections indicate that this market and, more in general, the level of automation in manufacturing industry will further increment in the near future. For this reason, the robot motion planning process is playing an increasingly important role in the production engineering field and therefore, software applications for robot path planning simulation and optimization are becoming essential in manufacturing. One of the issues in the virtual simulation of robot motions lies in the fact that the virtual environment doesn’t always correspond to the real one and this discrepancy can be critical, especially in designing collision free paths. For this reason, is necessary to align the virtual geometry in order to compute robot paths consistent with the reality. This work aims to solve the problem of aligning virtual environments to match their real counterparts. The goal is to develop and implement a method that uses a collaborative robot to get a set of inspection points by letting the robot touch certain surfaces while monitoring the joint values, and then updates the positions of corresponding virtual objects. The method should minimize some error measure, be scalable to large inspection sets, e.g. point clouds generated by 3D scanners, and be applicable to hierarchies of object.