Home Help Center

Integration of Python code with Ice on Ubuntu

aabramovaabramov Member Alexey AbramovOrganization: Georg-August-UniversityProject: Using CUDA together with Ice
Dear All,

I'm stuck right now in the integration of Python (2.6.5) code with Ice on Ubuntu (10.04). I've built Ice 3.4.2 from sources using the patch for mcpp from the "Third-Party" package. My slice definition has some includes (which are compiled without any problems using slice2cpp) and looks as follows:
#ifndef _MONOIMAGESEGMENTATION_ICE
#define _MONOIMAGESEGMENTATION_ICE

#include <Sensors.ice>
#include <Ice/SliceChecksumDict.ice>

module Garnics
{
	module MidLevel {
		interface MonoImageSegmentation
        {
			// Slice checksums
			idempotent Ice::SliceChecksumDict getSliceChecksums();
			
            Garnics::Common::GARNICSERROR segmentInfraredImage(Garnics::SensorServer::acquisitionData inputData
            , out Garnics::SensorServer::acquisitionData monoSegments);

          };
		
	};
};

#endif //#ifndef _MONOIMAGESEGMENTATION_ICE

I'm compiling it with slice2py as follows:
slice2py --checksum --ice --all -I/opt/Ice-3.4.2/slice/ -I. MonoImageSegmentation.ice

but getting the following error:
/home/administrator/Desktop/GarnicsSVNData/garnics/code/slice/Common.ice:58: enum `COORDINATESYSTEM' must have at least one enumerator

Common.ice:58 is the very last line here:
enum COORDINATESYSTEM
	{
		WORLD,			/*roboter base*/
		TOOL,			//roboter tool (e.g. calibrated with KUKA, including cameras)
		BASE,			//roboter base (calibrated with KUKA)
		CAM				//camera in current acquisitiondata (e.g. for relative extrinsics)
	};

It reminds me of this discussion about the parsing errors in slice2py: http://www.zeroc.com/forums/help-center/4872-slice2py-parsing-errors.html

Is this problem still not fixed? Any ideas?

Many thanks in advance!

Cheers,
Alexey

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Alexey,

    I am not aware of any parsing bug in slice2py.

    Can you post a complete .ice file that triggers this error? I've just tried your enum definition, and it worked fine.

    Thanks,
    Bernard
  • aabramovaabramov Member Alexey AbramovOrganization: Georg-August-UniversityProject: Using CUDA together with Ice
    Hi Bernard,
    thanks for your reply! In the meanwhile we have fixed the problem by switching from C++ to C comment style in all our interfaces and slice2py works fine. Either I need to some patches for my system or slice2py still have some parsing problems as described here: http://www.zeroc.com/forums/help-center/4872-slice2py-parsing-errors.html .

    Best,
    Alexey
  • grembogrembo Member Michael GmelinOrganization: Grem Equity GmbHProject: E-Commerce platform
    Wrong version of mcpp

    Hi,

    you seem to be using an unpatched version of mcpp. Once you apply the fixes (they are parts of FreeBSD ports, MacPorts, Debian etc. and also available for download on the ZeroC website) it should work as expected.

    See also: http://www.zeroc.com/forums/bug-reports/5309-mishap-slice-compilers.html

    Cheers,
    Michael
Sign In or Register to comment.