Skip to content

Commit

Permalink
Code Release 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasroefer committed Oct 15, 2024
1 parent 50c83c6 commit 6072893
Show file tree
Hide file tree
Showing 983 changed files with 34,281 additions and 29,803 deletions.
4 changes: 3 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[Src/**.{h,cpp}]
[Src/**.{h,cpp,mm}]
indent_style = space
indent_size = 2

Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.*
!.editorconfig
!.gitattributes
!.gitignore
!.editorconfig
!.pre-commit-config.yaml
!/Make/*/.vscode
*~
\#*\#
.\#
Expand All @@ -11,6 +13,7 @@
*.kdev4
*.projectile
*.iml
*.opn
GPATH
GRTAGS
GTAGS
Expand All @@ -34,4 +37,3 @@ Thumbs.db
/Util/Buildchain/macOS/bin/cmake
/Util/Buildchain/macOS/include
/Util/Buildchain/macOS/lib
/Util/WSL
120 changes: 120 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# https://pre-commit.com/hooks.html

# Install hooks for the commit message stage too, when using $pre-commit install.
default_install_hook_types: [
pre-commit,
commit-msg
]

# Override all stages default for individual hooks that do not set stages. These hooks would run twice otherwise (during pre-commit and commit-msg stage). If you want to use any other than the following stages for any hook or in any command from the server pipeline, you have to add them here.
default_stages: [
commit,
# commit-msg, # This stage should be excluded specifically, so that the hooks that ran at the commit stage do not run again.
manual,
merge-commit,
# post-checkout, # These other stages can be included, if needed.
# post-commit,
# post-merge,
# post-rewrite,
# prepare-commit-msg
]

# Exclude some folders and symlinks.
exclude: |
(?x)^(
Config/Robots/robots.cfg|
Make/Linux/.idea/|
Make/Linux/CMakeLists.txt|
Make/Python/|
Util/
)
repos:
# - repo: meta # These meta hooks check the pre-commit configuration itself.
# hooks:
# - id: check-hooks-apply # Ensures that the configured hooks apply to at least one file in the repository.
# name: Check that any hook applies
# # - id: check-useless-excludes # Ensures that exclude directives apply to any file in the repository.
# # name: Check for useless excludes
# # - id: identity # A simple hook which prints all arguments passed to it, useful for debugging.

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files # Prevents giant files from being committed.
name: Check for added large files
- id: check-case-conflict # Checks for files that would conflict in case-insensitive filesystems.
name: Check for case conflicts
- id: check-executables-have-shebangs # Ensures that (non-binary) executables have a shebang.
name: Check that executables have shebangs
- id: check-merge-conflict # Checks for files that contain merge conflict strings.
name: Check for merge conflicts
args: [--assume-in-merge]
# - id: check-json # Checks json files for parseable syntax.
# - id: check-symlinks # Checks for symlinks which do not point to anything.
- id: check-xml # Checks xml files for parseable syntax.
name: Check syntax of xml files
- id: check-yaml # Checks yaml files for parseable syntax.
name: Check syntax of yaml files
args: [--unsafe] # Allows object definitions in yaml.
# - id: detect-private-key # Detects the presence of private keys.
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline.
name: Fix newlines at end of files
- id: fix-byte-order-marker # Removes utf-8 byte order marker.
name: Fix UTF-8 byte order markers
- id: mixed-line-ending # Replaces or checks mixed line ending.
name: Check mixed line ending
# - id: requirements-txt-fixer # Sorts entries in requirements.txt.
- id: trailing-whitespace # Trims trailing whitespace.
name: Trim trailing whitespace
args: [--markdown-linebreak-ext=md] # Preserve hard linebreaks in Markdown.
- id: detect-private-key # Detects the presence of private keys.
name: Detect private keys
exclude: ^Install/Keys/

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
hooks:
- id: forbid-crlf # Forbid files containing CRLF end-lines to be committed.
name: Check for CRLF end-lines
- id: remove-crlf # Replace CRLF end-lines by LF ones before committing.
name: Remove CRLF end-lines
- id: forbid-tabs # Forbid files containing tabs to be committed.
name: Check for tabs in files
exclude_types: [plist]
exclude: |
(?x)^(
Config/Scenes/ReplayRobot.con|
Config/Scenes/OtherScenes/SharedAutonomyReplay.con|
Make/|
Util/
)
- id: remove-tabs # Replace tabs by whitespaces before committing.
name: Replace tabs with spaces
args: [--whitespaces-count, '2'] # Defaults to 4.
exclude_types: [plist]
exclude: |
(?x)^(
Config/Scenes/ReplayRobot.con|
Config/Scenes/OtherScenes/SharedAutonomyReplay.con|
Make/|
Util/
)
# You can add false positive detections to Make/Hooks/typos.toml.
- repo: https://github.com/crate-ci/typos
rev: v1.16.21
hooks:
- id: typos
name: Check for misspellings in code
args: [--config=Make/Hooks/typos.toml, --locale=en-us, --no-check-filenames, --force-exclude, --write-changes, --format=long]
stages: [commit] # Select stage, to skip this hook on the server pipeline.

# TODO: Add commit style convention (at least for issue format, e.g. "(#123)"). See: https://www.conventionalcommits.org/
# TODO: Prevent merge commits by supplying the --no-merge-commit argument.
- repo: https://github.com/crate-ci/committed
rev: v1.0.20
hooks:
- id: committed
name: Verify commit message
stages: [commit-msg]
10 changes: 5 additions & 5 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ type: software
authors:
- name: "B-Human Team"
website: "https://b-human.de/team-en.html"
repository-code: "https://github.com/bhuman/BHumanCodeRelease/releases/tag/coderelease2023"
url: "https://wiki.b-human.de/coderelease2023/"
license-url: "https://raw.githubusercontent.com/bhuman/BHumanCodeRelease/coderelease2023/License.md"
version: "2023"
date-released: "2023-10-15"
repository-code: "https://github.com/bhuman/BHumanCodeRelease/releases/tag/coderelease2024"
url: "https://docs.b-human.de/coderelease2024/"
license-url: "https://raw.githubusercontent.com/bhuman/BHumanCodeRelease/coderelease2024/License.md"
version: "2024"
date-released: "2024-10-15"
6 changes: 3 additions & 3 deletions Config/Behavior/FreeKicks/opponentCornerKick.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tactic = t222;

preconditions = {
ballXLE = xPosOwnGroundLine + 1000;
ballXLE = xPosOwnGoalLine + 1000;
ballToOpponentGoalAbsAngleLE = 35deg;
};

Expand Down Expand Up @@ -54,7 +54,7 @@ positions = [
position = forwardL;
pose = {
rotation = 180deg;
translation = { x = xPosHalfWayLine; y = yPosLeftGoalArea; };
translation = { x = xPosHalfwayLine; y = yPosLeftGoalArea; };
};
actions = [
];
Expand All @@ -63,7 +63,7 @@ positions = [
position = forwardR;
pose = {
rotation = 135deg;
translation = { x = xPosHalfWayLine + 1000; y = yPosRightGoalArea; };
translation = { x = xPosHalfwayLine + 1000; y = yPosRightGoalArea; };
};
actions = [
];
Expand Down
8 changes: 4 additions & 4 deletions Config/Behavior/FreeKicks/ownCornerKick.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tactic = t123;

preconditions = {
ballXGE = xPosOpponentGroundLine - 1000;
ballXGE = xPosOpponentGoalLine - 1000;
ballToOpponentGoalAbsAngleGE = 70deg;
};

Expand All @@ -10,7 +10,7 @@ positions = [
{
position = forwardL;
pose = {
translation = { x = xPosOpponentGroundLine; y = yPosLeftSideline; };
translation = { x = xPosOpponentGoalLine; y = yPosLeftTouchline; };
};
actions = [
];
Expand All @@ -36,15 +36,15 @@ positions = [
position = midfielderL;
pose = {
rotation = -30deg;
translation = { x = xPosOpponentPenaltyArea * 0.5; y = yPosLeftSideline - 800; };
translation = { x = xPosOpponentPenaltyArea * 0.5; y = yPosLeftTouchline - 800; };
};
actions = [
];
},
{
position = midfielderR;
pose = {
translation = { x = xPosHalfWayLine + centerCircleRadius; y = 0; };
translation = { x = xPosHalfwayLine + centerCircleRadius; y = 0; };
};
actions = [
];
Expand Down
68 changes: 68 additions & 0 deletions Config/Behavior/FreeKicks/ownCornerKickAttacking.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
tactic = t033;

preconditions =
{
ballXGE = xPosOpponentGoalLine - 1000;
ballToOpponentGoalAbsAngleGE = 70deg;
};

ballSide = left;
positions = [
{
position = forwardL;
pose = {
translation = { x = xPosOpponentGoalLine; y = yPosLeftTouchline; };
};
actions = [
];
},
{
position = forwardM;
pose = {
translation = { x = xPosOpponentPenaltyMark; y = yPosLeftGoalArea; };
};
actions = [
];
},
{
position = forwardR;
pose = {
rotation = 90deg;
translation = { x = xPosOpponentPenaltyArea; y = yPosRightPenaltyArea; };
};
actions = [
];
},
{
position = midfielderL;
pose = {
rotation = -30deg;
translation = { x = xPosOpponentPenaltyArea * 0.5; y = yPosLeftTouchline - 800; };
};
actions = [
];
},
{
position = midfielderR;
pose = {
translation = { x = xPosHalfwayLine + centerCircleRadius; y = 0; };
};
actions = [
];
}
];
priorityGroups = [
{
positions = [forwardL];
priorities = [0];
},
{
positions = [midfielderL, midfielderR];
priorities = [1, 1];
},
{
positions = [forwardR, forwardM, defenderL];
priorities = [2, 2, 2];
}
];
startPosition = forwardL;
2 changes: 1 addition & 1 deletion Config/Behavior/FreeKicks/ownGoalKick.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ positions = [
position = midfielderL;
pose = {
rotation = -135deg;
translation = { x = xPosOwnPenaltyArea + 1000; y = yPosLeftSideline - 400; };
translation = { x = xPosOwnPenaltyArea + 1000; y = yPosLeftTouchline - 400; };
};
actions = [
];
Expand Down
74 changes: 74 additions & 0 deletions Config/Behavior/FreeKicks/ownKickInOpponentHalf.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
tactic = t123;

preconditions = {
ballXGE = xPosHalfwayLine;
ballXLE = xPosOpponentPenaltyArea;
ballYAbsGE = yPosLeftPenaltyArea;
};

ballSide = left;
positions = [
{
position = midfielderR;
pose = {
rotation = 90deg;
translation = { x = centerCircleRadius; y = 0; };
};
actions = [
];
},
{
position = midfielderL;
pose = {
rotation = 0deg;
translation = { x = -centerCircleRadius; y = yPosLeftPenaltyArea; };
};
actions = [
];
},
{
position = forwardR;
pose = {
rotation = 90deg;
translation = { x = xPosOpponentPenaltyArea; y = yPosRightPenaltyArea; };
};
actions = [
];
},
{
position = forwardM;
pose = {
rotation = 90deg;
translation = { x = xPosOpponentPenaltyMark; y = yPosLeftGoalArea; };
};
actions = [
];
},
{
position = forwardL;
pose = {
rotation = 0deg;
translation = { x = xPosOpponentGoalLine * 0.3; y = yPosLeftTouchline; };
};
actions = [
];
}
];
priorityGroups = [
{
positions = [forwardL];
priorities = [3];
},
{
positions = [defenderL, forwardM];
priorities = [0, 0];
},
{
positions = [midfielderR];
priorities = [1];
},
{
positions = [midfielderL, forwardR];
priorities = [2, 2];
}
];
Loading

0 comments on commit 6072893

Please sign in to comment.