Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Not sure I understand every aspect of what you have tried and where it fails, but...

Normally it is a good idea to place python code that needs to be reused by other python code in a module, that is in folder that is named preferably after the package. In your case:

romi_soccer
      bin
         jsongwriter
         mapper

      src
         romi_soccer
             __init__.py
             json_grabber.py
             image_mapper.py

This makes json_grabber.py and image_mapper.py part of a python module named romi_soccer. When importing from this package you will then do:

from romi_soccer.image_mapper import ImageMapper

And then your bin need not be part of the exported packages:

d = generate_distutils_setup(
    packages=['romi_soccer'],
    package_dir={'': 'src'}
)

Not sure I understand every aspect of what you have tried and where it fails, but...

Normally it is a good idea to place python code that needs to be reused by other python code in a module, that is in folder that is properly name folder. Preferably named preferably after the package. In your case:

romi_soccer
      bin
         jsongwriter
         mapper

      src
         romi_soccer
             __init__.py
             json_grabber.py
             image_mapper.py

This makes json_grabber.py and image_mapper.py part of a python module named romi_soccer. When importing from this package you will then do:

from romi_soccer.image_mapper import ImageMapper

And then your bin need not be part of the exported packages:

d = generate_distutils_setup(
    packages=['romi_soccer'],
    package_dir={'': 'src'}
)

Not sure I understand every aspect of what you have tried and where it fails, but...

Normally it is a good idea to place python code that needs to be reused by other python code in a module, package, that is in properly name folder. Preferably named after the ROS package. In your case:

romi_soccer
      bin
         jsongwriter
         mapper

      src
         romi_soccer
             __init__.py
             json_grabber.py
             image_mapper.py

This makes json_grabber.py and image_mapper.py part of a python module package named romi_soccer. When importing from this package you will then do:

from romi_soccer.image_mapper import ImageMapper

And then your bin need not be part of the exported packages:

d = generate_distutils_setup(
    packages=['romi_soccer'],
    package_dir={'': 'src'}
)

Not sure I understand every aspect of what you have tried and where it fails, but...

Normally it is a good idea to place python code that needs to be reused by other python code in a package, that is which means in a properly name folder. Preferably named after the ROS package. In your case:

romi_soccer
      bin
         jsongwriter
         mapper

      src
         romi_soccer
             __init__.py
             json_grabber.py
             image_mapper.py

This makes json_grabber.py and image_mapper.py part of a python package named romi_soccer. When importing from this package you will then do:

from romi_soccer.image_mapper import ImageMapper

And then your bin need not be part of the exported packages:

d = generate_distutils_setup(
    packages=['romi_soccer'],
    package_dir={'': 'src'}
)

Not sure I understand every aspect of what you have tried and where it fails, but...

Normally it is a good idea to place python code that needs to be reused by other python code in a package, which means in a properly name named folder. Preferably named after the ROS package. In your case:

romi_soccer
      bin
         jsongwriter
         mapper

      src
         romi_soccer
             __init__.py
             json_grabber.py
             image_mapper.py

This makes json_grabber.py and image_mapper.py part of a python package named romi_soccer. When importing from this package you will then do:

from romi_soccer.image_mapper import ImageMapper

And then your bin need not be part of the exported packages:

d = generate_distutils_setup(
    packages=['romi_soccer'],
    package_dir={'': 'src'}
)