private robotPath getPath(robot rob, String path, String track, String index, int starting_index, String TrackName, int trackType) { robotPath rpath = new robotPath(); robotOdometry odometry = new robotOdometry(); odometry.readPathFileSentience(path + track + "\\" + TrackName + ".path", index, rob); switch (trackType) { case 1: { // mapping X track standardXTrack(2000, 500, odometry, index); break; } case 2: { //localisation X track standardXTrack(2000, -500, odometry, index); break; } case 3: { //there and back track odometry.Clear(); thereAndBack(100, 46, odometry, 110, 0, 0); break; } case 4: { //square odometry.Clear(); squareAndBack(100, 10, 6, odometry, 110); break; } case 5: { //special odometry.Clear(); specialTrack(100, 16, 21, 3, odometry, 110); break; } } if (odometry.no_of_measurements == 0) { errorMessage = path + track + "\\" + TrackName + ".path not found or contains no data. "; errorMessage += "Check that the path file is included as 'Content' within the project folder"; } for (int distance_index = 0; distance_index < odometry.no_of_measurements; distance_index++) { pos3D pos = odometry.getPosition(distance_index); rob.x = pos.x; rob.y = pos.y; rob.z = pos.z; rob.pan = pos.pan; rob.tilt = pos.tilt; rob.roll = pos.roll; loadGlimpseSentience(rob, path + track + "\\", TrackName, index, distance_index + starting_index, odometry.no_of_measurements, index); rob.updatePath(rpath); } return(rpath); }