Skip to content

BufferedPortVector callback tests #1

@yeshasvitirupachuri

Description

@yeshasvitirupachuri

I was trying to work with the yarp python bindings, and came across this nice curation of examples, Kudos 👍🏾

I played a bit with the code in the callbacks, and my main interest is to read the incoming port data through BufferedPortVector using its associated callback TypedReaderCallbackVector as indicated in the commented out part of the code.

The initial code I used to test BufferedPortBottle with only Int32 data, and with the associated callback BottleCallback. This test ran as expected, and I am able read the data from the writer inside the callback of the reader port

Screenshot from 2021-08-24 18-53-15

Note that I added a line to connect the /writer and the /reader port inside reader_bp_callback.py rather than manually connecting.

However, when I modified the reader_bp_callback.py to open a BufferedPortVector and the associated callback TypedReaderCallbackVector, I could not read the data.

Screenshot from 2021-08-24 18-55-50

NOTE: In this test, I commented out the print of the callback and used a simple debug print print("onRead ...") which was never reached.

@ddetommaso @Nicolasr3 Please take a look at this issue, and let me know if I am handling BufferedPortVector callback correctly. Thanks.

CC @diegoferigo @traversaro

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