-
Notifications
You must be signed in to change notification settings - Fork 39
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
Decision Worker #187
base: main
Are you sure you want to change the base?
Decision Worker #187
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.
Reviewed.
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.
Reviewed. Make sure to also write an integration test for the new worker.
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.
Reviewed.
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.
Reviewed.
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.
Reviewed.
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.
Reviewed.
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.
Reviewed.
result, estimator = cluster_estimation.ClusterEstimation.create( | ||
min_activation_threshold, min_new_points_to_run, random_state | ||
) | ||
assert result | ||
assert estimator is not None | ||
|
||
result, cluster_pads = estimator.run(input_queue, False) | ||
assert result | ||
assert cluster_pads is not None |
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.
When I run the test, it crashes here. However, that's less important.
Instead of instantiating the cluster estimation object, create a fake list of object in world that is placed into the queue, similar to simulate_flight_interface_worker()
below. If you want to be extra fancy, you can optionally make a list of these so that they can be selected in the loop.
Test by running: python -m tests.integration.test_decision_worker
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.
What error are you getting within the cluster estimation function? When I try to run the test, I get a "ModuleNotFoundError".
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.
if len(detections) == 0:
TypeError: object of type 'QueueProxyWrapper' has no len()
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.
Reviewed.
# Initalize queue with a maximum size of 1 to only hold latest odometry data | ||
odometry_queue = queue_proxy_wrapper.QueueProxyWrapper(mp.Manager(), maxsize=1) | ||
|
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.
Wait, why is this being created here? This queue should be passed in.
Add a check that the maximum size of the queue is 1 above line 32.
Update test_flight_interface_worker.py
and main_2024.py
as the interface will change.
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.
Reviewed.
6b1c2d4
to
ae44e9e
Compare
…ight_interface_worker
Created the decision worker in modules/decision
Modified Files: