ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how can add python local module at ROS node?

asked 2021-07-03 10:08:31 -0500

mahdigadget gravatar image

hi

my package at dev_ws/dev_ws/ORM/utils.py and in this file i need read_data() function.

and my publisher node at dev_ws/dev_ws/ and file name is P_webcam.py.

P_webcam.py is like this:

from ORM.utils import read_data    
code......

def main(args=None):
config_data = read_data()    
code....

and my setup.py:

from setuptools import setup

package_name = 'dev_ws'

setup(
    name=package_name,
    version='0.0.0',
    packages=[package_name],
    data_files=[
        ('share/ament_index/resource_index/packages',
            ['resource/' + package_name]),
        ('share/' + package_name, ['package.xml']),
    ],
    install_requires=['setuptools'],
    zip_safe=True,
    maintainer='***',
    maintainer_email='***@gmail.com',
    description='TODO: Package description',
    license='TODO: License declaration',
    tests_require=['pytest'],
    entry_points={
        'console_scripts': [
            'webcam_publisher = dev_ws.P_webcam:main',
            'webcam_subscriber = dev_ws.S_webcam:main',
        ],
    },
)

and my error is:

ModuleNotFoundError: No module named 'ORM'

how can i solve this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-07-14 00:56:28 -0500

Firstly, you need to verify your whether you have installed Pandas library or not. Once verified, you need to install ORM :

pip install orm

After installation your, error should be resolved.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-07-03 09:59:39 -0500

Seen: 76 times

Last updated: Jul 03 '21