Changes between Initial Version and Version 1 of PythonWrappers

02/25/2009 09:20:52 AM (12 years ago)



  • PythonWrappers

    v1 v1  
     2== Python wrappers for various components == 
     4via: Mick's email to the WP9 list 
     6I have been testing various standard libraries to be used for our LIREC software modules, mostly related to programming Robots using Python on Ubuntu 8.10. So for all you non-C++ gurus(!) here are my findings: 
     8I would reccomend using Python V2.4 until Activrobots release a new version of ARIA which provides support for Python 2.6. The ARIA wrappers for Python (and JAVA etc.) are supplied as Windows binaries or debian packages and are self installing for PYTHON 2.4. Installation is problem free on both platforms, so this is a big argument for using Python2.4 for now. 
     10Note, ARIA is used for controlling the Pioneer and PeopleBot mobile robots. The ARIA library also provides support for a number of devices used by the robots including the various PTU options (Canon VCC4, V50 etc.) and SICK laser rangfinders from the on-board computer (or main control laptop if used). It may then be useful to consider moving to Python V2.6 at that point. 
     12I have succesfuly compiled/installed YARP wrappers for both Python versions 2.4 and 2.6 under LINUX. Just download the latest source from and follow the instructions for installing from the cvs. 
     14This is pretty strighforward and suport for python is automatically installed if you have only V2.4 on your system.  If, like me you also have V2.6 or (V3 even) just use the following to: 
     16To generate the Python 2.4 wrapper and make the yarp library available. After the main install has checked out (yarp server then: yarp check) just cd to yarp/examples/swig/python and then cmake . to set up the swig interface. Run ccmake . and select PYTHON to ON and change the PYTHON_INCLUDE_PATH to usr/include/python 2.4, and the PYTHON_LIBRARY to /usr/lib/python2.4/config/ 
     18Just run make, then sudo cp the following files: 
     22sudo cp /usr/lib/python2.4/site-packages 
     23sudo cp /usr/local/lib/python2.4/site-packages/ 
     27For opencv, the installation is straightforward. Just download the latest source and extract to a local directory. run  
     30./configure PYTHONPATH=/usr/bin/python2.4 
     33and it should build/install the opencv libraries and python 2.4 wrapper. 
     35In the python IDE interpreter (I use IDLE) just use: 
     39import AriaPy 
     40import opencv 
     41import yarp 
     44If no errors, all should be installed ok! 
     45Refer to the manuals etc for usage. They mostly follow the C++ definitions, but just use normal python expressions. I have not tested the later two for windows, but Kyron has already installed yarp for windows, so generating the python wrapper should be relatively srtaightforward. If there is a demand, I may look at this next?