-
Notifications
You must be signed in to change notification settings - Fork 43
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
Fts real robot #230
base: dev
Are you sure you want to change the base?
Fts real robot #230
Conversation
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.
Please also provide test cases
|
||
class CustomFilter: | ||
""" | ||
Abstract class to ensure that every supported filter needs to implement the filter method |
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.
can the class name also be filter?
""" | ||
|
||
@abstractmethod | ||
def filter(self, data): |
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.
docstring
|
||
def __init__(self, order=4, cutoff=10, fs=60): | ||
self.order = order | ||
self.cutoff = cutoff |
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.
documentation of params
""" | ||
|
||
self.robot_name = robot_name | ||
self.filter_config = filter_config |
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.
declare the variables as class variables and document them there
|
||
self.__setup() | ||
|
||
def __setup(self): |
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.
double underscore methods usually have a meaning of "super private please do never access this method from any other file". Is this intended?
self.prev_values.pop(0) | ||
|
||
if self.debug: | ||
print( |
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.
use the debug logging here instead of printing
[[fts] custom filter Butterworth for fts for real robot
tested on hsr and donbot