小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
在使用小鱼的yolov5_ros2功能包时,编译环节出现问题
-
当
colcon build
命令执行后只输出了“summary: 0 packages finished [0.51s]”这样的信息时,这通常意味着colcon没有找到任何要构建的工作空间包(workspace packages)。这可能是因为以下几个原因:- 工作空间未正确设置:确保你已经在包含
yolov5_ros2
功能包的ROS 2工作空间目录中执行了colcon build
命令。 - CMakeLists.txt或package.xml缺失或不正确:检查
yolov5_ros2
功能包中是否包含了必要的CMakeLists.txt
和package.xml
文件,并且这些文件的内容是正确的。 - colcon未找到包:可能是因为
COLCON_IGNORE
文件或.colconignore
文件阻止了colcon扫描到该包,或者包的路径没有正确设置。 - 依赖项问题:如果
yolov5_ros2
依赖于其他尚未安装或构建的包,colcon也可能不会尝试构建它。
以下是一些解决步骤:
-
确认工作空间:
- 切换到你的ROS 2工作空间目录,通常是一个包含
src
子目录的目录。 - 确保
yolov5_ros2
功能包位于src
子目录中。
- 切换到你的ROS 2工作空间目录,通常是一个包含
-
检查CMakeLists.txt和package.xml:
- 导航到
yolov5_ros2
功能包的目录中。 - 检查是否存在
CMakeLists.txt
和package.xml
文件,并且它们的内容是正确的。
- 导航到
-
检查COLCON_IGNORE或.colconignore:
- 在你的工作空间目录中查找名为
COLCON_IGNORE
或.colconignore
的文件。 - 确保这些文件没有错误地阻止了colcon扫描到
yolov5_ros2
功能包。
- 在你的工作空间目录中查找名为
-
检查依赖项:
- 阅读
yolov5_ros2
的文档或package.xml
文件,了解它的依赖项。 - 确保所有必需的依赖项都已安装。
- 阅读
-
重新配置工作空间:
- 在工作空间目录中运行
colcon build --symlink-install
来重新配置和构建工作空间。 - 注意
--symlink-install
选项,它允许使用符号链接来避免不必要的文件复制,这可以加快构建过程。
- 在工作空间目录中运行
-
查看详细输出:
- 你可以通过添加
--verbose
或-v
选项来运行colcon build
命令,以获取更详细的输出信息。 - 这可能会帮助你诊断问题所在。
- 你可以通过添加
-
清理工作空间:
- 如果之前的工作空间构建失败了,并且现在出现了这个问题,尝试清理工作空间并重新构建。
- 在工作空间目录中运行
colcon build --packages-select yolov5_ros2 --cmake-args -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-Wall -Wextra"
来单独构建yolov5_ros2
包,并添加一些调试标志。
如果以上步骤都不能解决问题,请考虑查看
yolov5_ros2
功能包的文档或寻求其维护者的帮助。
以上为生成回答,仅供参考~
- 工作空间未正确设置:确保你已经在包含
-
-
此回复已被删除! -
此回复已被删除! -
@小鱼
TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'Failed <<< iocpsupport [2.04s, exited with code 1]
Aborted <<< matrixlib [2.30s]
Aborted <<< ma [2.43s]Summary: 0 packages finished [14.3s]
1 package failed: iocpsupport
2 packages aborted: ma matrixlib
2 packages had stderr output: iocpsupport ma -
@LeeSonFirm https://fishros.org.cn/forum/topic/151/提问前必看-不符合要求的问题拒绝回答
每看出和yolo相关的日志,请提供完整的上下文和操作流程和日志
-
@小鱼
请问下好的安装包在哪个目录里面啊,好像关于yolo的包没下载下来 -
@小鱼
找不到yolov5的包 -
@LeeSonFirm 下载到哪个目录是你自己决定的
-
@小鱼
当时没设置位置,直接粘贴代码了,现在不知道在哪,还有办法找出来吗 -
@小鱼
lizijian@lizijian-virtual-machine:~$ pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple yolov5
/usr/bin/pip3:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import load_entry_point
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: yolov5 in ./.local/lib/python3.8/site-packages (7.0.13)
Requirement already satisfied: gitpython>=3.1.30 in ./.local/lib/python3.8/site-packages (from yolov5) (3.1.43)
Requirement already satisfied: matplotlib>=3.3 in ./.local/lib/python3.8/site-packages (from yolov5) (3.7.5)
Requirement already satisfied: numpy>=1.18.5 in ./.local/lib/python3.8/site-packages (from yolov5) (1.24.4)
Requirement already satisfied: opencv-python>=4.1.1 in ./.local/lib/python3.8/site-packages (from yolov5) (4.10.0.84)
Requirement already satisfied: Pillow>=7.1.2 in ./.local/lib/python3.8/site-packages (from yolov5) (10.4.0)
Requirement already satisfied: psutil in /usr/lib/python3/dist-packages (from yolov5) (5.5.1)
Requirement already satisfied: PyYAML>=5.3.1 in /usr/lib/python3/dist-packages (from yolov5) (5.3.1)
Requirement already satisfied: requests>=2.23.0 in ./.local/lib/python3.8/site-packages (from yolov5) (2.32.3)
Requirement already satisfied: scipy>=1.4.1 in ./.local/lib/python3.8/site-packages (from yolov5) (1.10.1)
Requirement already satisfied: thop>=0.1.1 in ./.local/lib/python3.8/site-packages (from yolov5) (0.1.1.post2209072238)
Requirement already satisfied: torch>=1.7.0 in ./.local/lib/python3.8/site-packages (from yolov5) (2.3.1)
Requirement already satisfied: torchvision>=0.8.1 in ./.local/lib/python3.8/site-packages (from yolov5) (0.18.1)
Requirement already satisfied: tqdm>=4.64.0 in ./.local/lib/python3.8/site-packages (from yolov5) (4.66.4)
Requirement already satisfied: ultralytics>=8.0.100 in ./.local/lib/python3.8/site-packages (from yolov5) (8.2.60)
Requirement already satisfied: tensorboard>=2.4.1 in ./.local/lib/python3.8/site-packages (from yolov5) (2.14.0)
Requirement already satisfied: pandas>=1.1.4 in ./.local/lib/python3.8/site-packages (from yolov5) (2.0.3)
Requirement already satisfied: seaborn>=0.11.0 in ./.local/lib/python3.8/site-packages (from yolov5) (0.13.2)
Requirement already satisfied: setuptools>=65.5.1 in ./.local/lib/python3.8/site-packages (from yolov5) (71.0.3)
Requirement already satisfied: fire in ./.local/lib/python3.8/site-packages (from yolov5) (0.6.0)
Requirement already satisfied: boto3>=1.19.1 in ./.local/lib/python3.8/site-packages (from yolov5) (1.34.145)
Requirement already satisfied: sahi>=0.11.10 in ./.local/lib/python3.8/site-packages (from yolov5) (0.11.18)
Requirement already satisfied: huggingface-hub>=0.12.0 in ./.local/lib/python3.8/site-packages (from yolov5) (0.24.0)
Requirement already satisfied: roboflow>=0.2.29 in ./.local/lib/python3.8/site-packages (from yolov5) (1.1.36)
Requirement already satisfied: gitdb<5,>=4.0.1 in ./.local/lib/python3.8/site-packages (from gitpython>=3.1.30->yolov5) (4.0.11)
Requirement already satisfied: contourpy>=1.0.1 in ./.local/lib/python3.8/site-packages (from matplotlib>=3.3->yolov5) (1.1.1)
Requirement already satisfied: cycler>=0.10 in /usr/lib/python3/dist-packages (from matplotlib>=3.3->yolov5) (0.10.0)
Requirement already satisfied: fonttools>=4.22.0 in ./.local/lib/python3.8/site-packages (from matplotlib>=3.3->yolov5) (4.53.1)
Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.8/site-packages (from matplotlib>=3.3->yolov5) (1.4.5)
Requirement already satisfied: packaging>=20.0 in /usr/lib/python3/dist-packages (from matplotlib>=3.3->yolov5) (20.3)
Requirement already satisfied: pyparsing>=2.3.1 in /usr/lib/python3/dist-packages (from matplotlib>=3.3->yolov5) (2.4.6)
Requirement already satisfied: python-dateutil>=2.7 in ./.local/lib/python3.8/site-packages (from matplotlib>=3.3->yolov5) (2.9.0.post0)
Requirement already satisfied: importlib-resources>=3.2.0; python_version < "3.10" in ./.local/lib/python3.8/site-packages (from matplotlib>=3.3->yolov5) (6.4.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.8/site-packages (from requests>=2.23.0->yolov5) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests>=2.23.0->yolov5) (2.8)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests>=2.23.0->yolov5) (1.25.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests>=2.23.0->yolov5) (2019.11.28)
Requirement already satisfied: filelock in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (3.15.4)
Requirement already satisfied: typing-extensions>=4.8.0 in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (4.12.2)
Requirement already satisfied: sympy in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (1.13.0)
Requirement already satisfied: networkx in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (3.1)
Requirement already satisfied: jinja2 in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (3.1.4)
Requirement already satisfied: fsspec in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (2024.6.1)
Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (12.1.105)
Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (12.1.105)
Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (12.1.105)
Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (8.9.2.26)
Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (12.1.3.1)
Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (11.0.2.54)
Requirement already satisfied: nvidia-curand-cu12==10.3.2.106; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (10.3.2.106)
Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (11.4.5.107)
Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (12.1.0.106)
Requirement already satisfied: nvidia-nccl-cu12==2.20.5; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (2.20.5)
Requirement already satisfied: nvidia-nvtx-cu12==12.1.105; platform_system == "Linux" and platform_machine == "x86_64" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (12.1.105)
Requirement already satisfied: triton==2.3.1; platform_system == "Linux" and platform_machine == "x86_64" and python_version < "3.12" in ./.local/lib/python3.8/site-packages (from torch>=1.7.0->yolov5) (2.3.1)
Requirement already satisfied: py-cpuinfo in ./.local/lib/python3.8/site-packages (from ultralytics>=8.0.100->yolov5) (9.0.0)
Requirement already satisfied: ultralytics-thop>=2.0.0 in ./.local/lib/python3.8/site-packages (from ultralytics>=8.0.100->yolov5) (2.0.0)
Requirement already satisfied: absl-py>=0.4 in ./.local/lib/python3.8/site-packages (from tensorboard>=2.4.1->yolov5) (2.1.0)
Requirement already satisfied: grpcio>=1.48.2 in ./.local/lib/python3.8/site-packages (from tensorboard>=2.4.1->yolov5) (1.65.1)
Requirement already satisfied: google-auth<3,>=1.6.3 in ./.local/lib/python3.8/site-packages (from tensorboard>=2.4.1->yolov5) (2.32.0)
Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in ./.local/lib/python3.8/site-packages (from tensorboard>=2.4.1->yolov5) (1.0.0)
Requirement already satisfied: markdown>=2.6.8 in ./.local/lib/python3.8/site-packages (from tensorboard>=2.4.1->yolov5) (3.6)
Requirement already satisfied: protobuf>=3.19.6 in ./.local/lib/python3.8/site-packages (from tensorboard>=2.4.1->yolov5) (5.27.2)
Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in ./.local/lib/python3.8/site-packages (from tensorboard>=2.4.1->yolov5) (0.7.2)
Requirement already satisfied: werkzeug>=1.0.1 in ./.local/lib/python3.8/site-packages (from tensorboard>=2.4.1->yolov5) (3.0.3)
Requirement already satisfied: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorboard>=2.4.1->yolov5) (0.34.2)
Requirement already satisfied: pytz>=2020.1 in ./.local/lib/python3.8/site-packages (from pandas>=1.1.4->yolov5) (2024.1)
Requirement already satisfied: tzdata>=2022.1 in ./.local/lib/python3.8/site-packages (from pandas>=1.1.4->yolov5) (2024.1)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from fire->yolov5) (1.14.0)
Requirement already satisfied: termcolor in ./.local/lib/python3.8/site-packages (from fire->yolov5) (2.4.0)
Requirement already satisfied: botocore<1.35.0,>=1.34.145 in ./.local/lib/python3.8/site-packages (from boto3>=1.19.1->yolov5) (1.34.145)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in ./.local/lib/python3.8/site-packages (from boto3>=1.19.1->yolov5) (1.0.1)
Requirement already satisfied: s3transfer<0.11.0,>=0.10.0 in ./.local/lib/python3.8/site-packages (from boto3>=1.19.1->yolov5) (0.10.2)
Requirement already satisfied: shapely>=1.8.0 in ./.local/lib/python3.8/site-packages (from sahi>=0.11.10->yolov5) (2.0.5)
Requirement already satisfied: pybboxes==0.1.6 in ./.local/lib/python3.8/site-packages (from sahi>=0.11.10->yolov5) (0.1.6)
Requirement already satisfied: terminaltables in ./.local/lib/python3.8/site-packages (from sahi>=0.11.10->yolov5) (3.1.10)
Requirement already satisfied: click in /usr/lib/python3/dist-packages (from sahi>=0.11.10->yolov5) (7.0)
Requirement already satisfied: chardet==4.0.0 in ./.local/lib/python3.8/site-packages (from roboflow>=0.2.29->yolov5) (4.0.0)
Requirement already satisfied: opencv-python-headless==4.10.0.84 in ./.local/lib/python3.8/site-packages (from roboflow>=0.2.29->yolov5) (4.10.0.84)
Requirement already satisfied: python-dotenv in ./.local/lib/python3.8/site-packages (from roboflow>=0.2.29->yolov5) (1.0.1)
Requirement already satisfied: requests-toolbelt in ./.local/lib/python3.8/site-packages (from roboflow>=0.2.29->yolov5) (1.0.0)
Requirement already satisfied: filetype in ./.local/lib/python3.8/site-packages (from roboflow>=0.2.29->yolov5) (1.2.0)
Requirement already satisfied: smmap<6,>=3.0.1 in ./.local/lib/python3.8/site-packages (from gitdb<5,>=4.0.1->gitpython>=3.1.30->yolov5) (5.0.1)
Requirement already satisfied: zipp>=3.1.0; python_version < "3.10" in ./.local/lib/python3.8/site-packages (from importlib-resources>=3.2.0; python_version < "3.10"->matplotlib>=3.3->yolov5) (3.19.2)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in ./.local/lib/python3.8/site-packages (from sympy->torch>=1.7.0->yolov5) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in ./.local/lib/python3.8/site-packages (from jinja2->torch>=1.7.0->yolov5) (2.1.5)
Requirement already satisfied: nvidia-nvjitlink-cu12 in ./.local/lib/python3.8/site-packages (from nvidia-cusolver-cu12==11.4.5.107; platform_system == "Linux" and platform_machine == "x86_64"->torch>=1.7.0->yolov5) (12.5.82)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in ./.local/lib/python3.8/site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->yolov5) (5.4.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/lib/python3/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->yolov5) (0.2.1)
Requirement already satisfied: rsa<5,>=3.1.4 in ./.local/lib/python3.8/site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->yolov5) (4.9)
Requirement already satisfied: requests-oauthlib>=0.7.0 in ./.local/lib/python3.8/site-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard>=2.4.1->yolov5) (2.0.0)
Requirement already satisfied: importlib-metadata>=4.4; python_version < "3.10" in ./.local/lib/python3.8/site-packages (from markdown>=2.6.8->tensorboard>=2.4.1->yolov5) (8.0.0)
Requirement already satisfied: pyasn1>=0.1.3 in /usr/lib/python3/dist-packages (from rsa<5,>=3.1.4->google-auth<3,>=1.6.3->tensorboard>=2.4.1->yolov5) (0.4.2)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/lib/python3/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard>=2.4.1->yolov5) (3.1.0)这样算是下好了吗,下好了的话在哪个目录里面呢
-
@小鱼
DeprecationWarning: pkg_resources is deprecated as an API.是这个原因没下载下来吗 -
@LeeSonFirm 这个是下好了,下好了的目录有提示
@LeeSonFirm 在 在使用小鱼的yolov5_ros2功能包时,编译环节出现问题 中说:
Requirement already satisfied: yolov5 in ./.local/lib/python3.8/site-packages (7.0.13)
不过这只是依赖,并不是功能包
-
@小鱼
是的,我找不到yolov5的功能包,请问后续需要怎样操作呢? -
@LeeSonFirm 根据教程下载功能包就可以了
-
@小鱼
我按照教程用那个pip3 install指令没有下载下来,输入代码之后显示的就是我上面发的 -
@小鱼 是需要我去下载您在GitHub上给的yolov5_ros2的源码吗,然后放到这个依赖所在的目录中进行编译?
-
@LeeSonFirm 你看教程,按着教程走就可以了
-
@小鱼 我已经严格按照教程执行,可是输入pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple yolov5之后,我找不到这个功能包,并且无法进行编译
-
@小鱼 不好意思,我是小白,刚接触ros,让您费心了