Skip to content

Commit

Permalink
Merge pull request #24 from bit-bots/fix/overflowing-queue
Browse files Browse the repository at this point in the history
refactor(config): increase rate so queue does not fill up
  • Loading branch information
timonegk authored Jul 6, 2023
2 parents 627a709 + 7b8f6f5 commit a2268f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/udp_bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ros__parameters:
encryption_key: "robocup2023"
port: 1234
send_frequency: 10
send_frequency: 300
sender_queue_max_size: 5

topics:
Expand All @@ -15,6 +15,7 @@
- /debug/dsd/hcm
- /team_data
- /balls_relative
- /debug/viz_ball
- /robots_relative
- /gamestate
- /animation
Expand Down
2 changes: 1 addition & 1 deletion udp_bridge/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __message_callback(self, data):
)

try:
self.queue.put(encrypted_msg, block=True, timeout=0.5)
self.queue.put(encrypted_msg, block=True, timeout=1)
except Full:
self.node.get_logger().warn(f"Could not enqueue new message of topic {self.topic}. Queue full.")

Expand Down

0 comments on commit a2268f9

Please sign in to comment.