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

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.

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
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
BufferedPortVectorusing its associated callbackTypedReaderCallbackVectoras indicated in the commented out part of the code.The initial code I used to test
BufferedPortBottlewith onlyInt32data, and with the associated callbackBottleCallback. This test ran as expected, and I am able read the data from the writer inside the callback of the reader portNote that I added a line to connect the
/writerand the/readerport insidereader_bp_callback.pyrather than manually connecting.However, when I modified the
reader_bp_callback.pyto open aBufferedPortVectorand the associated callbackTypedReaderCallbackVector, I could not read the data.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
BufferedPortVectorcallback correctly. Thanks.CC @diegoferigo @traversaro