-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f3624fa
commit 018942f
Showing
59 changed files
with
2,895 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
|
||
AccessModifierOffset: -2 | ||
AlignAfterOpenBracket: AlwaysBreak | ||
BraceWrapping: | ||
AfterClass: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
BreakBeforeBraces: Custom | ||
ColumnLimit: 100 | ||
ConstructorInitializerIndentWidth: 0 | ||
ContinuationIndentWidth: 2 | ||
DerivePointerAlignment: false | ||
PointerAlignment: Middle | ||
ReflowComments: false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
Checks: '-*, | ||
performance-*, | ||
-performance-unnecessary-value-param, | ||
llvm-namespace-comment, | ||
modernize-redundant-void-arg, | ||
modernize-use-nullptr, | ||
modernize-use-default, | ||
modernize-use-override, | ||
modernize-loop-convert, | ||
modernize-make-shared, | ||
modernize-make-unique, | ||
misc-unused-parameters, | ||
readability-named-parameter, | ||
readability-redundant-smartptr-get, | ||
readability-redundant-string-cstr, | ||
readability-simplify-boolean-expr, | ||
readability-container-size-empty, | ||
readability-identifier-naming, | ||
' | ||
HeaderFilterRegex: '' | ||
AnalyzeTemporaryDtors: false | ||
CheckOptions: | ||
- key: llvm-namespace-comment.ShortNamespaceLines | ||
value: '10' | ||
- key: llvm-namespace-comment.SpacesBeforeComments | ||
value: '2' | ||
- key: misc-unused-parameters.StrictMode | ||
value: '1' | ||
- key: readability-braces-around-statements.ShortStatementLines | ||
value: '2' | ||
# type names | ||
- key: readability-identifier-naming.ClassCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.EnumCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.UnionCase | ||
value: CamelCase | ||
# method names | ||
- key: readability-identifier-naming.MethodCase | ||
value: camelBack | ||
# variable names | ||
- key: readability-identifier-naming.VariableCase | ||
value: lower_case | ||
- key: readability-identifier-naming.ClassMemberSuffix | ||
value: '_' | ||
# const static or global variables are UPPER_CASE | ||
- key: readability-identifier-naming.EnumConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.StaticConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.ClassConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.GlobalVariableCase | ||
value: UPPER_CASE |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build and Test (humble) | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Setup ROS 2 | ||
uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: humble | ||
- name: Build rm_auto_aim | ||
uses: ros-tooling/[email protected] | ||
with: | ||
package-name: rm_auto_aim | ||
target-ros2-distro: humble | ||
skip-tests: true | ||
- name: Test armor_detector | ||
run: | | ||
source /opt/ros/humble/setup.sh | ||
cd ros_ws | ||
colcon test --packages-select armor_detector --event-handlers console_cohesion+ --return-code-on-test-failure | ||
- name: Test armor_tracker | ||
run: | | ||
source /opt/ros/humble/setup.sh | ||
cd ros_ws | ||
colcon test --packages-select armor_tracker --event-handlers console_cohesion+ --return-code-on-test-failure |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
|
||
# Created by https://www.gitignore.io/api/c++,linux,macos,clion | ||
# Edit at https://www.gitignore.io/?templates=c++,linux,macos,clion | ||
|
||
### C++ ### | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
### CLion ### | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/**/usage.statistics.xml | ||
.idea/**/dictionaries | ||
.idea/**/shelf | ||
|
||
# Generated files | ||
.idea/**/contentModel.xml | ||
|
||
# Sensitive or high-churn files | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
.idea/**/dbnavigator.xml | ||
|
||
# Gradle | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# Gradle and Maven with auto-import | ||
# When using Gradle or Maven with auto-import, you should exclude module files, | ||
# since they will be recreated, and may cause churn. Uncomment if using | ||
# auto-import. | ||
# .idea/modules.xml | ||
# .idea/*.iml | ||
# .idea/modules | ||
# *.iml | ||
# *.ipr | ||
|
||
# CMake | ||
cmake-build-*/ | ||
|
||
# Mongo Explorer plugin | ||
.idea/**/mongoSettings.xml | ||
|
||
# File-based project format | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
# Editor-based Rest Client | ||
.idea/httpRequests | ||
|
||
# Android studio 3.1+ serialized cache file | ||
.idea/caches/build_file_checksums.ser | ||
|
||
### CLion Patch ### | ||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 | ||
|
||
# *.iml | ||
# modules.xml | ||
# .idea/misc.xml | ||
# *.ipr | ||
|
||
# Sonarlint plugin | ||
.idea/**/sonarlint/ | ||
|
||
# SonarQube Plugin | ||
.idea/**/sonarIssues.xml | ||
|
||
# Markdown Navigator plugin | ||
.idea/**/markdown-navigator.xml | ||
.idea/**/markdown-navigator/ | ||
|
||
### Linux ### | ||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
# End of https://www.gitignore.io/api/c++,linux,macos,clion |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# rm_auto_aim | ||
|
||
## Overview | ||
|
||
RoboMaster 装甲板自瞄算法模块 | ||
|
||
<img src="docs/rm_vision.svg" alt="rm_vision" width="200" height="200"> | ||
|
||
该项目为 [rm_vision](https://github.com/chenjunnn/rm_vision) 的子模块 | ||
|
||
若有帮助请Star这个项目,感谢~ | ||
|
||
### License | ||
|
||
The source code is released under a [MIT license](rm_auto_aim/LICENSE). | ||
|
||
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) | ||
|
||
Author: Chen Jun | ||
|
||
运行环境:Ubuntu 22.04 / ROS2 Humble (未在其他环境下测试) | ||
|
||
![Build Status](https://github.com/chenjunnn/rm_auto_aim/actions/workflows/ros_ci.yml/badge.svg) | ||
|
||
## Building from Source | ||
|
||
### Building | ||
|
||
在 Ubuntu 22.04 环境下安装 [ROS2 Humble](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html) | ||
|
||
创建 ROS 工作空间后 clone 项目,使用 rosdep 安装依赖后编译代码 | ||
|
||
cd ros_ws/src | ||
git clone https://github.com/chenjunnn/rm_auto_aim.git | ||
cd .. | ||
rosdep install --from-paths src --ignore-src -r -y | ||
colcon build --symlink-install --packages-up-to auto_aim_bringup | ||
|
||
### Testing | ||
|
||
Run the tests with | ||
|
||
colcon test --packages-up-to auto_aim_bringup | ||
|
||
## Packages | ||
|
||
- [armor_detector](armor_detector) | ||
|
||
订阅相机参数及图像流进行装甲板的识别并解算三维位置,输出识别到的装甲板在输入frame下的三维位置 (一般是以相机光心为原点的相机坐标系) | ||
|
||
- [armor_tracker](armor_tracker) | ||
|
||
订阅识别节点发布的装甲板三维位置及机器人的坐标转换信息,将装甲板三维位置变换到指定惯性系(一般是以云台中心为原点,IMU 上电时的 Yaw 朝向为 X 轴的惯性系)下,然后将装甲板目标送入跟踪器中,输出跟踪机器人在指定惯性系下的状态 | ||
|
||
- auto_aim_interfaces | ||
|
||
定义了识别节点和处理节点的接口以及定义了用于 Debug 的信息 | ||
|
||
- auto_aim_bringup | ||
|
||
包含启动识别节点和处理节点的默认参数文件及 launch 文件 |
Oops, something went wrong.