[ros-users] Python node design.

Renato Samperio mintaka_alnitak at hotmail.com
Fri Nov 5 11:45:34 UTC 2010


Dear Balise,

I comment between lines.

> Date: Tue, 2 Nov 2010 09:26:57 -0700
> From: blaise at willowgarage.com
> To: ros-users at code.ros.org
> Subject: Re: [ros-users] Python node design.
> 
> If you move pyopencv into src, you should be able to import from
> python after loading the manifest, by using "import
> pyopencv.module_name". 
I am putting into src/ an encapsulated version we made of pyopencv which does not require to be installed in any /usr path. Whenever I try to "import pyopencv" without LD_LIBRARY_PATH pointing it drops me this error:

ImportError: libpyopencv_extras.so.2.1.0.wr1.2.0: cannot open shared object file: No such file or directory

(Though I am not 100% sure, given that I don't
> know exactly what is in pyopencv.)
> 
> I'm curious, however, what pyopencv is, and how it differs from the
> opencv2 package. http://www.ros.org/wiki/opencv2

PyOpenCV are the python wrappers in which our system is currently working.

http://code.google.com/p/pyopencv/
> 
> 2010/11/2 Renato Samperio <mintaka_alnitak at hotmail.com>:
> > Dar ROS users,
> >
> > I would like to know if somebody could have a hint for our problem. This
> > question is for system design in python.
> >
> > We require of a ROS package holding a library for our system that has
> > relevant python wrappers (pyopencv) used in our system.
> >
> > So far, we have encapsulated all required libraries (*.so) and python files
> > (*.py) into a node structure which can be used by pointing it to the
> > LD_LIBRARY_PATH. However, if we want to run our system as a ROS node, we
> > also require to update this system variable.
> >
> > The 'manifest.xml' file for our ROS library (pyopencv) is:
> >
> > <package>
> >
> > <description brief="pyopencv"> pyopencv </description>
> >
> > <author>Renato Samperio</author>
> >
> > <license>BSD</license>
> >
> > <review status="unreviewed" notes=""/>
> >
> > <url>http://ros.org/wiki/pyopencv</url>
> >
> > <depend package="rospy"/>
> >
> > <depend package="sensor_msgs"/>
> >
> > <export>
> >
> > <cpp lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lpyopencv_extras
> > -lboost_python -lcvaux -lcv_h_ext -lcv_hpp_ext -lcxcore_h_ext
> > -lcxcore_hpp_ext -lcxcore_hpp_point_ext -lcxcore_hpp_vec_ext -lcxtypes_h_ext
> > -lhighgui_ext -lcvaux -lcv -lcxcore -lhighgui -lml -lml_ext -lsdopencv_ext"
> > />
> >
> > </export>
> >
> > </package>
> >
> > We made our node following rules from PyStyleGuide. Our file system
> > structure is:
> >
> > pyopencv
> >
> > |- CMakeLists.txt
> >
> > |- manifest.xml
> >
> > |- mainpage.dox
> >
> > |- src/
> >
> > |- pyopencv/ ← Pointed to LD_LIBRARY_PATH
> >
> > |- __init__.py
> >
> > |- *.so, *.py, *.pyc
> >
> > I would really appreciate if somebody has an idea of how we could avoid the
> > LD_LIBRARY_PATH system variable.
> >
> > With best wishes,
> >
> > Renato Samperio
> >
> > _______________________________________________
> > ros-users mailing list
> > ros-users at code.ros.org
> > https://code.ros.org/mailman/listinfo/ros-users
> >
> >
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101105/f7b72268/attachment-0003.html>


More information about the ros-users mailing list