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

Added a communication worker for logging cluster estimation #227

Merged
merged 32 commits into from
Nov 27, 2024

Conversation

wdan31
Copy link
Contributor

@wdan31 wdan31 commented Nov 21, 2024

No description provided.

@wdan31 wdan31 force-pushed the comm-worker-logs-cluster branch from 36df1a7 to 8ff6035 Compare November 21, 2024 22:53
Copy link
Collaborator

@Xierumeng Xierumeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. Is there a more descriptive name beyond communication ? What is the purpose of this worker beyond logging?

modules/communications/communications.py Show resolved Hide resolved
modules/communications/communications.py Outdated Show resolved Hide resolved
modules/communications/communications.py Outdated Show resolved Hide resolved
modules/communications/communications.py Outdated Show resolved Hide resolved
modules/communications/communications.py Outdated Show resolved Hide resolved
modules/communications/communications.py Outdated Show resolved Hide resolved

objects_in_world_global.append(object_in_world_global)

timestamp = time.time()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this required?

modules/communications/communications_worker.py Outdated Show resolved Hide resolved
modules/communications/communications_worker.py Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in a separate PR in repository common.

@maxlou05 maxlou05 force-pushed the comm-worker-logs-cluster branch from 8ff6035 to 92c3299 Compare November 22, 2024 03:30
if not result:
# Log nothing if at least one of the conversions failed
self.__logger.warning(
f"drone_position_global_from_local conversion failed:\nhome_position: {self.__home_position}\nobject_position_local: {object_position_local}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you still need to change this to position global from position local

Copy link
Member

@maxlou05 maxlou05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

config.yaml Outdated
@@ -39,3 +39,6 @@ cluster_estimation:
min_activation_threshold: 25
min_new_points_to_run: 5
random_state: 0

communications:
timeout: 10.0 # seconds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this timeout longer, like 30 seconds? I feel like main_2024 takes a while to boot up

main_2024.py Outdated
Comment on lines 448 to 452
for cluster in cluster_estimations:
main_logger.debug("Cluster in world: " + True)
main_logger.debug("Cluster in world: ", True)
main_logger.debug("Cluster location x: " + str(cluster.location_x))
main_logger.debug("Cluster location y: " + str(cluster.location_y))
main_logger.debug("Cluster spherical variance: " + str(cluster.spherical_variance))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove all of this and just log logger.debug(f"clusters: {detections_in_world}") as it is in cluster_estimation_worker?

modules/communications/communications.py Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete this. Evan or I will move it to post-processing

Copy link
Member

@maxlou05 maxlou05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

@wdan31 wdan31 merged commit c79374e into main Nov 27, 2024
1 check passed
@wdan31 wdan31 deleted the comm-worker-logs-cluster branch November 27, 2024 22:31
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.

6 participants