Colcon build error

I'm starting my first ROS2 project. I followed the tutorial to create a workspace: https://index.ros.org/doc/ros2/Tutori... Then moved on to the tutorial to create my own package: https://index.ros.org/doc/ros2/Tutori... At Step 2 of the "Create my own package" -That is, to say I ran source ~/ros2_foxy/install/setup.bash mkdir -p jeri_ws/src cd jeri_ws/src ros2 pkg create --build-type ament_cmake jeri_base cd .. colcon build (This passed no problem) But then I realized I wanted the skeleton of the "node" flag, so I found an answer answers.ros.org/question/330109/ros2-... saying to delete the folders created by ros2 pkg create and re-attempt. No problem. cd ~/jeri_ws rm -r build logs install cd src rm -r jeri_base ros2 pkg create --build-type ament_cmake --node-name hello-world_node jeri_base cd .. colcon build Then I get the following error: Traceback (most recent call last):ngoing] [examples_rclcpp_multithreaded_executor:build 100% - 1min 32.0s] ... File "", line 1, in File "/usr/lib/python3.6/distutils/core.py", line 227, in run_setup script_name) RuntimeError: 'distutils.core.setup()' was never called -- perhaps 'setup.py' is not a Distutils setup script? --- stderr: jeri_base Traceback (most recent call last): File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_core/executor/__init__.py", line 91, in __call__ rc = await self.task(*args, **kwargs) File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_core/task/__init__.py", line 93, in __call__ return await task_method(*args, **kwargs) File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_ros/task/ament_python/build.py", line 51, in build setup_py_data = get_setup_data(self.context.pkg, env) File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_core/task/python/__init__.py", line 20, in get_setup_data return dict(pkg.metadata[key](env)) File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_ros/package_identification/ros.py", line 130, in getter desc.path / 'setup.py', env=env) File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 242, in get_setup_information setup_py, env=env) File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 283, in _get_setup_information cwd=os.path.abspath(str(setup_py.parent)), check=True, env=env) File "/usr/lib/python3.6/subprocess.py", line 438, in run output=stdout, stderr=stderr) 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. --- Failed <<< jeri_base [6.52s, exited with code 1] Aborted <<< turtlesim [5.80s] Aborted <<< examples_rclcpp_multithreaded_executor [1min 32s] Aborted <<< examples_rclpy_minimal_subscriber [20.1s] Summary: 14 packages finished [2min 20s] 1 package failed ... (more)

I’m starting my first ROS2 project.
I followed the tutorial to create a workspace: https://index.ros.org/doc/ros2/Tutori…
Then moved on to the tutorial to create my own package: https://index.ros.org/doc/ros2/Tutori…
At Step 2 of the «Create my own package»
-That is, to say I ran

source ~/ros2_foxy/install/setup.bash
mkdir -p jeri_ws/src
cd jeri_ws/src
ros2 pkg create --build-type ament_cmake jeri_base
cd ..
colcon build

(This passed no problem) But then I realized I wanted the skeleton of the «node» flag, so I found an answer
answers.ros.org/question/330109/ros2-… saying to delete the folders created by ros2 pkg create and re-attempt. No problem.

cd ~/jeri_ws
rm -r build logs install
cd src
rm -r jeri_base
ros2 pkg create --build-type ament_cmake --node-name hello-world_node jeri_base
cd ..
colcon build

Then I get the following error:

Traceback (most recent call last):ngoing] [examples_rclcpp_multithreaded_executor:build 100% - 1min 32.0s] ...
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.6/distutils/core.py", line 227, in run_setup
    script_name)
RuntimeError: 'distutils.core.setup()' was never called -- perhaps 'setup.py' is not a Distutils setup script?
--- stderr: jeri_base                                                                                         
Traceback (most recent call last):
  File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_ros/task/ament_python/build.py", line 51, in build
    setup_py_data = get_setup_data(self.context.pkg, env)
  File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_core/task/python/__init__.py", line 20, in get_setup_data
    return dict(pkg.metadata[key](env))
  File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_ros/package_identification/ros.py", line 130, in getter
    desc.path / 'setup.py', env=env)
  File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 242, in get_setup_information
    setup_py, env=env)
  File "/home/jetbot/.local/lib/python3.6/site-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 283, in _get_setup_information
    cwd=os.path.abspath(str(setup_py.parent)), check=True, env=env)
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
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.
---
Failed   <<< jeri_base [6.52s, exited with code 1]
Aborted  <<< turtlesim [5.80s]
Aborted  <<< examples_rclcpp_multithreaded_executor [1min 32s]
Aborted  <<< examples_rclpy_minimal_subscriber [20.1s]

Summary: 14 packages finished [2min 20s]
  1 package failed ...

(more)

I pulled the latest colcon-core and used that to run the code. I didn’t notice anything different in the output. I’m pasting the complete error output and have attached the logger_all file.

c:devros2_dashing>colcon build --merge-install
Starting >>> ament_package
Starting >>> ament_lint
Starting >>> osrf_testing_tools_cpp
Starting >>> fastcdr
Starting >>> poco_vendor
Starting >>> cyclonedds
Starting >>> ament_cppcheck
Starting >>> tinydir_vendor
Starting >>> gtest_vendor
Starting >>> osrf_pycommon
Starting >>> tinyxml2_vendor
Starting >>> orocos_kdl
[3.863s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\ament_package\colcon_command_prefix_setup_py.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\ament_package\colcon_command_prefix_setup_py.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.863s] colcon.colcon_ros.task.ament_python.build ERROR Could not find a shell extension for the command environment
Failed   <<< ament_package      [ Exited with code 1 ]
[3.864s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\ament_lint\colcon_command_prefix_setup_py.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\ament_lint\colcon_command_prefix_setup_py.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.864s] colcon.colcon_ros.task.ament_python.build ERROR Could not find a shell extension for the command environment
Failed   <<< ament_lint [ Exited with code 1 ]
[3.865s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\osrf_testing_tools_cpp\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\osrf_testing_tools_cpp\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.865s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< osrf_testing_tools_cpp     [ Exited with code 1 ]
[3.896s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\fastcdr\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\fastcdr\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.897s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< fastcdr    [ Exited with code 1 ]
[3.898s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\poco_vendor\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\poco_vendor\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.898s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< poco_vendor        [ Exited with code 1 ]
[3.922s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\cyclonedds\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\cyclonedds\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.923s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< cyclonedds [ Exited with code 1 ]
[3.947s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\ament_cppcheck\colcon_command_prefix_setup_py.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\ament_cppcheck\colcon_command_prefix_setup_py.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.948s] colcon.colcon_ros.task.ament_python.build ERROR Could not find a shell extension for the command environment
Failed   <<< ament_cppcheck     [ Exited with code 1 ]
[3.949s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\tinydir_vendor\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\tinydir_vendor\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.949s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< tinydir_vendor     [ Exited with code 1 ]
[3.973s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\gtest_vendor\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\gtest_vendor\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.974s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< gtest_vendor       [ Exited with code 1 ]
[3.998s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\osrf_pycommon\colcon_command_prefix_setup_py.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\osrf_pycommon\colcon_command_prefix_setup_py.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[3.999s] colcon.colcon_ros.task.ament_python.build ERROR Could not find a shell extension for the command environment
Failed   <<< osrf_pycommon      [ Exited with code 1 ]
[4.000s] colcon.colcon_core.shell ERROR Exception in shell extension 'bat': Expected ['c:\dev\ros2_dashing\build\tinyxml2_vendor\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.

Traceback (most recent call last):
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 289, in get_command_environment
    task_name, Path(build_base), dependencies)
  File "c:python37libsite-packagescolcon_corecolcon_coreshellbat.py", line 128, in generate_command_environment
    env = await get_environment_variables(cmd, cwd=str(build_base))
  File "c:python37libsite-packagescolcon_corecolcon_coreshell__init__.py", line 325, in get_environment_variables
    output = await check_output(cmd, cwd=cwd, shell=shell)
  File "c:python37libsite-packagescolcon_corecolcon_coresubprocess.py", line 110, in check_output
    'Expected {args} to pass: {stderr_data}'.format_map(locals())
AssertionError: Expected ['c:\dev\ros2_dashing\build\tinyxml2_vendor\colcon_command_prefix_build.bat', '&&', 'set'] to pass: The system cannot find the path specified.


[4.000s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment
Failed   <<< tinyxml2_vendor    [ Exited with code 1 ]
Aborted  <<< orocos_kdl

Summary: 0 packages finished [3.83s]
  11 packages failed: ament_cppcheck ament_lint ament_package cyclonedds fastcdr gtest_vendor osrf_pycommon osrf_testing_tools_cpp poco_vendor tinydir_vendor tinyxml2_vendor
  1 package aborted: orocos_kdl
  259 packages not processed

In addition, I also noticed that all the packages that were built (failed builds) have nothing inside the build\<package_name>\colcon_command_prefix_build.bat file.

(Since markdown doesn’t allow me to attach py or batch files I’ll share a screenshot)
image
logger_all.log

I have a ROS2 package which is failing to build. I’m following the ROS2 «Setting Up a Robot Simulation (Webots)» tutorial, and when I got to section 6 «Modify the setup.py file», I changed my file like so:

from setuptools import setup
from glob import glob

package_name = 'ad_boxtra'

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']),
        ('share/' + package_name, glob('launch/*.py')), # include all launch files
        ('share/' + package_name, glob('resource/*.urdf')), # include all webots-related resource files
        ('share/' + package_name + '/webots_simulation/worlds',    # include desired webots worlds
            ['worlds/adboxtra_2022_simplified.wbt']),
    ],
    install_requires=['setuptools'],
    zip_safe=True,
    maintainer='redacted',
    maintainer_email='redacted',
    description="redacted",
    license='MIT License',
    tests_require=['pytest'],
    entry_points={
        'console_scripts': [
            'my_robot_driver = ad_boxtra.my_robot_driver:main',
        ],
    },
)

I then ran colcon build with debug info from the root of my workspace and got:

user@host:~/my_ws $ colcon build --packages-select ad_boxtra --event-handlers console_direct+
Starting >>> ad_boxtra
running egg_info                        
writing ../../build/ad_boxtra/ad_boxtra.egg-info/PKG-INFO
writing dependency_links to ../../build/ad_boxtra/ad_boxtra.egg-info/dependency_links.txt
writing entry points to ../../build/ad_boxtra/ad_boxtra.egg-info/entry_points.txt
writing requirements to ../../build/ad_boxtra/ad_boxtra.egg-info/requires.txt
writing top-level names to ../../build/ad_boxtra/ad_boxtra.egg-info/top_level.txt
reading manifest file '../../build/ad_boxtra/ad_boxtra.egg-info/SOURCES.txt'
writing manifest file '../../build/ad_boxtra/ad_boxtra.egg-info/SOURCES.txt'
running build
running build_py
running install
running install_lib
running install_data
error: can't copy 'adboxtra_2022_simplified.wbt': doesn't exist or not a regular file
--- stderr: ad_boxtra
error: can't copy 'adboxtra_2022_simplified.wbt': doesn't exist or not a regular file
---
Failed   <<< ad_boxtra [0.63s, exited with code 1]

Summary: 0 packages finished [0.70s]
  1 package failed: ad_boxtra
  1 package had stderr output: ad_boxtra
---
Failed   <<< ad_boxtra [0.62s, exited with code 1]

Summary: 0 packages finished [0.71s]
  1 package failed: ad_boxtra
  1 package had stderr output: ad_boxtra

Why is this colcon build failing? If it helps, here’s my directory tree:

AdBoxtra
├── ad_boxtra
│   ├── __init__.py
│   └── my_robot_driver.py
├── launch
│   └── my_robot_webots.launch.py
├── LICENSE
├── package.xml
├── README.md
├── resource
│   ├── ad_boxtra
│   └── my_robot.urdf
├── setup.cfg
├── setup.py
├── test
│   ├── test_copyright.py
│   ├── test_flake8.py
│   └── test_pep257.py
├── urdf
└── webots_simulation
    ├── controllers
    │   └── arm_sweep
    │       └── arm_sweep.py
    ├── libraries
    ├── plugins
    │   ├── physics
    │   ├── remote_controls
    │   └── robot_windows
    ├── protos
    └── worlds
        └── adboxtra_2022_simplified.wbt

27 directories, 63 files

I did observe that in the install/ directory of my workspace, it seems that share/ad_boxtra/webots_simulation/worlds/ exists, but there’s no .wbt files inside it. I don’t know why this is though:

$ tree ~/rover_ws/install/ad_boxtra/
/home/redacted/rover_ws/install/ad_boxtra/
├── lib
│   ├── ad_boxtra
│   │   ├── conversationalist
│   │   ├── drive_control_serial
│   │   └── turtle_ad_boxtra
│   └── python3.8
│       └── site-packages
│           ├── ad_boxtra
│           │   ├── conversationalist.py
│           │   ├── drive_control_serial.py
│           │   ├── __init__.py
│           │   ├── my_robot_driver.py
│           │   ├── __pycache__
│           │   │   ├── conversationalist.cpython-38.pyc
│           │   │   ├── drive_control_serial.cpython-38.pyc
│           │   │   ├── __init__.cpython-38.pyc
│           │   │   ├── my_robot_driver.cpython-38.pyc
│           │   │   └── turtle_ad_boxtra.cpython-38.pyc
│           │   └── turtle_ad_boxtra.py
│           └── ad_boxtra-0.0.0-py3.8.egg-info
│               ├── dependency_links.txt
│               ├── entry_points.txt
│               ├── PKG-INFO
│               ├── requires.txt
│               ├── SOURCES.txt
│               ├── top_level.txt
│               └── zip-safe
└── share
    ├── ad_boxtra
    │   ├── drive_control.launch.py
    │   ├── hook
    │   │   ├── ament_prefix_path.dsv
    │   │   ├── ament_prefix_path.ps1
    │   │   ├── ament_prefix_path.sh
    │   │   ├── pythonpath.dsv
    │   │   ├── pythonpath.ps1
    │   │   └── pythonpath.sh
    │   ├── my_robot.urdf
    │   ├── my_robot_webots.launch.py
    │   ├── package.bash
    │   ├── package.dsv
    │   ├── package.ps1
    │   ├── package.sh
    │   ├── package.xml
    │   ├── package.zsh
    │   ├── __pycache__
    │   │   └── drive_control.launch.cpython-38.pyc
    │   └── webots_simulation
    │       └── worlds
    ├── ament_index
    │   └── resource_index
    │       └── packages
    │           └── ad_boxtra
    └── colcon-core
        └── packages
            └── ad_boxtra

18 directories, 38 files

I have a custom ROS2 message that am integrating into a Matlab function that is getting deployed on a remote Linux maching using Coder. During the ‘colcon build’ step of the Coder execution, I am getting the error:

error: cannot convert ‘struct_T*’ to ‘const uavrt_interfaces_PulseStruct_T*’

82 | MATLABROS2Publisher_publish(pulsePub.PublisherHelper, &pulseMsg);

| ^~~~~~~~~

| |

| struct_T*

The rest of the terminal output after this is at the bottom of this message. My minimally functional Matlab function is below. The error is associated the C++ line of code that corresponds to the send(pulsePub,pulseMsg) line in my Matlab function. It seems to be upset about the type of pulseMsg, but that variable is defined as a ros2message earlier in my code. Below, I have also include the custom ROS2 message definition for Pulse.msg. I have also included the commands I use for using Coder. What is frustrating is that was working a few weeks ago and I can’t seem to figure out what changed to cause colcon to error out.

MATLAB Function:

function [] = uavrt_detection_debug()

fprintf(«Preparing ROS2 Node and Messages…»)

node = ros2node(«detector»,0);

pulsePub = ros2publisher(node,«/pulse»,«uavrt_interfaces/Pulse»);

pulseMsg = ros2message(pulsePub);

pulseMsg.detector_id = char(ID);

pulseMsg.start_time.sec = int32(1);

pulseMsg.start_time.nanosec = uint32(1);

pulseMsg.end_time.sec = int32(1);

pulseMsg.end_time.nanosec = uint32(1);

pulseMsg.predict_next_start.sec = int32(1);

pulseMsg.predict_next_start.nanosec = uint32(1);

pulseMsg.predict_next_end.sec = int32(1);

pulseMsg.predict_next_end.nanosec = uint32(1);

pulseMsg.group_ind = uint16(3);

pulseMsg.group_SNR = 123;

pulseMsg.detection_status = true;

pulseMsg.confirmed_status = false;

pulseCount = pulseCount+1;

fprintf(‘Transmitted a pulse…n’)

The ROS2 Pulse.msg Definition:

# This is our custom message for pulses

builtin_interfaces/Time start_time

builtin_interfaces/Time end_time

builtin_interfaces/Time predict_next_start

builtin_interfaces/Time predict_next_end

Code Generation Commands:

cfg = coder.config(‘exe’);

cfg.Hardware = coder.hardware(‘Robot Operating System 2 (ROS 2)’);

cfg.Hardware.BuildAction = ‘Build and load’;

cfg.Hardware.RemoteDeviceAddress = ‘XXX.XXX.XXX.XXX’;

cfg.Hardware.RemoteDeviceUsername = ‘XXXXXXX’;

cfg.Hardware.RemoteDevicePassword = ‘XXXXXXX’;

cfg.Hardware.DeployTo = ‘Remote Device’;

cfg.Hardware.ROS2Folder = ‘/opt/ros/galactic’;

cfg.Hardware.ROS2Workspace = ‘~/uavrt_ws’;

cfg.HardwareImplementation.ProdHWDeviceType = ‘Intel->x86-64 (Linux 64)’;

cfg.RuntimeChecks = true;

codegen uavrt_detection_debug -args {} -config cfg

The error is that shows up in the Matlab Terminal:

/home/dasl/uavrt_ws/src/uavrt_detection_debug/src/uavrt_detection_debug.cpp:82:59: error: cannot convert ‘struct_T*’ to ‘const uavrt_interfaces_PulseStruct_T*’

82 | MATLABROS2Publisher_publish(pulsePub.PublisherHelper, &pulseMsg);

| ^~~~~~~~~

| |

| struct_T*

/home/dasl/uavrt_ws/src/uavrt_detection_debug/include/uavrt_detection_debug/mlros2_pub.h:15:65: note: in definition of macro ‘MATLABROS2Publisher_publish’

15 | #define MATLABROS2Publisher_publish(obj,structPtr) obj->publish(structPtr)

| ^~~~~~~~~

/home/dasl/uavrt_ws/src/uavrt_detection_debug/include/uavrt_detection_debug/mlros2_pub.h:50:37: note: initializing argument 1 of ‘void MATLABROS2Publisher<MsgType, StructType>::publish(const StructType*) [with MsgType = uavrt_interfaces::msg::Pulse_<std::allocator<void> >; StructType = uavrt_interfaces_PulseStruct_T]’

50 | void publish(const StructType *msgStructPtr) {

| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

make[2]: *** [CMakeFiles/uavrt_detection_debug.dir/build.make:144: CMakeFiles/uavrt_detection_debug.dir/src/uavrt_detection_debug.cpp.o] Error 1

make[2]: *** Waiting for unfinished jobs….

make[1]: *** [CMakeFiles/Makefile2:81: CMakeFiles/uavrt_detection_debug.dir/all] Error 2

make: *** [Makefile:144: all] Error 2

Failed <<< uavrt_detection_debug [8.34s, exited with code 2]

Summary: 1 package finished [10.4s]

1 package failed: uavrt_detection_debug

1 package had stderr output: uavrt_detection_debug

??? The following error occurred during deployment to your hardware board:

Build unsuccessful for model ‘uavrt_detection_debug’. Check the build log in the diagnostics viewer for error

messages.

When using ROS2, when compiled with Colcon Build, the error is as follows:

 1 Starting >>> fishbot_navigation2
 2 --- stderr: fishbot_navigation2                         
 3 Traceback (most recent call last):
 4   File "/opt/ros/foxy/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 21, in <module>
 5     from catkin_pkg.package import parse_package_string
 6 ModuleNotFoundError: No module named 'catkin_pkg'
 7 CMake Error at /opt/ros/foxy/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:94 (message):
 8   execute_process(/home/ros2/miniconda3/bin/python3
 9   /opt/ros/foxy/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py
10   /home/ros2/code/fishbot_ws/src/fishbot_navigation2/package.xml
11   /home/ros2/code/fishbot_ws/build/fishbot_navigation2/ament_cmake_core/package.cmake)
12   returned error code 1
13 Call Stack (most recent call first):
14   /opt/ros/foxy/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:49 (_ament_package_xml)
15   /opt/ros/foxy/share/ament_lint_auto/cmake/ament_lint_auto_find_test_dependencies.cmake:31 (ament_package_xml)
16   CMakeLists.txt:34 (ament_lint_auto_find_test_dependencies)
17 
18 
19 ---
20 Failed   <<< fishbot_navigation2 [0.29s, exited with code 1]
21                                 
22 Summary: 0 packages finished [0.42s]
23   1 package failed: fishbot_navigation2
24   1 package had stderr output: fishbot_navigation2

Solution:

COLCON Build again, succeed! Because this problem trapped for a long time, there was no problem in the same way before, but suddenly the new project could not be compiled, and the only change was that the new «Conda» was recently installed. It should be the culprit!

Trying to compile ROS2 with `colcon`, currently getting some weird permission error with `colcon build —merge-install —install-base /opt/ros2/foxy`, as per instructions on the wiki. I have write permissions to the target directory, but for what it’s worth, the error occurs with `sudo colcon build […]` as well.

    --- stderr: uncrustify_vendor                                                                                                                                                                   
    make[5]: /usr/local/bin/python: Permission denied
	make[5]: *** [CMakeFiles/uncrustify.dir/build.make:93: src/options.cpp] Error 127
	make[5]: *** Waiting for unfinished jobs.... 
	make[5]: /usr/local/bin/python: Permission denied
	make[5]: *** [CMakeFiles/uncrustify.dir/build.make:112: src/option_enum.cpp] Error 127
	make[5]: /usr/local/bin/python: Permission denied
	make[5]: *** [CMakeFiles/uncrustify.dir/build.make:85: src/option_enum.h] Error 127
	make[4]: *** [CMakeFiles/Makefile2:803: CMakeFiles/uncrustify.dir/all] Error 2
	make[3]: *** [Makefile:182: all] Error 2
	make[2]: *** [CMakeFiles/uncrustify-0.68.1.dir/build.make:133: uncrustify-0.68.1-prefix/src/uncrustify-0.68.1-stamp/uncrustify-0.68.1-build] Error 2
	make[1]: *** [CMakeFiles/Makefile2:97: CMakeFiles/uncrustify-0.68.1.dir/all] Error 2
	make: *** [Makefile:160: all] Error 2

Also, I have tried the same procedure on my laptop and it all went fine. I haven’t updated it in a while, so perhaps there are some dependencies at earlier versions which may be related to this issue?

Last edited by joaocandre (2021-02-27 20:19:49)

Понравилась статья? Поделить с друзьями:
  • Coil whine как исправить
  • Coil error перевод
  • Coges lithos ошибки
  • Cofire exe ошибка при запуске приложения 0xc0000142
  • Coefficients estimate std error t value pr t