Skip to content
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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Fts real robot #230

wants to merge 3 commits into from

Conversation

sunava
Copy link
Collaborator

@sunava sunava commented Nov 27, 2024

[[fts] custom filter Butterworth for fts for real robot
tested on hsr and donbot

Copy link
Collaborator

@tomsch420 tomsch420 left a 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
Copy link
Collaborator

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):
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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):
Copy link
Collaborator

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(
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants