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.
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.
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.
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: