小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
[FishBotCamera]3.结合YOLO实现检测
-
@小鱼 感谢已经解决
-
-
sudo apt update
sudo apt install python3-pip ros-$ROS_DISTRO-vision-msgs
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple yolov5
为什么运行上面指令之后,我所有曾经成功编译过的代码现在colcon build 之后都会出错了,以前面FishBotCamera为例,我可以成功运行了,但是按照 “3.结合YOLO实现检测”内容操作之后,再运行前面的FishBotCamera,就会出现colcon build 错误,错误指示如下:
tarting >>> fishbot_camera
/home/hance/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
--- stderr: fishbot_camera
/home/hance/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
Traceback (most recent call last):
File "/home/hance/fishbot_ws/src/fishbot_camera/setup.py", line 5, in <module>
setup(
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/init.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 183, in setup
return run_commands(dist)
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
dist.run_commands()
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/dist.py", line 999, in run_command
super().run_command(command)
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 312, in run
self.find_sources()
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 320, in find_sources
mm.run()
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 546, in run
self.prune_file_list()
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/command/sdist.py", line 162, in prune_file_list
super().prune_file_list()
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_list
base_dir = self.distribution.get_fullname()
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 267, in get_fullname
return _distribution_fullname(self.get_name(), self.get_version())
File "/home/hance/.local/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
canonicalize_version(version, strip_trailing_zero=False),
TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'Failed <<< fishbot_camera [4.58s, exited with code 1]
Summary: 0 packages finished [5.19s]
1 package failed: fishbot_camera
1 package had stderr output: fishbot_camera -
-
@小鱼 对的小鱼,应该问题出在了setuptools上,这个需要怎么解决呀?
-
@pengzhju 搜搜默认版本和怎么回退,我帮你看下我的
fishros$ pip list| grep setuptools --- setuptools 59.6.0
-
@小鱼 我的是Ubuntu22.04 humble,是按照图片这个步骤来的,可能我哪里出错了。好的小鱼,我先试一下,谢谢呀
-
@1004461581 请问一下是怎么解决的
-
@小鱼 请问我运行这段命令后就这样不动了是什么原因?
ros2 run yolov5_ros2 yolo_detect_2d --ros-args -p device:=cpu -p image_topic:=/fishbot_camera_raw
/usr/lib/python3/dist-packages/requests/init.py:87: RequestsDependencyWarning: urllib3 (2.2.3) or chardet (4.0.0) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
[INFO] [1732460432.020769982] [yolov5_ros2]: Current ROS 2 distribution: humble
[INFO] [1732460432.127483045] [yolov5_ros2]: default_camera_info: [476.7030836014194, 0.0, 400.5, 0.0, 476.7030836014194, 400.5, 0.0, 0.0, 1.0]
[0.0, 0.0, 0.0, 0.0, 0.0] -
@2290305520 是不是没有图像数据