INNER CODE UNIT · Python

long_callback

CopterExpress/clover · clover/src/clover/__init__.py:4

def long_callback(fn):
    """
    Decorator fixing a rospy issue for long-running topic callbacks, primarily
    for image processing.

    See: https://github.com/ros/ros_comm/issues/1901.

    Usage example:

    @long_callback
    def image_callback(msg):
        # perform image processing
        # ...

    rospy.Subscriber('main_camera/image_raw', Image, image_callback, queue_size=1)
    """
    e = Event()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…