Conversation
Xierumeng
left a comment
There was a problem hiding this comment.
Reviewed. Make sure to also write an integration test for the new worker.
| 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.
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.
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.
if len(detections) == 0:
TypeError: object of type 'QueueProxyWrapper' has no len()
| # 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.
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.
6b1c2d4 to
ae44e9e
Compare
…ight_interface_worker
Created the decision worker in modules/decision
Modified Files: