Beispiel #1
0
        position_mmaping[i] = position
        old_x = 0.0
        old_y = 0.0
        measursment_list.append([old_x, old_y, 0.0, 0.0])

        roud = Robot.SpecityTheDirection(position_mmaping[i])
        i = i + 1
        print("angle: " + str(roud))
        Robot.MoveToAngle(roud, x_csv_offset, y_csv_offset)

        work = True
        while work:
            start_dystans = Robot.sen.distance()
            Robot.start_Time = time.time()
            Robot.Forward()
            while True:
                if Robot.sen.distance() < 50:
                    Robot.StopForward()
                    Robot.end_Time = time.time()
                    print("start new measurement")
                    time.sleep(0.5)
                    # determining the distance traveled
                    print("new positons: ")
                    new_posittion = Compass.compass_angle(
                        x_csv_offset, y_csv_offset)
                    #print("angle: " + str(roud) )
                    #print("angle after stopping: " + str(new_posittion))
                    #print("determining the distance:")
                    real_roud = Robot.DistanceToCheck()
                    # determining the new postion