Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions GSE.py
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:
Copy link
Member

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!

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

Choose a reason for hiding this comment

The 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:
Copy link
Member

@nundinir nundinir May 27, 2025

Choose a reason for hiding this comment

The 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()