-
Notifications
You must be signed in to change notification settings - Fork 0
Sensor base backend - first structure #2
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
base: main
Are you sure you want to change the base?
Conversation
|
General comment so far: we should exclude various files from Git. This includes the |
| from abc import ABC, abstractmethod | ||
|
|
||
|
|
||
| class BaseSensorBackend(ABC): |
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.
With regards to ABC - that is indeed the way people do it in Python, though it isn't necessary to use it.
I personally refrained from using it thus far, but it isn't necessarily the right thing to do.
Do you know the pros and cons for using it?
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.
No, not really; I just found it a good answer to the question: what if I know there will be this method in the children, but it will be different in each of them?
Also, how can you avoid using it? Just with a pass or a raise.NotImplementedError() ?
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.
Yep, raise NotImplementedError and pass indeed.
ABC is probably the better recommended way so let's go with it, I'll read a little more about it.
Moving BaseSensorBackend from base_backend to sensor_backend. BaseSensorBackend is a base class for sensor backends. It includes methods for initializing sensor parameters, fetching data (get_data), transforming data into desired reference frames (transform), and reading sensor data (read_sensor). The read_sensor method checks if data transformation is needed based on frame references.
Questions: