Yarp: How to communicate for BufferedPort<Bottle>, port<Bottle> between python and c++

Created on 5 Mar 2020  路  1Comment  路  Source: robotology/yarp

I read the Python Tutorials
http://www.icub.org/software_documentation/icub_tutorials.html

This tutorial taught me how to use python to receive the image from Yarp (C++) and send the image to Yarp (C++). It is very great.

But, if I just send and receive the type of BufferedPort, port, how should I do?
Do you have any tutorial or guide for me?

Thanks for your patient interpretation each time.

Bindings QSupport Answered

Most helpful comment

Hi!

There's a great introduction on classes related to Port and Bottle at: http://www.yarp.it/port_expert.html

The corresponding C++ source code is at: https://github.com/robotology/yarp/tree/master/example/port_power (perma)

Any C++ example can seamlessly connect to its Python counterpart and vice-versa.

Python examples are currently not abundant, but here you have an example with a BufferedPortBottle (pythonic equivalent to C++ BufferedPort<Bottle>) that implements a write loop: https://github.com/robotology/yarp/blob/master/bindings/python/examples/example.py (perma)

Please inform if there is any other YARP example code with which you would need help in translation from C++ to Python!

>All comments

Hi!

There's a great introduction on classes related to Port and Bottle at: http://www.yarp.it/port_expert.html

The corresponding C++ source code is at: https://github.com/robotology/yarp/tree/master/example/port_power (perma)

Any C++ example can seamlessly connect to its Python counterpart and vice-versa.

Python examples are currently not abundant, but here you have an example with a BufferedPortBottle (pythonic equivalent to C++ BufferedPort<Bottle>) that implements a write loop: https://github.com/robotology/yarp/blob/master/bindings/python/examples/example.py (perma)

Please inform if there is any other YARP example code with which you would need help in translation from C++ to Python!

Was this page helpful?
0 / 5 - 0 ratings