Skip to content

Fail to process all bond callbacks in bondpy #95

@sosoeeee

Description

@sosoeeee

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions