-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(t4-devkit): remove SensorChannel
and replace it by str
#132
Conversation
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I confirmed that this PR works well. I checked with this dataset(TIER IV INTERNAL LINK)
Before this PR(commit hash: 8e46d0a6ee8968c9803317e7f3f7198b73d501f4)
Loading T4 tables in `annotation`...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tier4_perception_dataset_tools/pcd_type_updater/lib/tier4_perception_dataset/t4-devkit/t4_devkit/tier4.py", line 123, in __init__
self.sensor: list[Sensor] = self.__load_table__(SchemaName.SENSOR)
File "/tier4_perception_dataset_tools/pcd_type_updater/lib/tier4_perception_dataset/t4-devkit/t4_devkit/tier4.py", line 155, in __load_table__
return build_schema(schema, filepath)
File "/tier4_perception_dataset_tools/pcd_type_updater/lib/tier4_perception_dataset/t4-devkit/t4_devkit/schema/builder.py", line 24, in build_schema
return SCHEMAS.build_from_json(name, filepath)
File "/tier4_perception_dataset_tools/pcd_type_updater/lib/tier4_perception_dataset/t4-devkit/t4_devkit/schema/tables/registry.py", line 77, in build_from_json
return schema.from_json(filepath)
File "/tier4_perception_dataset_tools/pcd_type_updater/lib/tier4_perception_dataset/t4-devkit/t4_devkit/schema/tables/base.py", line 37, in from_json
return [cls.from_dict(data) for data in records]
File "/tier4_perception_dataset_tools/pcd_type_updater/lib/tier4_perception_dataset/t4-devkit/t4_devkit/schema/tables/base.py", line 37, in <listcomp>
return [cls.from_dict(data) for data in records]
File "/tier4_perception_dataset_tools/pcd_type_updater/lib/tier4_perception_dataset/t4-devkit/t4_devkit/schema/tables/sensor.py", line 109, in from_dict
channel = SensorChannel(data["channel"])
File "/usr/lib/python3.10/enum.py", line 385, in __call__
return cls.__new__(cls, value)
File "/usr/lib/python3.10/enum.py", line 710, in __new__
raise ve_exc
ValueError: 'CAM_FRONT_LOWER' is not a valid SensorChannel
After this PR
Loading T4 tables in `annotation`...
Reverse indexing...
Done reverse indexing in 0.003 seconds.
======
8 attribute
8 calibrated_sensor
3 category
1601 ego_pose
51 instance
1 log
1 map
40 sample
1502 sample_annotation
1568 sample_data
3 visibility
8 sensor
1 scene
0 object_ann
0 surface_ann
0 keypoint
Done loading in 0.040 seconds.
======
NOTE: This PR introduces the following CONS:
-
It becomes difficult to clearly manage sensors; any type of name will be permissible.
-
This PR disables clearer information management such as quick modality checking. e.g. this code
-
Managed as strings, which can lead to unintended inclusions and, being non-const, there's a possibility of modifications in code.
…4#132) * feat: remove `SensorChannel` and replace it with `str` Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> * docs: update documents Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> * fix: invalid method access Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> --------- Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Description
In order to support any kind of sensor channels, this PR removed
SensorChannel
class and replaced it bystr
.How to review
Please confirm whether all variables that referred to
SensorChannel
previously are replaced bystr
.How to test
Please check if tutorials work.
test data
test command
Reference
Notes for reviewer