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

Fail to process all bond callbacks in bondpy #95

Open
sosoeeee opened this issue Jul 2, 2024 · 2 comments
Open

Fail to process all bond callbacks in bondpy #95

sosoeeee opened this issue Jul 2, 2024 · 2 comments

Comments

@sosoeeee
Copy link

sosoeeee commented Jul 2, 2024

Thank you for your work on migrating bondpy to ROS2!

I am currently using bondpy to create a Python lifecycle node as part of my development with the nav2 lifecycle manager. While the bond is formed successfully using bondpy, I encountered an issue where the node quickly dies due to a heartbeat timeout. After investigation, I discovered that bondpy fails to respond to all bond_status messages published by the lifecycle manager at high speed.

To resolve this issue, I referred to the implementation of bondcpp and increased the message buffer size from 1 to 100 in bondpy as follows:

def start(self):
    with self.lock:
        self.connect_timer.reset()
        self.sub = self.node.create_subscription(Status, self.topic, self._on_bond_status, 100)

        self.thread = threading.Thread(target=self._publishing_thread)
        self.thread.daemon = True
        self.thread.start()
        self.__started = True

If this modification does not lead to any potential errors, I would appreciate it if it could be included in an update to bondpy.

@clalancette
Copy link
Contributor

Please feel free to open a pull request with that change, and we are happy to review it.

@sosoeeee
Copy link
Author

sosoeeee commented Jul 2, 2024

Thank you for your reply! I have opened a pull request.

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

No branches or pull requests

2 participants