-
Notifications
You must be signed in to change notification settings - Fork 0
GSE.py initial commit. Not adding IMU_Estimator to GSE class, it shou… #44
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: refactor/flexsea-8
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| from src.exo.gait_state_estimator.forceplate.ZMQ_PubSub import Subscriber | ||
|
|
||
| from GSE_Bertec import Bertec_Estimator | ||
|
|
||
| from src.settings.constants import VICON_IP | ||
|
|
||
|
|
||
| class GSE: | ||
| def __init__(self, topics=["fz_left", "fz_right"], publisher_ip=VICON_IP, timeout_ms=5, stride_period_init=1.2, filter_size=10, hs_threshold = 80, to_threshold = 30): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add docstrings to each of these methods? |
||
| self.topics = topics | ||
|
|
||
| self.subscribers = {} | ||
| self.estimators = {} | ||
|
|
||
| for topic in self.topics: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thoughts on making this flexible to the exo side that is active? If someone is walking with just the left exo, then we wouldn't need to subscribe to the right side.. But if we have to make the publisher side flexible to this, then its fine as is! |
||
| self.subscribers[topic] = Subscriber(publisher_ip=publisher_ip, topic_filter=topic, timeout_ms=timeout_ms) | ||
| self.estimators[topic] = Bertec_Estimator(self.subscribers[topic], stride_period_init=stride_period_init, filter_size=filter_size, hs_threshold=hs_threshold, to_threshold=to_threshold) | ||
|
|
||
| def link_to_exoboot(self, exoboot): | ||
| pass | ||
|
|
||
| def update(self): | ||
| for estimator in self.estimators.values(): | ||
| estimator.update() | ||
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.
Does this GSE class manage the BertecEstimator? Can you explain a little as to why this class necessary since most of the arguments are passed to the Bertec_estimator? It might be better to make this into a function that is responsible for setting up subscribers!