Getting error when creating a new ROS 2 rclpy package
Hello,
I have created an rclpy package called python_pkg_test
and I am using macOS High Sierra + ROS Bouncy. When I compile via colcon build --symlink-install
everything works fine, except that I get this:
The file /Users/ikhsanov/catkin_ws/None does not exist
.
Which I do not know why it even looks for that file.
After that, I go to ./install/python_pkg_test/bin
and execute the file using python3 python_pkg_test
I am getting this error:
Traceback (most recent call last):
File "talker_py_node", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3126, in <module>
@_call_aside
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 581, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 898, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 784, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-pkg-test' distribution was not found and is required by the application
I just have standard setup.py file: from setuptools import setup
packagename = 'pythonpkg_test'
setup(
name=package_name,
version='0.0.1',
packages=[],
py_modules=[
'talker',
],
data_files=[],
install_requires=['setuptools'],
zip_safe=True,
author='Mikael Arguedas',
author_email='mikael@osrfoundation.org',
maintainer='Mikael Arguedas',
maintainer_email='mikael@osrfoundation.org',
keywords=['ROS'],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Topic :: Software Development',
],
description='Examples of minimal publishers using rclpy.',
license='Apache License, Version 2.0',
tests_require=[],
entry_points={
'console_scripts': [
'talker_py_node = talker:main',
],
},
)
And standard package.xml file:
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>python_pkg_test</name>
<version>0.0.1</version>
<description>Examples of minimal publishers using rclpy.</description>
<maintainer email="mikael@osrfoundation.org">Mikael Arguedas</maintainer>
<license>Apache License 2.0</license>
<exec_depend>rclpy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<!-- These test dependencies are optional
Their purpose is to make sure that the code passes the linters -->
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>
<export>
<build_type>ament_python</build_type>
</export>
</package>
Any idea what might be going wrong here?
Asked by stevemartin on 2018-11-15 15:31:03 UTC
Comments