This technology has two parts, the robot and the algorithm the robot uses to map the surface. The robot uses a simple impedance controller to sense when it has contacted the surface. Then the position of the probe tip can be determined by sensing the robot's joint angles. The algorithm for the robot's exploration has two parts, surface reconstruction and exploration strategy. Based on the points already collected, the algorithm identifies the best approximate shape of the surface. For exploration, the robot starts in a random direction until the probe touches the surface and then probes the surface until a primitive is identified with desired accuracy. Then the robot chooses another random direction and moves until it touches a new point. If the second point is already part of a primitive then the robot picks another random direction and if not it will probe the surface and create a new primitive.