icub-client
|
Instructions for compiling the Python bindings for the iCub-Client. More...
Instructions for compiling the Python bindings for the iCub-Client.
First, follow the instructions to compile the YARP bindings for Python (see sections "Yarp for Python" and "Compiling YARP language bindings" and make sure they work correctly. For better compatibility, set the YARP_USE_PYTHON_VERSION
variable, and use SWIG version 3 or newer (SWIG version 2 will not work for the iCub-Client due to the C++11 dependency).
To compile the Python bindings for the iCub-Client, follow these instructions:
cd /path/to/icub-client/bindings mkdir build cd build ccmake .. set `ICUBCLIENT_USE_PYTHON_VERSION` to the same value as `YARP_USE_PYTHON_VERSION` and configure + generate make
You can then append the path of the bindings, the same as you did for YARP (you might want to add this to your .bashrc
:
export PYTHONPATH=$PYTHONPATH:/path/to/icub-client/bindings/build
To use the bindings, make sure to run the same version of Python as you specified using the YARP_USE_PYTHON_VERSION
/ ICUBCLIENT_USE_PYTHON_VERSION` variables. Then, you can
import yarp import icubclient yarp.Network.init() iCub = icubclient.ICubClient("pythontest") iCub.close() yarp.Network.fini()
Then, using the iCub-Client is straightforward and works as expected, nicely interplaying with YARP objects like Bottle
. Examples for ARE and KARMA can be found in the icub-client/bindings
folder.
(This page can be edited at src/doc/bindings.dox)