No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro kilted. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
![]() |
tup-vision-2023-based repositorycamera_driver global_interface global_user serialport armor_detector armor_processor buff_detector buff_processor buff filter |
Repository Summary
Description | 沈阳航空航天大学TUP战队2023视觉程序 |
Checkout URI | https://github.com/tup-robomaster/tup-vision-2023-based.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2024-05-23 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
Name | Version |
---|---|
camera_driver | 0.0.0 |
global_interface | 0.0.0 |
global_user | 0.0.0 |
serialport | 0.0.0 |
armor_detector | 0.0.0 |
armor_processor | 0.0.0 |
buff_detector | 0.0.0 |
buff_processor | 0.0.0 |
buff | 0.0.0 |
filter | 0.0.0 |
README
TUP-Vision-2023-Based
沈阳航空航天大学TUP战队2023赛季视觉基础程序开发仓库
Version
V3.0
程序基于ros-galactic框架
1.Brief
程序整体架构采用前后端分离的模式,以实现更加高效的模块化编程。自瞄分为检测模块和预测模块,检测节点订阅相机图像并将图像送入网络推理输出目标信息,预测节点则订阅目标信息并进行跟踪预测。
功能模块流程图:
2.Introduction
- Packages
Name | Function | Description |
---|---|---|
global_user | 定义全局接口 | 包含通用函数/结构体/枚举类型 |
global_interface | 自定义消息 | 全局msg定义 |
serialport | 串口驱动 | 定义与下位机的通信协议 |
camera_driver | 相机驱动 | 包含大恒/海康/USB相机驱动接口 |
armor_detector | 装甲板检测节点 | 识别出待打击目标 |
armor_processor | 装甲板预测节点 | 对待打击目标进行预测 |
buff_detector | 能量机关检测节点 | 识别出待打击扇叶 |
buff_processor | 能量机关预测节点 | 对待打击扇叶进行预测 |
- Custom messages
Message | Topic | Description |
---|---|---|
Autoaim.msg | /armor_detector/armor_msg | 目标装甲板消息 |
Buff.msg | /buff_detector/buff_msg | 目标能量机关消息 |
CarPos.msg | /car_pos | 车辆位置消息 |
Decision.msg | /robot_decision/decision | 决策消息 |
DetectorArray.msg | /armor_detector/detections | 目标消息 |
GameInfo.msg | /game_info | 比赛消息(下位机从裁判系统读入) |
Gimbal.msg | /armor_processor/gimbal_msg /armor_processor/tracking_msg /buff_processor/gimbal_msg /buff_processor/tracking_msg | 云台消息(自瞄控制消息) |
ObjHP.msg | /obj_hp | 目标血量消息(从裁判系统读入) |
Serial.msg | /serial_msg | 串口消息 |
3.Environment
Library | URL | Description |
---|---|---|
OpenVINO | https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html | 目前使用的版本是OpenVINO2022.1,直接offline下载一键安装即可,需要给权限 |
glog | https://github.com/google/glog/releases/tag/v0.5.0 | |
yaml-cpp | https://github.com/jbeder/yaml-cpp/releases/tag/yaml-cpp-0.5.3 | 需指定将yaml-cpp库编译成共享库 |
Ceres | http://ceres-solver.org/installation.html | Click “latest stable release” |
Eigen | https://gitlab.com/libeigen/eigen/-/releases/3.4.0 | 编译此库前首先对ceres库进行编译 |
OpenCV | https://github.com/opencv/opencv/tree/4.2.0 \ https://github.com/opencv/opencv_contrib/tree/4.x | 编译时两个包放一块,注意编译时需传入指定参数 |
海康相机库 | https://www.hikrobotics.com/cn/machinevision/service/download?module=0 | 编译安装时给权限 |
大恒相机库 | https://www.daheng-imaging.com/index.php?m=content&c=index&a=lists&catid=59&czxt=9&sylx=21&syxj=44#mmd | 编译安装时给权限 |
4.Debug
- Prepare
- 参数配置文件位置:src/global_user/config/autoaim.yaml(参数配置详解见:Autoaim_Config )
- 对应的launch文件位置:src/global_user/launch/autoaim_bringup.launch.py
- 首先根据实际情况更改相机类型(camera_type)和型号(camera_name)(包括armor_detector空间和armor_processor空间下对应的参数),调试视频则把camera_type赋为3;
- 与下位机通信调试时将配置文件中的using_imu参数改为true,同时把launch文件中的using_imu参数置为True;
- 调试的参数主要是CS模型(singer_model)和IMM模型对应的参数(trans_prob_matrix\model_prob_vector\process_noise\measure_noise)。
- Compile
-
colcon build –symlink-install . install/setup.bash
-
- Command
-
ros2 launch global_user autoaim_bringup.launch.py
-
- Startup
-
Step1:设置shell脚本权限
sudo chmod 777 your_shell_script_path
-
Step2:配置程序启动首选项
gnome-terminal -- your_shell_script_path
- Log
-
日志保存路径设置
sudo gedit ~/.bashrc export ROS_HOME=~/ros_logs #### 2.能量机关调试
- Prepare
- 参数配置文件位置:src/global_user/config/buff.yaml
- 对应的launch文件位置:src/global_user/launch/buff_bringup.launch.py
- 首先根据实际情况更改相机类型(camera_type)和型号(camera_name)(包括buff_detector空间和buff_processor空间下对应的参数),调试视频则把camera_type赋为3,同时更改launch文件中的相机类型;
- 与下位机通信调试时将配置文件中的using_imu参数改为true,同时把launch文件中的using_imu参数置为True;
- 调试时可以适当修改时间延迟量(delay_small和delay_big)。
File truncated at 100 lines see the full file
CONTRIBUTING
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.
No version for distro noetic. Known supported distros are highlighted in the buttons above.