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

Clark_Clark's profile - activity

2023-06-06 15:06:25 -0500 received badge  Famous Question (source)
2023-04-05 08:48:52 -0500 marked best answer colcon build fails when adding pkg in setup.py

Greetings: I am new to ROS2 and paid for a tutorial that has 10 sections. I understand everything so far. The course has covered building packages, nodes, topics, and servers. It shows me how to do this in python and C++.

I use Ubuntu 20 and Visual code. The instructor provided source code for all the examples. I'm using Foxy.

QUESTION: Where might I look to resolve colcon build failure when I add the last item in this entry list?

i.e. "add_two_ints_client = my_py_pkg.add_two_ints_client:main

entry_points={
    'console_scripts':[
        "py_node = my_py_pkg.my_first_node:main",
        "robot_news_station = my_py_pkg.robot_news_station:main",
        "smartphone = my_py_pkg.smartphone:main",
        "number_publisher = my_py_pkg.number_publisher:main",
        "number_counter = my_py_pkg.number_counter:main",
        "add_two_ints_server = my_py_pkg.add_two_ints_server:main",
        "add_two_ints_client_no_oop = my_py_pkg.add_two_ints_client_no_oop:main",
        "add_two_ints_client = my_py_pkg.add_two_ints_client:main)"

 ],

I build correctly when I don't add the last line. The code registers clean and I even replaced mine with the instructors.

The result from colcon build is rather cryptic to me. I include it here in hopes someone has an idea. BTW, I did an update and upgrade and verified I have the latest colcon-extensions.

report from "stdout_stderr.log" file

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_ros/task/ament_python/build.py", line 51, in build
    setup_py_data = get_setup_data(self.context.pkg, env)
  File "/usr/lib/python3/dist-packages/colcon_core/task/python/__init__.py", line 20, in get_setup_data
    return dict(pkg.metadata[key](env))
  File "/usr/lib/python3/dist-packages/colcon_ros/package_identification/ros.py", line 129, in getter
    return get_setup_information(
  File "/usr/lib/python3/dist-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 241, in get_setup_information
    _setup_information_cache[hashable_env] = _get_setup_information(
  File "/usr/lib/python3/dist-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 281, in _get_setup_information
    result = subprocess.run(
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-c', "import sys;from setuptools.extern.packaging.specifiers import SpecifierSet;from distutils.core import run_setup;dist = run_setup(    'setup.py', script_args=('--dry-run',), stop_after='config');skip_keys = ('cmdclass', 'distclass', 'ext_modules', 'metadata');data = {    key: value for key, value in dist.__dict__.items()     if (        not key.startswith('_') and         not callable(value) and         key not in skip_keys and         key not in dist.display_option_names    )};data['metadata'] = {    k: v for k, v in dist.metadata.__dict__.items()     if k not in ('license_files', 'provides_extras')};sys.stdout.buffer.write(repr(data).encode('utf-8'))"]' returned non-zero exit status 1.
2022-06-21 12:11:04 -0500 received badge  Notable Question (source)
2022-05-16 00:06:43 -0500 received badge  Famous Question (source)
2021-11-16 10:50:15 -0500 received badge  Popular Question (source)
2021-09-04 12:52:34 -0500 received badge  Student (source)
2021-08-11 13:03:59 -0500 received badge  Famous Question (source)
2021-08-05 16:33:19 -0500 received badge  Notable Question (source)
2021-08-05 16:33:19 -0500 received badge  Popular Question (source)
2021-07-23 23:04:53 -0500 received badge  Notable Question (source)
2021-07-23 23:04:53 -0500 received badge  Popular Question (source)
2021-07-09 16:30:05 -0500 asked a question ROS2-foxy msg interface builds but package has TypeError when run

ROS2-foxy msg interface builds but package has TypeError when run I am taking an online course "ROS2 for Beginners by Ed

2021-07-08 10:23:03 -0500 commented question colcon build fails when adding pkg in setup.py

Oh my! mia culpa. I feel so foolish but also grateful for te answer. Yes, my code works now. I will remember this as it

2021-07-07 11:08:11 -0500 asked a question "rviz2 compilation fatal error" - 5 packages not processed

"rviz2 compilation fatal error" - 5 packages not processed Hello, I am new to ROS2 and tried to install rviz2 from a sep

2021-07-06 02:32:52 -0500 asked a question colcon build fails when adding pkg in setup.py

colcon build fails when adding pkg in setup.py Greetings: I am new to ROS2 and paid for a tutorial that has 10 sections.