Conversation
- package.xml + CMakeLists.txt: catkin package definition - ros_nodes/image_publisher.py: loop-publish local images to /camera/image_raw - ros_nodes/perception_node.py: subscribe image, run YOLOv8 inference, publish detections - ros_nodes/control_node.py: subscribe detections, publish brake command - main.launch: roslaunch entry to start all three nodes - main.py + main.sh: unified entry points - config/params.yaml: runtime parameters - data/sample_stop.jpg: synthetic stop sign for demo - demo.gif: ROS pipeline demonstration - README.md: environment, build steps, NN principle, algorithm flow, weight download - Bypass cv_bridge by manually building sensor_msgs/Image (cv_bridge incompatible with OpenCV 5.0.0 in conda env)
Contributor
Author
|
根据维护者反馈,ROS 相关功能应提交到 OpenHUTB/ros2 仓库。本 PR 主动关闭,内容将迁移到 ros2 仓库重新提交。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改概述:
修改内容
新增
src/carla_tsr_ros模块,将 YOLOv8 交通标志识别封装为 ROS Noetic catkin 包,实现从图像输入到控制指令输出的完整话题链路。新增文件
package.xml+CMakeLists.txt:catkin 包定义ros_nodes/image_publisher.py:从本地图片目录循环发布图像到/camera/image_rawros_nodes/perception_node.py:订阅图像,用 YOLOv8n 推理,发布/perception/traffic_signs(JSON)和/perception/annotated_imageros_nodes/control_node.py:订阅检测结果,检测到 stop sign 时发布/vehicle/control_cmd(刹车)main.launch:roslaunch 入口,一键启动三个节点main.py+main.sh:统一入口脚本config/params.yaml:运行时参数data/sample_stop.jpg:合成 stop sign 测试图demo.gif:ROS 流水线演示README.md:运行环境、编译步骤、神经网络原理、算法流程、权重下载说明技术要点
/camera/image_raw→perception_node→/perception/traffic_signs→control_node→/vehicle/control_cmdKeyError: 16),本模块手动构造/解析sensor_msgs/Image消息roslaunch carla_tsr_ros main.launch或bash main.sh运行环境
carla38(Python 3.8.20)运行效果
截图显示
/perception/annotated_image话题的标注图像(YOLO 检测框 +stop sign 0.93),以及 roslaunch 终端持续输出Detected: ['stop sign']。运行步骤
详见
README.md。备注
yolov8n.pt(6.3MB)被仓库根.gitignore的*.pt规则屏蔽,README 中提供了下载地址carla_traffic_sign_recognition(Windows 端 Carla 实时感知,无 ROS)