Commit
·
13f2b77
1
Parent(s):
f5bc2fb
change features
Browse files- commaSteeringControl.py +15 -13
commaSteeringControl.py
CHANGED
|
@@ -7,6 +7,7 @@ PLATFORMS = ["ACURA_RDX_2020", "AUDI_A3_3RD_GEN"]
|
|
| 7 |
_URLS = [f'https://huggingface.co/datasets/commaai/commaSteeringControl/resolve/main/data/{platform}.zip' for platform in PLATFORMS]
|
| 8 |
|
| 9 |
_DESCRIPTION = "Steering controls dataset from cars running openpilot"
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
class CommaSteeringControl(datasets.ArrowBasedBuilder):
|
|
@@ -16,19 +17,19 @@ class CommaSteeringControl(datasets.ArrowBasedBuilder):
|
|
| 16 |
description=_DESCRIPTION,
|
| 17 |
features=datasets.Features(
|
| 18 |
{
|
| 19 |
-
"t": datasets.
|
| 20 |
-
"latActive": datasets.
|
| 21 |
-
"steeringPressed": datasets.
|
| 22 |
-
"vEgo": datasets.
|
| 23 |
-
"aEgo": datasets.
|
| 24 |
-
"steeringAngleDeg": datasets.
|
| 25 |
-
"steer": datasets.
|
| 26 |
-
"steerFiltered": datasets.
|
| 27 |
-
"roll": datasets.
|
| 28 |
-
"latAccelSteeringAngle": datasets.
|
| 29 |
-
"latAccelDesired": datasets.
|
| 30 |
-
"latAccelLocalizer": datasets.
|
| 31 |
-
"epsFwVersion": datasets.
|
| 32 |
}
|
| 33 |
)
|
| 34 |
)
|
|
@@ -48,6 +49,7 @@ class CommaSteeringControl(datasets.ArrowBasedBuilder):
|
|
| 48 |
for path in files:
|
| 49 |
df = pd.read_csv(path[1])
|
| 50 |
pa_table = pa.Table.from_pandas(df)
|
|
|
|
| 51 |
yield path[0], pa_table
|
| 52 |
|
| 53 |
# def _get_examples_iterable_for_split(self, split_generator):
|
|
|
|
| 7 |
_URLS = [f'https://huggingface.co/datasets/commaai/commaSteeringControl/resolve/main/data/{platform}.zip' for platform in PLATFORMS]
|
| 8 |
|
| 9 |
_DESCRIPTION = "Steering controls dataset from cars running openpilot"
|
| 10 |
+
N = 600
|
| 11 |
|
| 12 |
|
| 13 |
class CommaSteeringControl(datasets.ArrowBasedBuilder):
|
|
|
|
| 17 |
description=_DESCRIPTION,
|
| 18 |
features=datasets.Features(
|
| 19 |
{
|
| 20 |
+
"t": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 21 |
+
"latActive": datasets.Array2D(shape=(1, N), dtype='bool'),
|
| 22 |
+
"steeringPressed": datasets.Array2D(shape=(1, N), dtype='bool'),
|
| 23 |
+
"vEgo": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 24 |
+
"aEgo": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 25 |
+
"steeringAngleDeg": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 26 |
+
"steer": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 27 |
+
"steerFiltered": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 28 |
+
"roll": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 29 |
+
"latAccelSteeringAngle": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 30 |
+
"latAccelDesired": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 31 |
+
"latAccelLocalizer": datasets.Array2D(shape=(1, N), dtype='float'),
|
| 32 |
+
"epsFwVersion": datasets.Array2D(shape=(1, N), dtype='string'),
|
| 33 |
}
|
| 34 |
)
|
| 35 |
)
|
|
|
|
| 49 |
for path in files:
|
| 50 |
df = pd.read_csv(path[1])
|
| 51 |
pa_table = pa.Table.from_pandas(df)
|
| 52 |
+
# print(pa_table)
|
| 53 |
yield path[0], pa_table
|
| 54 |
|
| 55 |
# def _get_examples_iterable_for_split(self, split_generator):
|