Skip to content

Commit

Permalink
1D Kinematics (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaCoolOne committed Feb 15, 2020
1 parent ee389dc commit 2dc260b
Show file tree
Hide file tree
Showing 4 changed files with 484 additions and 0 deletions.
149 changes: 149 additions & 0 deletions src/util/acceleration.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
0.0,0.0,0.0
0.016666412353515625,26.55099868774414,0.330078125
0.033333778381347656,52.64099884033203,1.10009765625
0.05000019073486328,78.29100036621094,2.30029296875
0.0666666030883789,103.5009994506836,3.919921875
0.08333301544189453,128.281005859375,5.9599609375
0.10000038146972656,152.64100646972656,8.39990234375
0.11666679382324219,176.5810089111328,11.240234375
0.1333332061767578,200.1110076904297,14.47998046875
0.14999961853027344,223.2310028076172,18.10009765625
0.16666698455810547,245.97100830078125,22.10986328125
0.1833333969116211,268.3210144042969,26.490234375
0.19999980926513672,290.291015625,31.240234375
0.21666717529296875,311.8810119628906,36.35009765625
0.23333358764648438,333.1109924316406,41.8203125
0.25,353.96099853515625,47.6298828125
0.2666664123535156,374.47100830078125,53.7900390625
0.28333377838134766,394.6210021972656,60.2900390625
0.3000001907348633,414.4309997558594,67.10986328125
0.3166666030883789,433.9010009765625,74.27001953125
0.33333301544189453,453.0409851074219,81.75
0.35000038146972656,471.8609924316406,89.5302734375
0.3666667938232422,490.3609924316406,97.6298828125
0.3833332061767578,508.5409851074219,106.0302734375
0.39999961853027344,526.4009399414062,114.72998046875
0.41666698455810547,543.9609375,123.72021484375
0.4333333969116211,561.220947265625,133.01025390625
0.4499998092651367,578.1909790039062,142.580078125
0.46666717529296875,594.8609619140625,152.43017578125
0.4833335876464844,611.2509765625,162.55029296875
0.5,627.3609619140625,172.93994140625
0.5166664123535156,643.1909790039062,183.59033203125
0.5333337783813477,658.760986328125,194.51025390625
0.5500001907348633,674.0609741210938,205.68017578125
0.5666666030883789,689.1009521484375,217.10009765625
0.5833330154418945,703.8809814453125,228.77001953125
0.6000003814697266,718.4109497070312,240.68994140625
0.6166667938232422,732.6909790039062,252.85009765625
0.6333332061767578,746.73095703125,265.22998046875
0.6499996185302734,760.5309448242188,277.85009765625
0.6666669845581055,774.0909423828125,290.68994140625
0.6833333969116211,787.4309692382812,303.76025390625
0.6999998092651367,800.5309448242188,317.05029296875
0.7166671752929688,813.4109497070312,330.56005859375
0.7333335876464844,826.0709838867188,344.27001953125
0.75,838.5209350585938,358.2001953125
0.7666664123535156,850.7509765625,372.330078125
0.7833337783813477,862.7809448242188,386.66015625
0.8000001907348633,874.6009521484375,401.18994140625
0.8166666030883789,886.2109375,415.919921875
0.8333330154418945,897.6309814453125,430.830078125
0.8500003814697266,908.8609619140625,445.93017578125
0.8666667938232422,919.8909301757812,461.22021484375
0.8833332061767578,930.740966796875,476.68994140625
0.8999996185302734,941.4009399414062,492.34033203125
0.9166669845581055,951.8809814453125,508.16015625
0.9333333969116211,962.1809692382812,524.16015625
0.9499998092651367,972.3009643554688,540.320068359375
0.9666671752929688,982.2509765625,556.650146484375
0.9833335876464844,992.0309448242188,573.150146484375
1.0,1001.6509399414062,589.81005859375
1.0166664123535156,1011.0909423828125,606.630126953125
1.0333337783813477,1020.3709716796875,623.60009765625
1.0500001907348633,1029.5009765625,640.719970703125
1.066666603088379,1038.48095703125,657.989990234375
1.0833330154418945,1047.3009033203125,675.41015625
1.1000003814697266,1055.970947265625,692.969970703125
1.1166667938232422,1064.490966796875,710.68017578125
1.1333332061767578,1072.8709716796875,728.530029296875
1.1499996185302734,1081.1009521484375,746.52001953125
1.1666669845581055,1089.19091796875,764.64013671875
1.183333396911621,1097.1409912109375,782.89013671875
1.1999998092651367,1104.9609375,801.280029296875
1.2166671752929688,1112.6510009765625,819.7900390625
1.2333335876464844,1120.200927734375,838.43017578125
1.25,1127.6309814453125,857.2001953125
1.2666664123535156,1134.930908203125,876.090087890625
1.2833337783813477,1142.1009521484375,895.10009765625
1.3000001907348633,1149.1510009765625,914.22998046875
1.3249998092651367,1159.5009765625,943.130126953125
1.3416671752929688,1166.2509765625,962.5400390625
1.3583335876464844,1172.8909912109375,982.06005859375
1.375,1179.4208984375,1001.690185546875
1.3916664123535156,1185.8309326171875,1021.43017578125
1.4083337783813477,1192.1409912109375,1041.280029296875
1.4250001907348633,1198.3409423828125,1061.22998046875
1.441666603088379,1204.430908203125,1081.280029296875
1.4583330154418945,1210.4208984375,1101.43017578125
1.4750003814697266,1216.3109130859375,1121.68017578125
1.4916667938232422,1222.1009521484375,1142.02001953125
1.5083332061767578,1227.7908935546875,1162.4599609375
1.5249996185302734,1233.3809814453125,1183.0
1.5416669845581055,1238.8809814453125,1203.6201171875
1.558333396911621,1244.281005859375,1224.340087890625
1.5749998092651367,1249.5909423828125,1245.14013671875
1.5916671752929688,1254.8109130859375,1266.0400390625
1.6083335876464844,1259.94091796875,1287.02001953125
1.625,1264.98095703125,1308.080078125
1.6416664123535156,1269.94091796875,1329.219970703125
1.6583337783813477,1274.8109130859375,1350.440185546875
1.6750001907348633,1279.5909423828125,1371.739990234375
1.691666603088379,1284.2908935546875,1393.1201171875
1.7083330154418945,1288.910888671875,1414.580078125
1.7250003814697266,1293.450927734375,1436.1201171875
1.7416667938232422,1297.910888671875,1457.739990234375
1.7583332061767578,1302.3109130859375,1479.420166015625
1.7749996185302734,1306.6309814453125,1501.18017578125
1.7916669845581055,1310.8709716796875,1523.010009765625
1.808333396911621,1315.0408935546875,1544.91015625
1.8249998092651367,1319.1409912109375,1566.880126953125
1.8416671752929688,1323.1708984375,1588.920166015625
1.8583335876464844,1327.1309814453125,1611.02001953125
1.875,1331.031005859375,1633.190185546875
1.8916664123535156,1334.8609619140625,1655.420166015625
1.9083337783813477,1338.6209716796875,1677.719970703125
1.9250001907348633,1342.3209228515625,1700.080078125
1.941666603088379,1345.9609375,1722.5
1.9583330154418945,1349.531005859375,1744.97998046875
1.9750003814697266,1353.0408935546875,1767.52001953125
1.9916667938232422,1356.490966796875,1790.110107421875
2.008333206176758,1359.8809814453125,1812.760009765625
2.0249996185302734,1363.2109375,1835.469970703125
2.0416669845581055,1366.490966796875,1858.22998046875
2.058333396911621,1369.7109375,1881.0400390625
2.0749998092651367,1372.8809814453125,1903.91015625
2.0916671752929688,1375.990966796875,1926.830078125
2.1083335876464844,1379.0509033203125,1949.800048828125
2.125,1382.0609130859375,1972.830078125
2.1416664123535156,1385.010986328125,1995.900146484375
2.1583337783813477,1387.9208984375,2019.02001953125
2.1750001907348633,1390.77099609375,2042.18994140625
2.191666603088379,1393.5809326171875,2065.400146484375
2.2083330154418945,1396.3409423828125,2088.66015625
2.2250003814697266,1399.0509033203125,2111.969970703125
2.241666793823242,1401.69091796875,2135.320068359375
2.258333206176758,1403.8009033203125,2158.7099609375
2.2749996185302734,1405.3909912109375,2182.130126953125
2.2916669845581055,1406.5809326171875,2205.570068359375
2.308333396911621,1407.470947265625,2229.030029296875
2.3249998092651367,1408.1409912109375,2252.489990234375
2.3416671752929688,1408.6409912109375,2275.969970703125
2.3583335876464844,1409.02099609375,2299.449951171875
2.375,1409.3009033203125,2322.929931640625
2.3916664123535156,1409.52099609375,2346.429931640625
2.4083337783813477,1409.680908203125,2369.929931640625
2.4250001907348633,1409.8109130859375,2393.429931640625
2.441666603088379,1409.9010009765625,2416.929931640625
2.4583330154418945,1409.970947265625,2440.429931640625
2.4750003814697266,1410.02099609375,2463.929931640625
103 changes: 103 additions & 0 deletions src/util/boost_acceleration.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
0.0,0.0,0.0
0.016666412353515625,43.00764765268562,0.5374943827180316
0.03333282470703125,85.27849016884997,1.7819228992694198
0.049999237060546875,126.81394098520472,3.7336308384274672
0.0666666030883789,167.64229041516953,6.363961030678928
0.08333301544189453,207.77767822065763,9.6591891164428
0.09999942779541016,247.2342279791924,13.618969828011853
0.11666584014892578,286.0119612699603,18.229319851958284
0.1333332061767578,324.1250340392644,23.47608324218658
0.14999961853027344,361.5875374958483,29.34493141924172
0.16666603088378906,398.4065928341092,35.83629596664811
0.1833324432373047,434.5963127109964,42.92859828146851
0.19999980926513672,470.163775168645,50.621837108024934
0.21666622161865234,505.1372920994572,58.89503817888214
0.23333263397216797,539.5168203449174,67.74802883307527
0.25,573.3023814838411,77.16665312491072
0.2666664123535156,606.5081098840631,87.13684144620449
0.28333282470703125,639.1481614907888,97.65859376490442
0.2999992370605469,671.2366490928828,108.71775416023387
0.3166666030883789,702.7736374271519,120.3001666609025
0.33333301544189453,733.7731313858027,132.39167534146918
0.34999942779541016,764.2494163902325,144.99228018175978
0.3666658401489258,794.1954145611222,158.10206751199178
0.3833332061767578,823.625195336956,171.70688138445362
0.39999961853027344,852.5670708554302,185.79239321164124
0.41666603088378906,881.0069280275319,200.35886194743838
0.4333324432373047,908.965914611802,215.39187269226483
0.4499998092651367,936.4440737634242,230.89159808534984
0.46666622161865234,963.4555614287252,246.84396849394528
0.48333263397216797,990.01449039843,263.23474165723405
0.5,1016.1208606687416,280.0638312513733
0.5166664123535156,1041.7747154007673,297.31716765373824
0.5333328247070312,1066.9901242239603,314.99483717867383
0.5499992370605469,1091.7742084275621,333.08268387982463
0.5666666030883789,1116.141123637369,351.5947773884452
0.5833330154418945,1140.0837488827951,370.50271948990405
0.5999994277954102,1163.6303960564699,389.8068554579696
0.6166658401489258,1186.7669523735822,409.4856062832123
0.6333332061767578,1209.5074874594986,429.5532138577795
0.6499996185302734,1231.8662004219514,449.98861708411994
0.6666660308837891,1253.828978471962,470.7918159728739
0.6833324432373047,1275.4240040279465,491.96255156029065
0.6999998092651367,1296.6513202453873,513.4869268532884
0.7166662216186523,1317.5251262318113,535.3506132768902
0.733332633972168,1338.0312228815735,557.5536971452981
0.75,1358.1979220872593,580.0962647731118
0.7666664123535156,1378.025180691369,602.9783161686228
0.7833328247070312,1397.5130418496062,626.192600912765
0.7999992370605469,1415.798812849388,649.7108930277763
0.8166666030883789,1432.316860055867,673.5121314417574
0.8333330154418945,1448.8348641031853,697.5962298294531
0.8499994277954102,1465.3528681489101,721.956024146598
0.8666658401489258,1481.8708721980347,746.5775305865834
0.8833332061767578,1498.388876243933,771.4818106866253
0.8999996185302734,1514.9068802931533,796.6690370801418
0.9166660308837891,1531.4249706575538,822.1248811872807
0.9333324432373047,1547.9428883885237,847.8493430079805
0.9499998092651367,1564.4609787530442,873.8567511219721
0.9666662216186523,1580.9789827993325,900.1469328957153
0.983332633972168,1597.4969868487628,926.698827286483
1.0,1614.0149908951919,953.5264171136503
1.0166664123535156,1630.5329949446964,980.6369532342433
1.0333328247070312,1647.0510853094852,1008.0302630147169
1.0499992370605469,1663.5690030408316,1035.6781208762318
1.066666603088379,1680.087093405717,1063.6088387172995
1.0833330154418945,1696.6050974524646,1091.822416537646
1.0999994277954102,1713.1231015021333,1120.3046983852773
1.1166658401489258,1729.6411055489966,1149.055597946279
1.1333332061767578,1746.1591095987237,1178.0894438004054
1.1499996185302734,1762.6771136456969,1207.4060633141346
1.166666030883789,1779.1951176954785,1236.9914731746321
1.1833324432373047,1795.7132080606605,1266.845500748379
1.1999998092651367,1812.2311257923886,1296.9823882960416
1.2166662216186523,1828.7492161576452,1327.4020495079078
1.233332633972168,1845.2672202048693,1358.0835096105764
1.25,1861.7852242547729,1389.0405788727621
1.2666664123535156,1878.303228302089,1420.2805944333088
1.2833328247070312,1894.8212323520363,1451.8033836482684
1.2999992370605469,1911.3392363994399,1483.5808072687178
1.316666603088379,1927.8572404494282,1515.6409613865883
1.3333330154418945,1944.3753308149162,1547.9840186403153
1.3499994277954102,1960.8932485469425,1580.6029012626748
1.3666658401489258,1977.411338912489,1613.4833665720246
1.3833332061767578,1993.9293429600946,1646.6466486980312
1.3999996185302734,2010.447347010175,1680.0928339600403
1.416666030883789,2026.965351057855,1713.8076369352905
1.4333324432373047,2043.483355107969,1747.7912302572531
1.4499998092651367,2060.00135915572,1782.0575972387146
1.4666662216186523,2076.519363205865,1816.606867355953
1.483332633972168,2093.037453571596,1851.4177637303803
1.5,2109.555371303859,1886.5043555844404
1.5166664123535156,2126.0734616696373,1921.8738074173764
1.5333328247070312,2142.591465717553,1957.5261192240416
1.5499992370605469,2159.1094697677695,1993.433022274007
1.566666603088379,2175.6274738157467,2029.622785302613
1.5833330154418945,2192.1454778659886,2066.0953219858793
1.5999994277954102,2208.6634819140245,2102.843640876819
1.6166658401489258,2225.1814859642905,2139.8536287784473
1.6333332061767578,2241.6995763302175,2177.1464550752225
1.6499996185302734,2258.2174940626724,2214.7220981911396
1.666666030883789,2274.7355844286376,2252.566466915552
1.6833324432373047,2291.253588476811,2290.67953966989
1.6999998092651367,2299.9934179346674,2329.0754076622866
41 changes: 41 additions & 0 deletions src/util/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@


from enum import Enum


class DIRECTION(Enum):
NONE = 0
FORWARD = 1
BACKWARD = 2
LEFT = 3
RIGHT = 4
UP = 5
DOWN = 6


class AERIALTAKEOFF(Enum):
NONE = 0
QUICK = 1
QUICK_SINGLE = 2
SINGLE = 3
DOUBLE = 4
FALL = 5


class KICKOFFTYPE(Enum):
NONE = 0
OFF_CENTER = 1
DIAGONAL = 2
STRAIGHT = 3


OCTANE_LENGTH = 82.5
BALL_RADIUS = 92.75
BOOST_CONSUMPTION_RATE = 33.3
INV_BOOST_CONSUMPTION_RATE = 1 / BOOST_CONSUMPTION_RATE
BOOST_ACCELERATION = 1066
CAR_BRAKING = 3500
ZERO_THROTTLE = 525
MAX_CAR_VEL = 2300
INV_MAX_CAR_VEL = 1 / MAX_CAR_VEL
TOP_DRIVE_VEL = 1410
Loading

0 comments on commit 2dc260b

Please sign in to comment.