3. Examples¶
In this section some code examples are listed. The intention of this code examples is providing a guideline and a style guide how things should be done in general, and not how each class is working in detail. This is described in section 360pibot API .
For the Parallax Feedback 360° High-Speed Servo 360_data_sheet [1] also C example code is available sample_360 [3] .
Note
In this examples, not all possible or needed arguments are passed to the classes or methods. The examples mostly use the default values of the modules. For more informations about which arguments can be passed to a class or method and which arguments need to be adjusted, see 360pibot API .
3.1. Calibrating 360° servo¶
The following code calibrates a Parallax Feedback 360° High-Speed Servo
360_data_sheet [1] . The values dcMin
and dcMax
are later needed
in lib_motion.control
. For more informations, see
lib_para_360_servo.calibrate_pwm()
. This example
is included as calibrate.py
.
Note
As seen in the example code, one pigpio.pi() instance can be passed to all used classes or modules. This reduces the number of parallel threads which gets started. If using one pigpio.pi() instance for each used class or module, so multiple instances in one script, more parallel threads will be started, which is not necessary.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | import time import pigpio import lib_para_360_servo #define GPIO for each servo to read from gpio_l_r = 16 gpio_r_r = 20 #define GPIO for each servo to write to gpio_l_w = 17 gpio_r_w = 27 pi = pigpio.pi() #### Calibrate servos, speed = 0.2 and -0.2 #choose gpio_l_w/gpio_l_r (left wheel), or gpio_r_w/gpio_r_r #(right wheel) accordingly servo = lib_para_360_servo.write_pwm(pi = pi, gpio = gpio_r_w) #buffer time for initializing everything time.sleep(1) servo.set_speed(0.2) wheel = lib_para_360_servo.calibrate_pwm(pi = pi, gpio = gpio_r_r) servo.set_speed(0) #http://abyz.me.uk/rpi/pigpio/python.html#stop pi.stop() |
Below see different example terminal outputs which were generated with the demo installation.
#### example output left wheel, speed 0.2
Starting measurements for: 120 seconds.----------------------------------------------------------Ascending sorted distinct duty cycle values: [30.939999999999998, 31.849999999999998, 32.76, 35.489999999999995, 36.4, 37.309999999999995, 40.04, 40.949999999999996, 44.589999999999996, 45.5, 46.41, 49.13999999999999, 50.05, 50.959999999999994, 53.69, 54.599999999999994, 55.51, 58.239999999999995, 59.15, 60.059999999999995, 62.79, 63.699999999999996, 64.61, 67.33999999999999, 68.25, 69.16, 71.89, 72.8, 73.71, 76.44, 77.35, 78.25999999999999, 80.99, 81.89999999999999, 82.80999999999999, 85.53999999999999, 86.44999999999999, 87.36, 90.08999999999999, 91.0, 91.91, 94.64, 95.55, 96.46, 99.19, 100.1, 101.00999999999999, 103.74, 104.64999999999999, 105.55999999999999, 108.28999999999999, 109.19999999999999, 110.11, 112.83999999999999, 113.74999999999999, 114.66, 117.38999999999999, 118.3, 119.21, 121.94, 122.85, 123.75999999999999, 126.49, 127.39999999999999, 128.31, 131.04, 131.95, 132.85999999999999, 135.59, 136.5, 137.41, 140.14, 141.04999999999998, 141.95999999999998, 144.69, 145.6, 146.51, 149.23999999999998, 150.14999999999998, 151.06, 153.79, 154.7, 155.60999999999999, 158.33999999999997, 159.25, 160.16, 162.89, 163.79999999999998, 164.70999999999998, 167.44, 168.35, 169.26, 171.98999999999998, 172.89999999999998, 173.81, 176.54, 177.45, 178.35999999999999, 181.08999999999997, 182.0, 182.91, 185.64, 186.54999999999998, 187.45999999999998, 190.19, 191.1, 192.01, 194.73999999999998, 195.64999999999998, 196.55999999999997, 199.29, 200.2, 201.10999999999999, 203.83999999999997, 204.75, 205.66, 208.39, 209.29999999999998, 210.20999999999998, 212.94, 213.85, 214.76, 217.48999999999998, 218.39999999999998, 219.30999999999997, 222.04,222.95, 223.85999999999999, 226.58999999999997, 227.49999999999997, 228.41, 231.14, 232.04999999999998, 232.95999999999998, 235.69, 236.6, 237.51, 240.23999999999998, 241.14999999999998, 242.05999999999997,244.79, 245.7, 246.60999999999999, 249.33999999999997, 250.24999999999997, 251.16, 253.89, 254.79999999999998, 255.70999999999998, 258.44, 259.34999999999997, 260.26, 262.99, 263.9, 264.81, 267.53999999999996, 268.45, 269.35999999999996, 272.09, 273.0, 273.90999999999997, 276.64, 277.54999999999995, 278.46, 281.19, 282.09999999999997, 283.01, 285.73999999999995, 286.65, 287.56, 290.28999999999996, 291.2, 292.10999999999996, 294.84, 295.75, 296.65999999999997, 299.39, 300.29999999999995, 301.21, 303.94, 304.84999999999997, 305.76, 308.48999999999995, 309.4, 310.31, 313.03999999999996, 313.95, 314.85999999999996, 317.59, 318.5, 319.40999999999997, 322.14, 323.04999999999995, 323.96, 326.69, 327.59999999999997, 328.51, 331.23999999999995, 332.15, 333.06, 335.78999999999996, 336.7, 337.60999999999996, 340.34, 341.25, 342.15999999999997, 344.89, 345.79999999999995, 346.71, 349.44, 350.34999999999997, 351.26, 353.98999999999995, 354.9, 355.81, 358.53999999999996, 359.45, 360.35999999999996, 363.09, 364.0, 364.90999999999997,367.64, 368.54999999999995, 369.46, 372.19, 373.09999999999997, 374.01, 376.73999999999995, 377.65, 378.56, 381.28999999999996, 382.2, 383.10999999999996, 385.84, 386.75, 387.65999999999997, 390.39, 391.29999999999995, 392.21, 394.94, 395.84999999999997, 396.76, 399.48999999999995, 400.4, 401.30999999999995, 404.03999999999996, 404.95, 405.85999999999996, 408.59, 409.5, 410.40999999999997, 413.14, 414.04999999999995, 414.96, 417.69, 418.59999999999997, 419.51, 422.23999999999995, 423.15, 424.05999999999995, 426.78999999999996, 427.7, 428.60999999999996, 431.34, 432.24999999999994, 433.15999999999997, 435.89, 436.79999999999995, 437.71, 440.44, 441.34999999999997, 442.26, 444.98999999999995, 445.9, 446.80999999999995, 449.53999999999996, 450.45, 451.35999999999996, 454.09, 454.99999999999994, 455.90999999999997, 458.64, 459.54999999999995, 460.46, 463.18999999999994, 464.09999999999997, 465.01, 467.73999999999995, 468.65, 469.55999999999995, 472.28999999999996, 473.2, 474.10999999999996, 476.84, 477.74999999999994, 478.65999999999997, 481.39, 482.29999999999995, 483.21, 485.93999999999994, 486.84999999999997, 487.76, 490.48999999999995, 491.4, 492.30999999999995, 495.03999999999996, 495.95, 496.85999999999996, 499.59, 500.49999999999994, 501.40999999999997, 504.14, 505.04999999999995, 505.96, 508.68999999999994, 509.59999999999997, 510.51, 513.24, 514.15, 515.06, 517.79, 518.6999999999999, 519.61, 522.3399999999999, 523.25, 524.16, 526.89, 527.8, 528.7099999999999, 531.4399999999999, 532.3499999999999, 533.26, 535.99, 536.9, 537.81, 540.54, 541.4499999999999, 542.36, 545.0899999999999, 546.0, 546.91, 549.64, 550.55, 551.4599999999999, 554.1899999999999, 555.0999999999999, 556.01, 558.74, 559.65, 560.56, 563.29, 564.1999999999999, 565.11, 567.8399999999999, 568.75, 569.66, 572.39, 573.3, 574.2099999999999, 576.9399999999999, 577.8499999999999, 578.76, 581.49, 582.4, 583.31, 586.04, 586.9499999999999, 587.86, 590.5899999999999, 591.5, 592.41, 595.14, 596.05, 596.9599999999999, 599.6899999999999, 600.5999999999999, 601.51, 604.24, 605.15, 606.06, 608.79, 609.6999999999999, 610.61, 613.3399999999999, 614.25, 615.16, 617.89, 618.8, 619.7099999999999, 622.4399999999999, 623.3499999999999, 624.26, 626.99, 627.9, 628.81, 631.54, 632.4499999999999, 633.3599999999999, 636.0899999999999, 637.0, 637.91, 640.64, 641.55, 642.4599999999999, 645.1899999999999, 646.0999999999999, 647.01, 649.74, 650.65, 651.56, 654.29, 655.1999999999999, 656.1099999999999, 658.8399999999999, 659.75, 660.66, 663.39, 664.3, 665.2099999999999, 667.9399999999999, 668.8499999999999, 669.76, 672.49, 673.4, 674.31, 677.04, 677.9499999999999, 678.8599999999999, 681.5899999999999, 682.5, 683.41, 686.14, 687.05, 687.9599999999999, 690.6899999999999, 691.5999999999999, 692.51, 695.24, 696.15, 697.06, 699.79, 700.6999999999999, 701.6099999999999, 704.3399999999999, 705.25, 706.16, 708.89, 709.8, 710.7099999999999, 713.4399999999999, 714.3499999999999, 715.26, 717.9899999999999, 718.9, 719.81, 722.54, 723.4499999999999, 724.3599999999999, 727.0899999999999, 728.0, 728.91, 731.64, 732.55, 733.4599999999999, 736.1899999999999, 737.0999999999999, 738.01, 740.7399999999999, 741.65, 742.56, 745.29, 746.1999999999999, 747.1099999999999, 749.8399999999999, 750.75, 751.66, 754.39, 755.3, 756.2099999999999,758.9399999999999, 759.8499999999999, 760.76, 763.4899999999999, 764.4, 765.31, 768.04, 768.9499999999999, 769.8599999999999, 772.5899999999999, 773.5, 774.41, 777.14, 778.05, 778.9599999999999, 781.6899999999999, 782.5999999999999, 783.51, 786.2399999999999, 787.15, 788.06, 790.79, 791.6999999999999, 792.6099999999999, 795.3399999999999, 796.25, 797.16, 799.89, 800.8, 801.7099999999999, 804.4399999999999, 805.3499999999999, 806.26, 808.9899999999999, 809.9, 810.81, 813.54, 814.4499999999999, 815.3599999999999, 818.0899999999999, 819.0, 819.91, 822.64, 823.55, 824.4599999999999, 827.1899999999999, 828.0999999999999, 829.01, 831.7399999999999, 832.65, 833.56, 836.29, 837.1999999999999, 838.1099999999999, 840.8399999999999, 841.7499999999999, 842.66, 845.39, 846.3, 847.2099999999999, 849.9399999999999, 850.8499999999999, 851.76, 854.4899999999999, 855.4, 856.31, 859.04, 859.9499999999999, 860.8599999999999, 863.5899999999999, 864.4999999999999, 865.41, 868.14, 869.05, 869.9599999999999, 872.6899999999999, 873.5999999999999, 874.51, 877.2399999999999, 878.15, 879.06, 881.79, 882.6999999999999, 883.6099999999999, 886.3399999999999, 887.2499999999999, 888.16, 890.89, 891.8, 892.7099999999999, 895.4399999999999, 896.3499999999999, 897.26, 899.9899999999999, 900.9, 901.81, 904.54, 905.4499999999999, 906.3599999999999, 909.0899999999999, 909.9999999999999, 910.91, 913.64, 914.55, 915.4599999999999, 918.1899999999999, 919.0999999999999, 920.01, 922.7399999999999, 923.65, 924.56, 927.29, 928.1999999999999, 929.1099999999999, 931.8399999999999, 932.7499999999999, 933.66, 936.39, 937.3, 938.2099999999999, 940.9399999999999, 941.8499999999999, 942.76, 945.4899999999999, 946.4, 947.31, 950.04, 950.9499999999999, 951.8599999999999, 954.5899999999999, 955.4999999999999, 956.41, 959.14, 960.05, 960.9599999999999, 963.6899999999999, 964.5999999999999, 965.51, 968.2399999999999, 969.15, 970.06]
----------------------------------------------------------
Ascending counted, sorted and rounded distinct differences between duty cycle values: Counter({0.91: 412, 2.73: 205, 3.64: 1})
----------------------------------------------------------
Smallest 250 values: [30.939999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998,31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998]
----------------------------------------------------------
Biggest 250 values: [964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 968.2399999999999, 968.2399999999999, 968.2399999999999, 968.2399999999999, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15,969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 969.15, 970.06, 970.06, 970.06, 970.06]
----------------------------------------------------------
duty_cycle_min: 31.85
duty_cycle_max: 969.15
#### example output left wheel, speed -0.2
Starting measurements for: 120 seconds.----------------------------------------------------------Ascending sorted distinct duty cycle values: [26.389999999999997, 27.299999999999997, 30.939999999999998, 31.849999999999998, 36.4, 37.309999999999995, 40.04, 40.949999999999996, 41.86, 44.589999999999996, 45.5, 46.41, 49.13999999999999, 50.05, 50.959999999999994, 53.69, 54.599999999999994, 55.51, 58.239999999999995, 59.15, 60.059999999999995, 62.79, 63.699999999999996, 64.61, 67.33999999999999, 68.25, 69.16, 71.89, 72.8, 73.71, 76.44, 77.35, 78.25999999999999, 80.99, 81.89999999999999, 82.80999999999999, 85.53999999999999, 86.44999999999999, 87.36, 90.08999999999999, 91.0, 91.91, 94.64, 95.55, 96.46, 99.19, 100.1, 101.00999999999999, 103.74, 104.64999999999999, 105.55999999999999, 108.28999999999999, 109.19999999999999, 110.11, 112.83999999999999, 113.74999999999999, 114.66, 117.38999999999999, 118.3, 119.21, 121.94, 122.85, 123.75999999999999, 126.49, 127.39999999999999, 128.31, 131.04, 131.95, 132.85999999999999, 135.59, 136.5, 137.41, 140.14, 141.04999999999998, 141.95999999999998, 144.69, 145.6, 146.51, 149.23999999999998, 150.14999999999998, 151.06, 153.79, 154.7, 155.60999999999999, 158.33999999999997, 159.25, 160.16, 162.89, 163.79999999999998, 164.70999999999998, 167.44, 168.35, 169.26, 171.98999999999998, 172.89999999999998, 173.81, 176.54, 177.45, 178.35999999999999, 181.08999999999997, 182.0, 182.91, 185.64, 186.54999999999998, 187.45999999999998, 190.19, 191.1, 192.01, 194.73999999999998, 195.64999999999998, 196.55999999999997, 199.29, 200.2, 201.10999999999999, 203.83999999999997, 204.75, 205.66, 208.39, 209.29999999999998, 210.20999999999998, 212.94, 213.85, 214.76, 217.48999999999998, 218.39999999999998, 219.30999999999997, 222.04, 222.95, 223.85999999999999, 226.58999999999997, 227.49999999999997, 228.41, 231.14, 232.04999999999998, 235.69, 236.6, 237.51, 240.23999999999998, 241.14999999999998, 242.05999999999997,244.79, 245.7, 246.60999999999999, 249.33999999999997, 250.24999999999997, 251.16, 253.89, 254.79999999999998, 255.70999999999998, 258.44, 259.34999999999997, 260.26, 262.99, 263.9, 264.81, 267.53999999999996, 268.45, 269.35999999999996, 272.09, 273.0, 273.90999999999997, 276.64, 277.54999999999995, 278.46, 281.19, 282.09999999999997, 283.01, 285.73999999999995, 286.65, 287.56, 290.28999999999996, 291.2, 292.10999999999996, 294.84, 295.75, 296.65999999999997, 299.39, 300.29999999999995, 301.21, 303.94, 304.84999999999997, 305.76, 308.48999999999995, 309.4, 310.31, 313.03999999999996, 313.95, 314.85999999999996, 317.59, 318.5, 319.40999999999997, 322.14, 323.04999999999995, 323.96, 326.69, 327.59999999999997, 328.51, 331.23999999999995, 332.15, 333.06, 335.78999999999996, 336.7, 337.60999999999996, 340.34, 341.25, 342.15999999999997, 344.89, 345.79999999999995, 346.71, 349.44, 350.34999999999997, 351.26, 353.98999999999995, 354.9, 355.81, 358.53999999999996, 359.45, 360.35999999999996, 363.09, 364.0, 364.90999999999997,367.64, 368.54999999999995, 369.46, 372.19, 373.09999999999997, 374.01, 376.73999999999995, 377.65, 378.56, 381.28999999999996, 382.2, 383.10999999999996, 385.84, 386.75, 387.65999999999997, 390.39, 391.29999999999995, 392.21, 394.94, 395.84999999999997, 396.76, 399.48999999999995, 400.4, 401.30999999999995, 404.03999999999996, 404.95, 405.85999999999996, 408.59, 409.5, 410.40999999999997, 413.14, 414.04999999999995, 414.96, 417.69, 418.59999999999997, 419.51, 422.23999999999995, 423.15, 424.05999999999995, 426.78999999999996, 427.7, 428.60999999999996, 431.34, 432.24999999999994, 433.15999999999997, 435.89, 436.79999999999995, 437.71, 440.44, 441.34999999999997, 442.26, 444.98999999999995, 445.9, 446.80999999999995, 449.53999999999996, 450.45, 451.35999999999996, 454.09, 454.99999999999994, 455.90999999999997, 458.64, 459.54999999999995, 460.46, 463.18999999999994, 464.09999999999997, 465.01, 467.73999999999995, 468.65, 469.55999999999995, 472.28999999999996, 473.2, 474.10999999999996, 476.84, 477.74999999999994, 478.65999999999997, 481.39, 482.29999999999995, 483.21, 485.93999999999994, 486.84999999999997, 487.76, 490.48999999999995, 491.4, 492.30999999999995, 495.03999999999996, 495.95, 496.85999999999996, 499.59, 500.49999999999994, 501.40999999999997, 504.14, 505.04999999999995, 505.96, 508.68999999999994, 509.59999999999997, 510.51, 513.24, 514.15, 515.06, 517.79, 518.6999999999999, 519.61, 522.3399999999999, 523.25, 524.16, 526.89, 527.8, 528.7099999999999, 531.4399999999999, 532.3499999999999, 533.26, 535.99, 536.9, 537.81, 540.54, 541.4499999999999, 542.36, 545.0899999999999, 546.0, 546.91, 549.64, 550.55, 551.4599999999999, 554.1899999999999, 555.0999999999999, 556.01, 558.74, 559.65, 560.56, 563.29, 564.1999999999999, 565.11, 567.8399999999999, 568.75, 569.66, 572.39, 573.3, 574.2099999999999, 576.9399999999999, 577.8499999999999, 578.76, 581.49, 582.4, 583.31, 586.04, 586.9499999999999, 587.86, 590.5899999999999, 591.5, 592.41, 595.14, 596.05, 596.9599999999999, 599.6899999999999, 600.5999999999999, 601.51, 604.24, 605.15, 606.06, 608.79, 609.6999999999999, 610.61, 613.3399999999999, 614.25, 615.16, 617.89, 618.8, 619.7099999999999, 622.4399999999999, 623.3499999999999, 624.26, 626.99, 627.9, 628.81, 631.54, 632.4499999999999, 633.3599999999999, 636.0899999999999, 637.0, 637.91, 640.64, 641.55, 642.4599999999999, 645.1899999999999, 646.0999999999999, 647.01, 649.74, 650.65, 651.56, 654.29, 655.1999999999999, 656.1099999999999, 658.8399999999999, 659.75, 660.66, 663.39, 664.3, 665.2099999999999, 667.9399999999999, 668.8499999999999, 669.76, 672.49, 673.4, 674.31, 677.04, 677.9499999999999, 678.8599999999999, 681.5899999999999, 682.5, 683.41, 686.14, 687.05, 687.9599999999999, 690.6899999999999, 691.5999999999999, 692.51, 695.24, 696.15, 697.06, 699.79, 700.6999999999999, 701.6099999999999, 704.3399999999999, 705.25, 706.16, 708.89, 709.8, 710.7099999999999, 713.4399999999999, 714.3499999999999, 715.26, 717.9899999999999, 718.9, 719.81, 722.54, 723.4499999999999, 724.3599999999999, 727.0899999999999, 728.0, 728.91, 731.64, 732.55, 733.4599999999999, 736.1899999999999, 737.0999999999999, 738.01, 740.7399999999999, 741.65, 742.56, 745.29, 746.1999999999999, 747.1099999999999, 749.8399999999999, 750.75, 751.66, 754.39, 755.3, 756.2099999999999,758.9399999999999, 759.8499999999999, 760.76, 763.4899999999999, 764.4, 765.31, 768.04, 768.9499999999999, 769.8599999999999, 772.5899999999999, 773.5, 774.41, 777.14, 778.05, 778.9599999999999, 781.6899999999999, 782.5999999999999, 783.51, 786.2399999999999, 787.15, 788.06, 790.79, 791.6999999999999, 792.6099999999999, 795.3399999999999, 796.25, 797.16, 799.89, 800.8, 801.7099999999999, 804.4399999999999, 805.3499999999999, 806.26, 808.9899999999999, 809.9, 810.81, 813.54, 814.4499999999999, 815.3599999999999, 818.0899999999999, 819.0, 819.91, 822.64, 823.55, 824.4599999999999, 827.1899999999999, 828.0999999999999, 829.01, 831.7399999999999, 832.65, 833.56, 836.29, 837.1999999999999, 838.1099999999999, 840.8399999999999, 841.7499999999999, 842.66, 845.39, 846.3, 847.2099999999999, 849.9399999999999, 850.8499999999999, 851.76, 854.4899999999999, 855.4, 856.31, 859.04, 859.9499999999999, 860.8599999999999, 863.5899999999999, 864.4999999999999, 865.41, 868.14, 869.05, 869.9599999999999, 872.6899999999999, 873.5999999999999, 874.51, 877.2399999999999, 878.15, 879.06, 881.79, 882.6999999999999, 883.6099999999999, 886.3399999999999, 887.2499999999999, 888.16, 890.89, 891.8, 892.7099999999999, 895.4399999999999, 896.3499999999999, 897.26, 899.9899999999999, 900.9, 901.81, 904.54, 905.4499999999999, 906.3599999999999, 909.0899999999999, 909.9999999999999, 910.91, 913.64, 914.55, 915.4599999999999, 918.1899999999999, 919.0999999999999, 920.01, 922.7399999999999, 923.65, 924.56, 927.29, 928.1999999999999, 929.1099999999999, 931.8399999999999, 932.7499999999999, 933.66, 936.39, 937.3, 938.2099999999999, 940.9399999999999, 941.8499999999999, 942.76, 945.4899999999999, 946.4, 947.31, 950.04, 950.9499999999999, 951.8599999999999, 954.5899999999999, 955.4999999999999, 956.41, 959.14, 960.05, 960.9599999999999, 963.6899999999999, 964.5999999999999, 965.51]
----------------------------------------------------------
Ascending counted, sorted and rounded distinct differences between duty cycle values: Counter({0.91: 409, 2.73: 203, 3.64: 2, 4.55: 1})
----------------------------------------------------------
Smallest 250 values: [26.389999999999997, 26.389999999999997, 26.389999999999997, 26.389999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997,27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 30.939999999999998, 30.939999999999998, 30.939999999999998, 30.939999999999998]
----------------------------------------------------------
Biggest 250 values: [960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.05, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 960.9599999999999, 963.6899999999999, 963.6899999999999, 963.6899999999999, 963.6899999999999, 963.6899999999999, 963.6899999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999,964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 964.5999999999999, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51, 965.51]
----------------------------------------------------------
duty_cycle_min: 27.3
duty_cycle_max: 964.6
#### example output right wheel, speed 0.2
Starting measurements for: 120 seconds.----------------------------------------------------------Ascending sorted distinct duty cycle values: [30.939999999999998, 31.849999999999998, 35.489999999999995, 36.4, 40.04, 40.949999999999996, 41.86, 44.589999999999996, 45.5, 46.41, 49.13999999999999, 50.05, 50.959999999999994, 53.69, 54.599999999999994, 55.51, 58.239999999999995, 59.15, 60.059999999999995, 62.79, 63.699999999999996, 64.61, 67.33999999999999, 68.25, 69.16, 71.89, 72.8, 73.71, 76.44, 77.35, 78.25999999999999, 80.99, 81.89999999999999, 82.80999999999999, 85.53999999999999, 86.44999999999999, 87.36, 90.08999999999999, 91.0, 91.91, 94.64, 95.55, 96.46, 99.19, 100.1, 101.00999999999999, 103.74, 104.64999999999999, 105.55999999999999, 108.28999999999999, 109.19999999999999, 110.11, 112.83999999999999, 113.74999999999999, 114.66, 117.38999999999999, 118.3, 119.21, 121.94, 122.85, 123.75999999999999, 126.49, 127.39999999999999, 128.31, 131.04, 131.95, 132.85999999999999, 135.59, 136.5, 137.41, 140.14, 141.04999999999998, 141.95999999999998, 144.69, 145.6, 146.51, 149.23999999999998, 150.14999999999998, 151.06, 153.79, 154.7, 155.60999999999999, 158.33999999999997, 159.25, 160.16, 162.89, 163.79999999999998, 164.70999999999998, 167.44, 168.35, 169.26, 171.98999999999998, 172.89999999999998, 173.81, 176.54, 177.45, 178.35999999999999, 181.08999999999997, 182.0, 182.91, 185.64, 186.54999999999998, 187.45999999999998, 190.19, 191.1, 192.01, 194.73999999999998, 195.64999999999998, 196.55999999999997, 199.29, 200.2, 201.10999999999999, 203.83999999999997, 204.75, 205.66, 208.39, 209.29999999999998, 210.20999999999998, 212.94, 213.85, 214.76, 217.48999999999998, 218.39999999999998, 219.30999999999997, 222.04, 222.95, 223.85999999999999, 226.58999999999997, 227.49999999999997, 228.41, 231.14, 232.04999999999998, 232.95999999999998, 235.69, 236.6, 237.51, 240.23999999999998, 241.14999999999998, 242.05999999999997, 244.79, 245.7, 246.60999999999999, 249.33999999999997, 250.24999999999997, 251.16, 253.89, 254.79999999999998, 255.70999999999998, 258.44, 259.34999999999997, 260.26, 262.99, 263.9, 264.81, 267.53999999999996, 268.45, 269.35999999999996, 272.09, 273.0, 273.90999999999997, 276.64, 277.54999999999995, 278.46, 281.19, 282.09999999999997, 283.01, 285.73999999999995, 286.65, 287.56, 290.28999999999996, 291.2, 292.10999999999996, 294.84, 295.75, 296.65999999999997, 299.39, 300.29999999999995, 301.21, 303.94, 304.84999999999997, 305.76, 308.48999999999995, 309.4, 310.31, 313.03999999999996, 313.95, 314.85999999999996, 317.59, 318.5, 319.40999999999997, 322.14, 323.04999999999995, 323.96, 326.69, 327.59999999999997, 328.51, 331.23999999999995, 332.15, 333.06, 335.78999999999996, 336.7, 337.60999999999996, 340.34, 341.25, 342.15999999999997, 344.89, 345.79999999999995, 346.71, 349.44, 350.34999999999997, 351.26, 353.98999999999995, 354.9, 355.81, 358.53999999999996, 359.45, 360.35999999999996, 363.09, 364.0, 364.90999999999997, 367.64, 368.54999999999995, 369.46, 372.19, 373.09999999999997, 374.01, 376.73999999999995, 377.65, 378.56, 381.28999999999996, 382.2, 383.10999999999996, 385.84, 386.75, 387.65999999999997, 390.39, 391.29999999999995, 392.21,394.94, 395.84999999999997, 396.76, 399.48999999999995, 400.4, 401.30999999999995, 404.03999999999996, 404.95, 405.85999999999996, 408.59, 409.5, 410.40999999999997, 413.14, 414.04999999999995, 414.96, 417.69, 418.59999999999997, 419.51, 422.23999999999995, 423.15, 424.05999999999995, 426.78999999999996, 427.7, 428.60999999999996, 431.34, 432.24999999999994, 433.15999999999997, 435.89, 436.79999999999995, 437.71, 440.44, 441.34999999999997, 442.26, 444.98999999999995, 445.9, 446.80999999999995, 449.53999999999996, 450.45, 451.35999999999996, 454.09, 454.99999999999994, 455.90999999999997, 458.64, 459.54999999999995, 460.46, 463.18999999999994, 464.09999999999997, 465.01, 467.73999999999995, 468.65, 469.55999999999995, 472.28999999999996, 473.2, 474.10999999999996, 476.84, 477.74999999999994, 478.65999999999997, 481.39, 482.29999999999995, 485.93999999999994, 486.84999999999997, 487.76, 490.48999999999995, 491.4, 492.30999999999995, 495.03999999999996, 495.95, 496.85999999999996, 499.59, 500.49999999999994, 501.40999999999997, 504.14, 505.04999999999995, 505.96, 508.68999999999994, 509.59999999999997, 510.51, 513.24, 514.15, 515.06, 517.79, 518.6999999999999, 519.61, 522.3399999999999, 523.25, 524.16, 526.89, 527.8, 528.7099999999999, 531.4399999999999, 532.3499999999999, 533.26, 535.99, 536.9, 537.81, 540.54, 541.4499999999999, 542.36, 545.0899999999999, 546.0, 546.91, 549.64, 550.55, 551.4599999999999, 554.1899999999999, 555.0999999999999, 556.01, 558.74, 559.65, 560.56, 563.29, 564.1999999999999, 565.11, 567.8399999999999, 568.75, 569.66, 572.39, 573.3, 574.2099999999999, 576.9399999999999, 577.8499999999999, 578.76, 581.49, 582.4, 583.31, 586.04, 586.9499999999999, 587.86, 590.5899999999999, 591.5, 592.41, 595.14, 596.05, 596.9599999999999, 599.6899999999999, 600.5999999999999, 601.51, 604.24, 605.15, 606.06, 608.79, 609.6999999999999, 610.61, 613.3399999999999, 614.25, 615.16, 617.89, 618.8, 619.7099999999999, 622.4399999999999, 623.3499999999999, 624.26, 626.99, 627.9, 628.81, 631.54, 632.4499999999999, 633.3599999999999, 636.0899999999999, 637.0, 637.91, 640.64, 641.55, 642.4599999999999, 645.1899999999999, 646.0999999999999, 649.74, 650.65, 651.56, 654.29, 655.1999999999999, 656.1099999999999, 658.8399999999999, 659.75, 660.66, 663.39, 664.3, 665.2099999999999, 667.9399999999999, 668.8499999999999, 669.76, 672.49, 673.4, 674.31, 677.04, 677.9499999999999, 678.8599999999999, 681.5899999999999, 682.5, 683.41, 686.14, 687.05, 687.9599999999999, 690.6899999999999, 691.5999999999999, 692.51, 695.24, 696.15, 697.06, 699.79, 700.6999999999999, 701.6099999999999, 704.3399999999999, 705.25, 706.16, 708.89, 709.8, 710.7099999999999, 713.4399999999999, 714.3499999999999, 715.26, 717.9899999999999, 718.9, 719.81, 722.54, 723.4499999999999, 724.3599999999999, 728.0, 728.91, 731.64, 732.55, 733.4599999999999, 736.1899999999999, 737.0999999999999, 738.01, 740.7399999999999, 741.65, 742.56, 745.29, 746.1999999999999, 747.1099999999999, 749.8399999999999, 750.75, 751.66, 754.39, 755.3, 756.2099999999999, 758.9399999999999, 759.8499999999999, 760.76, 763.4899999999999, 764.4, 765.31, 768.04, 768.9499999999999, 769.8599999999999, 773.5, 774.41, 777.14, 778.05, 778.9599999999999, 781.6899999999999, 782.5999999999999, 783.51, 786.2399999999999, 787.15, 788.06, 790.79, 791.6999999999999, 792.6099999999999, 795.3399999999999, 796.25, 797.16, 799.89, 800.8, 801.7099999999999, 804.4399999999999, 805.3499999999999, 806.26, 808.9899999999999, 809.9, 810.81, 813.54, 814.4499999999999, 815.3599999999999, 818.0899999999999, 819.0, 819.91, 822.64, 823.55, 824.4599999999999, 827.1899999999999, 828.0999999999999, 829.01, 831.7399999999999, 832.65, 833.56, 836.29, 837.1999999999999, 838.1099999999999, 840.8399999999999, 841.7499999999999, 842.66, 845.39, 846.3, 847.2099999999999, 849.9399999999999, 850.8499999999999, 851.76, 854.4899999999999, 855.4, 856.31, 859.04, 859.9499999999999, 860.8599999999999, 863.5899999999999, 864.4999999999999, 865.41, 868.14, 869.05, 869.9599999999999, 872.6899999999999, 873.5999999999999, 874.51, 877.2399999999999, 878.15, 879.06, 881.79, 882.6999999999999, 883.6099999999999, 886.3399999999999, 887.2499999999999, 888.16, 890.89, 891.8, 892.7099999999999, 895.4399999999999, 896.3499999999999, 897.26, 899.9899999999999, 900.9, 901.81, 904.54, 905.4499999999999, 906.3599999999999, 909.0899999999999, 909.9999999999999, 910.91, 913.64, 914.55, 915.4599999999999, 918.1899999999999, 919.0999999999999, 920.01, 922.7399999999999, 923.65, 924.56, 927.29, 928.1999999999999, 929.1099999999999, 931.8399999999999, 932.7499999999999, 933.66, 936.39, 937.3, 938.2099999999999, 940.9399999999999, 941.8499999999999, 942.76, 945.4899999999999, 946.4, 947.31, 950.04, 950.9499999999999, 951.8599999999999, 954.5899999999999, 955.4999999999999, 956.41, 959.14, 960.05, 960.9599999999999, 963.6899999999999, 964.5999999999999, 965.51, 968.2399999999999, 969.15, 970.06, 972.79, 973.6999999999999, 974.6099999999999, 977.3399999999999, 978.2499999999999, 979.16, 982.8]
----------------------------------------------------------
Ascending counted, sorted and rounded distinct differences between duty cycle values: Counter({0.91: 412, 2.73: 202, 3.64: 6})
----------------------------------------------------------
Smallest 250 values: [30.939999999999998, 30.939999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998,31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 35.489999999999995, 35.489999999999995, 35.489999999999995, 35.489999999999995, 35.489999999999995, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4, 36.4]
----------------------------------------------------------
Biggest 250 values: [978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999,978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 979.16, 979.16, 979.16, 979.16, 979.16, 979.16, 979.16, 982.8]
----------------------------------------------------------
duty_cycle_min: 31.85
duty_cycle_max: 978.25
#### example output right wheel, speed -0.2
Starting measurements for: 120 seconds.----------------------------------------------------------Ascending sorted distinct duty cycle values: [26.389999999999997, 27.299999999999997, 31.849999999999998, 32.76, 35.489999999999995, 36.4, 37.309999999999995, 40.04, 40.949999999999996, 41.86, 44.589999999999996, 45.5, 46.41, 49.13999999999999, 50.05, 50.959999999999994, 53.69, 54.599999999999994, 55.51, 58.239999999999995, 59.15, 60.059999999999995, 62.79, 63.699999999999996, 64.61, 67.33999999999999, 68.25, 69.16, 71.89, 72.8, 73.71, 76.44, 77.35, 78.25999999999999, 80.99, 81.89999999999999, 82.80999999999999, 85.53999999999999, 86.44999999999999, 87.36, 90.08999999999999, 91.0, 91.91, 94.64, 95.55, 96.46, 99.19, 100.1, 101.00999999999999, 103.74, 104.64999999999999, 105.55999999999999, 108.28999999999999, 109.19999999999999, 110.11, 112.83999999999999, 113.74999999999999, 114.66, 117.38999999999999, 118.3, 119.21, 121.94, 122.85, 123.75999999999999, 126.49, 127.39999999999999, 128.31, 131.04, 131.95, 132.85999999999999, 135.59, 136.5, 137.41, 140.14, 141.04999999999998, 141.95999999999998, 144.69, 145.6, 146.51, 149.23999999999998, 150.14999999999998, 151.06, 153.79, 154.7, 155.60999999999999, 158.33999999999997, 159.25, 160.16, 162.89, 163.79999999999998, 164.70999999999998, 167.44, 168.35, 169.26, 171.98999999999998,172.89999999999998, 173.81, 176.54, 177.45, 178.35999999999999, 181.08999999999997, 182.0, 182.91, 185.64, 186.54999999999998, 187.45999999999998, 190.19, 191.1, 192.01, 194.73999999999998, 195.64999999999998, 196.55999999999997, 199.29, 200.2, 201.10999999999999, 203.83999999999997, 204.75, 205.66, 208.39, 209.29999999999998, 210.20999999999998, 212.94, 213.85, 214.76, 217.48999999999998, 218.39999999999998, 219.30999999999997, 222.04, 222.95, 223.85999999999999, 226.58999999999997, 227.49999999999997, 228.41, 231.14, 232.04999999999998, 232.95999999999998, 235.69, 236.6, 240.23999999999998, 241.14999999999998, 242.05999999999997, 244.79, 245.7, 246.60999999999999, 249.33999999999997, 250.24999999999997, 251.16, 253.89, 254.79999999999998, 255.70999999999998, 258.44, 259.34999999999997, 260.26, 262.99, 263.9, 264.81, 267.53999999999996, 268.45, 269.35999999999996, 272.09, 273.0, 273.90999999999997, 276.64, 277.54999999999995, 278.46, 281.19, 282.09999999999997, 283.01, 285.73999999999995, 286.65, 287.56, 290.28999999999996, 291.2, 292.10999999999996, 294.84, 295.75, 296.65999999999997, 299.39, 300.29999999999995, 301.21, 303.94, 304.84999999999997, 305.76, 308.48999999999995, 309.4, 310.31, 313.03999999999996, 313.95, 314.85999999999996, 317.59, 318.5, 319.40999999999997, 322.14, 323.04999999999995, 323.96, 326.69, 327.59999999999997, 328.51, 331.23999999999995, 332.15, 333.06, 335.78999999999996, 336.7, 337.60999999999996,340.34, 341.25, 342.15999999999997, 344.89, 345.79999999999995, 346.71, 349.44, 350.34999999999997, 351.26, 353.98999999999995, 354.9, 355.81, 358.53999999999996, 359.45, 360.35999999999996, 363.09, 364.0, 364.90999999999997, 367.64, 368.54999999999995, 369.46, 372.19, 373.09999999999997, 374.01, 376.73999999999995, 377.65, 378.56, 381.28999999999996, 382.2, 383.10999999999996, 385.84, 386.75, 387.65999999999997, 390.39, 391.29999999999995, 392.21, 394.94, 395.84999999999997, 396.76, 399.48999999999995, 400.4, 401.30999999999995, 404.03999999999996, 404.95, 405.85999999999996, 408.59, 409.5, 410.40999999999997, 414.04999999999995, 414.96, 417.69, 418.59999999999997, 419.51, 422.23999999999995, 423.15, 424.05999999999995, 426.78999999999996, 427.7, 428.60999999999996, 431.34, 432.24999999999994, 433.15999999999997, 435.89, 436.79999999999995, 437.71, 440.44, 441.34999999999997, 442.26, 444.98999999999995, 445.9, 446.80999999999995, 449.53999999999996, 450.45, 451.35999999999996, 454.09, 454.99999999999994, 455.90999999999997, 458.64, 459.54999999999995, 460.46, 463.18999999999994, 464.09999999999997, 465.01, 467.73999999999995, 468.65, 469.55999999999995, 472.28999999999996, 473.2, 474.10999999999996, 476.84, 477.74999999999994, 478.65999999999997, 481.39, 482.29999999999995, 483.21, 485.93999999999994, 486.84999999999997, 487.76, 490.48999999999995, 491.4, 492.30999999999995, 495.03999999999996, 495.95, 496.85999999999996, 499.59, 500.49999999999994, 501.40999999999997, 504.14, 505.04999999999995, 505.96, 508.68999999999994, 509.59999999999997, 510.51, 513.24, 514.15, 515.06, 517.79, 518.6999999999999, 519.61, 522.3399999999999, 523.25, 524.16, 526.89, 527.8, 528.7099999999999, 531.4399999999999, 532.3499999999999, 533.26, 535.99, 536.9, 537.81, 540.54, 541.4499999999999, 542.36, 545.0899999999999, 546.0, 546.91, 549.64, 550.55, 551.4599999999999, 554.1899999999999, 555.0999999999999, 556.01, 558.74, 559.65, 560.56, 563.29, 564.1999999999999, 565.11, 567.8399999999999, 568.75, 569.66, 572.39, 573.3, 574.2099999999999, 576.9399999999999, 577.8499999999999, 578.76, 581.49, 582.4, 583.31, 586.04, 586.9499999999999, 587.86, 590.5899999999999, 591.5, 592.41, 595.14, 596.05, 596.9599999999999, 599.6899999999999, 600.5999999999999, 601.51, 604.24, 605.15, 606.06, 608.79, 609.6999999999999, 610.61, 613.3399999999999, 614.25, 615.16, 617.89, 618.8, 619.7099999999999, 622.4399999999999, 623.3499999999999, 624.26, 626.99, 627.9, 628.81, 631.54, 632.4499999999999, 633.3599999999999, 636.0899999999999, 637.0, 637.91, 640.64, 641.55, 642.4599999999999, 645.1899999999999, 646.0999999999999, 647.01, 649.74, 650.65, 651.56, 654.29, 655.1999999999999, 656.1099999999999, 658.8399999999999, 659.75, 660.66, 663.39, 664.3, 665.2099999999999, 667.9399999999999, 668.8499999999999, 669.76, 672.49, 673.4, 674.31, 677.04, 677.9499999999999, 678.8599999999999, 681.5899999999999, 682.5, 683.41, 686.14, 687.05, 687.9599999999999, 690.6899999999999, 691.5999999999999, 692.51, 695.24, 696.15, 697.06, 699.79, 700.6999999999999, 701.6099999999999, 704.3399999999999, 705.25, 706.16,708.89, 709.8, 710.7099999999999, 713.4399999999999, 714.3499999999999, 715.26, 717.9899999999999, 718.9, 719.81, 722.54, 723.4499999999999, 724.3599999999999, 727.0899999999999, 728.0, 728.91, 731.64, 732.55, 733.4599999999999, 736.1899999999999, 737.0999999999999, 738.01, 740.7399999999999, 741.65, 742.56, 745.29, 746.1999999999999, 747.1099999999999, 749.8399999999999, 750.75, 751.66, 754.39, 755.3, 756.2099999999999, 758.9399999999999, 759.8499999999999, 760.76, 763.4899999999999, 764.4, 765.31, 768.04, 768.9499999999999, 769.8599999999999, 772.5899999999999, 773.5, 774.41, 777.14, 778.05, 778.9599999999999, 781.6899999999999, 782.5999999999999, 783.51, 786.2399999999999, 787.15, 788.06, 790.79, 791.6999999999999, 792.6099999999999, 795.3399999999999, 796.25, 797.16, 799.89, 800.8, 801.7099999999999, 804.4399999999999, 805.3499999999999, 806.26, 808.9899999999999, 809.9, 810.81, 813.54, 814.4499999999999, 815.3599999999999, 818.0899999999999, 819.0, 819.91, 822.64, 823.55, 824.4599999999999, 827.1899999999999, 828.0999999999999, 829.01, 831.7399999999999, 832.65, 833.56, 836.29, 837.1999999999999, 838.1099999999999, 840.8399999999999, 841.7499999999999, 842.66, 845.39, 846.3, 847.2099999999999, 849.9399999999999, 850.8499999999999, 851.76, 854.4899999999999, 855.4, 856.31, 859.04, 859.9499999999999, 860.8599999999999, 863.5899999999999, 864.4999999999999, 865.41, 868.14, 869.05, 869.9599999999999, 872.6899999999999, 873.5999999999999, 874.51, 877.2399999999999, 878.15, 879.06, 881.79, 882.6999999999999, 883.6099999999999, 886.3399999999999, 887.2499999999999, 888.16, 890.89, 891.8, 892.7099999999999, 895.4399999999999, 896.3499999999999, 897.26, 899.9899999999999, 900.9, 901.81, 904.54, 905.4499999999999, 906.3599999999999, 909.0899999999999, 909.9999999999999, 910.91, 913.64, 914.55, 915.4599999999999, 918.1899999999999, 919.0999999999999, 920.01, 922.7399999999999, 923.65, 924.56, 927.29, 928.1999999999999, 929.1099999999999, 931.8399999999999, 932.7499999999999, 933.66, 936.39, 937.3, 938.2099999999999, 940.9399999999999, 941.8499999999999, 942.76, 945.4899999999999, 946.4, 947.31, 950.04, 950.9499999999999, 951.8599999999999, 954.5899999999999, 955.4999999999999, 956.41, 959.14, 960.05, 960.9599999999999, 963.6899999999999, 964.5999999999999, 965.51, 968.2399999999999, 969.15, 970.06, 972.79, 973.6999999999999, 974.6099999999999, 978.2499999999999]
----------------------------------------------------------
Ascending counted, sorted and rounded distinct differences between duty cycle values: Counter({0.91: 414, 2.73: 205, 3.64: 2, 4.55: 1})
----------------------------------------------------------
Smallest 250 values: [26.389999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997,27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 27.299999999999997, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998, 31.849999999999998]
----------------------------------------------------------
Biggest 250 values: [973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999,973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 973.6999999999999, 974.6099999999999, 974.6099999999999, 974.6099999999999, 974.6099999999999, 974.6099999999999, 974.6099999999999, 974.6099999999999, 974.6099999999999, 974.6099999999999, 974.6099999999999, 974.6099999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999, 978.2499999999999]
----------------------------------------------------------
duty_cycle_min: 27.3
duty_cycle_max: 978.25
In this case, for the left wheel for duty_cycle_min
/ dcMin
27.3 should be chosen,
so the smallest out of 27.3 and 31.85. For duty_cycle_max
/ dcMax
969.15 should
be chosen, so the biggest out of 964.6 and 969.15. For the right wheel, for duty_cycle_min
/ dcMin
27.3 and for duty_cycle_max
/ dcMax
978.25 accordingly.
3.2. Emergency stop¶
The following code sets the speed of the two used Parallax Feedback
360° High-Speed Servos 360_data_sheet [1] back to zero to stop both wheels.
This might be needed e.g. if a script raises an exception and stops executing
before setting the speed of the servos back to zero. In this case, the
servos will continue rotating with the last set speed. This example is included
as emergency_stop.py
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import time import pigpio import lib_para_360_servo #define GPIO for each servo to write to gpio_l = 17 gpio_r = 27 pi = pigpio.pi() servo_l = lib_para_360_servo.write_pwm(pi = pi, gpio = gpio_l) servo_r = lib_para_360_servo.write_pwm(pi = pi, gpio = gpio_r) #buffer time for initializing everything time.sleep(1) servo_l.set_speed(0) servo_r.set_speed(0) #http://abyz.me.uk/rpi/pigpio/python.html#stop pi.stop() |
3.3. Moving the robot¶
The following code lets the robot turning four times 45 degree to the left,
then moving 20 cm (200 mm) forwards, then 20 cm backwards and
in the end turning two times 90 degree to the right. This example is included
as move_robot.py
.
Note
The PID controller values have a strong influence on the the robots movement. Therefore, try out different values than the default once if the robot is not moving as exspected and also to get a feeling of their influence.
Note
Sometimes the end of a movement takes some time. One reason could be
noise in the position measurement of the wheels and therefore not
correctly recognizing the reached set-point. So do not be confused
if this happens and the robot takes some time and seems not to proper
function anmyore. Just be patient. This might be solved with increasing
the deadband of the outer PID controllers, which on the other hand would
also decrease the accuracy of the movement. At the moment a rather small
deadband is chosen. A simple but effective workaround is to give the
robot a little poke and let it reach the set-point again. See
lib_motion.control.move()
for more informations.
Note
Sometimes the speed changes abruptly. This might be caused by noise in
the position measurement of the wheels from which the rotation speed
measurement (ticks/s) is calculated indirectly. Increasing the sliding
window size might stabilize it. But this would also increase the delay between
calculated and real speed of the wheels and therefore also increase the
response time of the speed controllers. At the moment a rather small
window size is chosen. See lib_motion.control.move()
for more
informations.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | import pigpio import lib_motion pi = pigpio.pi() robot = lib_motion.control(pi = pi) a = 0 while a < 4: robot.turn(45) a+=1 robot.straight(200) robot.straight(-200) a = 0 while a < 2: robot.turn(-90) a+=1 #http://abyz.me.uk/rpi/pigpio/python.html#callback robot.cancel() #http://abyz.me.uk/rpi/pigpio/python.html#stop pi.stop() |
3.4. Moving standard servo¶
The following code stears the standard servo stand_data_sheet [2] . First
to the middle position, then to the max right, then to max left and finally
to 45 degree (regarding reached max left and max right). For more informations,
see lib_scanner.para_standard_servo
. This example is included as
move_stand_servo.py
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import time import pigpio import lib_scanner pi = pigpio.pi() servo = lib_scanner.para_standard_servo(pi = pi, gpio = 22) servo.middle_position() time.sleep(2) servo.max_right() time.sleep(2) servo.max_left() time.sleep(2) servo.set_position(degree = 45) #http://abyz.me.uk/rpi/pigpio/python.html#stop pi.stop() |
3.5. Scanning the surrounding¶
The following code scans the surrounding of the robot in all five default
angles and prints out the result. This example is included as scanning.py
.
Warning
Make sure that the min_pw
and max_pw
values are carefully tested
before using this example, see Warning in
lib_scanner.para_standard_servo
. The passed values min_pw
and max_pw
for the created ranger object are just valid for the
demo implementation!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | import pigpio import lib_scanner pi = pigpio.pi() """ .. warning:: Make sure that the ``min_pw`` and ``max_pw`` values are carefully tested **before** using this example, see **Warning** in :class:`lib_scanner.para_standard_servo` . The passed values ``min_pw`` and ``max_pw`` for the created ranger object are just valid for the demo implementation! """ ranger = lib_scanner.scanner(pi = pi, min_pw=600, max_pw=2350) distances = ranger.read_all_angles() print(distances) #http://abyz.me.uk/rpi/pigpio/python.html#callback ranger.cancel() #http://abyz.me.uk/rpi/pigpio/python.html#stop pi.stop() |
3.6. Simple collision avoiding algorithm¶
The following code implements a simple collision avoiding algorithm.
The robot will turn 45 degree to the left if there is any obstacle closer
than 40 cm at the five default measuring angles. If not, the robot will
drive 20 cm forward. This example is included as no_collision.py
.
Warning
Make sure that the min_pw
and max_pw
values are carefully tested
before using this example, see Warning in
lib_scanner.para_standard_servo
. The passed values min_pw
and max_pw
for the created ranger object are just valid for the
demo implementation!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | import pigpio import lib_motion import lib_scanner #initialize one pigpio.pi() instance to be used by all lib_* pi = pigpio.pi() robot = lib_motion.control(pi = pi) """ .. warning:: Make sure that the ``min_pw`` and ``max_pw`` values are carefully tested **before** using this example, see **Warning** in :class:`lib_scanner.para_standard_servo` . The passed values ``min_pw`` and ``max_pw`` for the created ranger object are just valid for the demo implementation! """ ranger = lib_scanner.scanner(pi = pi, min_pw=600, max_pw=2350) while True: distances = ranger.read_all_angles() list_dist = list(distances.values()) if any(t<0.4 for t in list_dist): robot.turn(45) else: robot.straight(200) #http://abyz.me.uk/rpi/pigpio/python.html#callback robot.cancel() ranger.cancel() #http://abyz.me.uk/rpi/pigpio/python.html#stop pi.stop() |
3.7. References¶
[1] | (1, 2, 3) https://www.parallax.com/sites/default/files/downloads/900-00360-Feedback-360-HS-Servo-v1.1.pdf |
[2] | https://www.parallax.com/sites/default/files/downloads/900-00005-Standard-Servo-Product-Documentation-v2.2.pdf |
[3] | https://www.parallax.com/downloads/feedback-360%C2%B0-high-speed-servo-propeller-c-example-code |