Skip to content

Commit 36dfb7d

Browse files
committed
merging
2 parents 3271818 + 31720f6 commit 36dfb7d

416 files changed

Lines changed: 6440 additions & 8488 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ BreakBeforeBraces: Allman
1515
BreakStringLiterals: 'false'
1616
ColumnLimit: '90'
1717
Cpp11BracedListStyle: 'true'
18+
DerivePointerAlignment: 'false'
1819
IncludeBlocks: Regroup
1920
IndentCaseLabels: 'true'
2021
IndentWidth: '4'

docs/getting-started.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -280,24 +280,12 @@ Now that you're setup, if you can run it on the command line, you can run it in
280280
- Xbox control allows us to use a connected Xbox controller to control the robots
281281
4. Run our SimulatedPlayTests in Thunderscope
282282
- This will launch the visualizer and simulate AI Plays, allowing us to visually see the robots acting according to their roles.
283-
1. For legacy C++ tests (#2581) with the visualizer:
284-
1. First run Thunderscope configured for receiving protobufs over unix sockets correctly: `./tbots.py run thunderscope_main --visualize_cpp_test`
285-
2. Then run `./tbots.py test [some_target_here] --run_sim_in_realtime`
286-
2. For PyTests:
287-
- With the visualizer: `./tbots.py test [some_target_here] -t`
288-
- Without the visualizer: `./tbots.py test [some_target_here]`
289-
3. For legacy C++ tests (#2581) without the visualizer:
290-
- `./tbots.py test [some_target_here]`
283+
- With the visualizer: `./tbots.py test [some_target_here] -t`
284+
- Without the visualizer: `./tbots.py test [some_target_here]`
291285
5. Run our SimulatedTacticTests in Thunderscope:
292286
- This will launch the visualizer and simulate an AI Tactic on a single robot
293-
1. For legacy C++ tests (#2581) with the visualizer:
294-
- First, run Thunderscope configured for receiving protobufs over unix sockets correctly: `./tbots.py run thunderscope_main --visualize_cpp_test`
295-
- Then run `./tbots.py test [some_target_here] --run_sim_in_realtime`
296-
2. For PyTests:
297-
- With the visualizer: `./tbots.py test [some_target_here] -t`
298-
- Without the visualizer: `./tbots.py test [some_target_here]`
299-
3. For legacy C++ tests (#2581) without the visualizer:
300-
- `./tbots.py test [some_target_here]`
287+
- With the visualizer: `./tbots.py test [some_target_here] -t`
288+
- Without the visualizer: `./tbots.py test [some_target_here]`
301289

302290
## Debugging
303291

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
ansible-lint==24.12.2
1+
ansible-lint==26.4.0
22
pyqtgraph==0.13.7
33
thefuzz==0.19.0
4-
iterfzf==0.5.0.20.0
4+
iterfzf==1.9.0.67.0
55
python-Levenshtein==0.25.1
66
psutil==5.9.0
77
PyOpenGL==3.1.6
@@ -10,4 +10,3 @@ pyqt-toast-notification==1.3.2
1010
grpcio-tools==1.71.0
1111
platformio==6.1.18
1212
pyqt6==6.9.1
13-

environment_setup/setup_software_mac.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ print_status_msg "Setting Up Python Environment"
5151

5252
# Create virtual environment
5353
sudo python3.12 -m venv /opt/tbotspython
54-
chmod
5554
source /opt/tbotspython/bin/activate
5655

5756
# Install Python dependencies
@@ -69,6 +68,10 @@ sudo chmod +x "$CURR_DIR/../src/software/autoref/run_autoref.sh"
6968
sudo cp "$CURR_DIR/../src/software/autoref/DIV_B.txt" "/opt/tbotspython/autoReferee/config/geometry/DIV_B.txt"
7069
print_status_msg "Finished setting up AutoRef"
7170

71+
print_status_msg "Install clang-format"
72+
install_clang_format $sys
73+
print_status_msg "Done installing clang-format"
74+
7275
print_status_msg "Setting up cross compiler for robot software"
7376
install_cross_compiler $sys
7477
print_status_msg "Done setting up cross compiler for robot software"

environment_setup/ubuntu24_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ansible-lint==25.8.1
1+
ansible-lint==26.4.0
22
pyqtgraph==0.13.7
33
thefuzz==0.19.0
44
iterfzf==0.5.0.20.0

environment_setup/util.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ install_bazel() {
2929
}
3030

3131
install_clang_format() {
32-
ln -s /usr/bin/clang-format-14 /opt/tbotspython/bin/clang-format
32+
if is_darwin $1; then
33+
ln -s /opt/homebrew/bin/clang-format /opt/tbotspython/bin/clang-format
34+
else
35+
ln -s /usr/bin/clang-format-14 /opt/tbotspython/bin/clang-format
36+
fi
3337
}
3438

3539
install_cross_compiler() {

scripts/lint_and_format.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function run_clang_format () {
2525
cd $BAZEL_ROOT_DIR
2626

2727
# Generate extension string
28-
# Formatted as -iname *.EXTENSION -o
28+
# Formatted as -name *.EXTENSION -o
2929
EXTENSION_STRING=""
3030
for value in "${CLANG_FORMAT_EXTENSIONS[@]}"
3131
do
@@ -35,8 +35,8 @@ function run_clang_format () {
3535
# Find all the files that we want to format, and pass them to
3636
# clang-format as arguments
3737
# We remove the last -o flag from the extension string
38-
find $CURR_DIR/../src/ ${EXTENSION_STRING::-2} \
39-
| xargs -I{} -n1000 $CLANG_BIN -i -style=file:$CURR_DIR/../.clang-format
38+
find $CURR_DIR/../src ${EXTENSION_STRING% -o} \
39+
| xargs $CLANG_BIN -i -style=file:$CURR_DIR/../.clang-format
4040

4141
if [[ "$?" != 0 ]]; then
4242
printf "\n***Failed to run clang-format over all files!***\n\n"

src/.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ build --cxxopt="-DG3_DYNAMIC_LOGGING"
7575
build --per_file_copt=.*\.pb\.(h|cc|cpp)$@-w
7676
build --per_file_copt=./external/.*,./bazel-out/.*@-w
7777

78+
# Define Robot Versions
79+
build --copt="-DCURRENT_ROBOT_VERSION=2026"
80+
7881
############## External Deps Compatibility ##############
7982
build --noincompatible_disallow_ctx_resolve_tools
8083
build --check_direct_dependencies=off

src/MODULE.bazel

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,13 @@ use_repo(
137137
"boost",
138138
)
139139

140-
bazel_dep(name = "hedron_compile_commands", version = "1.0.5", dev_dependency = True)
140+
# Temporary workaround while https://github.com/hedronvision/bazel-compile-commands-extractor/pull/219 is not merged
141+
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
141142
archive_override(
142143
module_name = "hedron_compile_commands",
143-
sha256 = "658122cfb1f25be76ea212b00f5eb047d8e2adc8bcf923b918461f2b1e37cdf2",
144-
strip_prefix = "bazel-compile-commands-extractor-4f28899228fb3ad0126897876f147ca15026151e",
145-
url = "https://github.com/hedronvision/bazel-compile-commands-extractor/archive/4f28899228fb3ad0126897876f147ca15026151e.tar.gz",
144+
sha256 = "ba3feefdf57b6d4c749e3c4abfa86f3673e7db364cb13acfc3496dce6ea801a3",
145+
strip_prefix = "bazel-compile-commands-extractor-f5fbd4cee671d8d908f37c83abaf70fba5928fc7",
146+
url = "https://github.com/mikael-s-persson/bazel-compile-commands-extractor/archive/f5fbd4cee671d8d908f37c83abaf70fba5928fc7.tar.gz",
146147
)
147148

148149
bazel_dep(name = "platformio_rules", repo_name = "platformio_rules")

src/cli/cli_params.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ class DebugBinary(str, Enum):
8686
]
8787

8888
EnableThunderscopeOption = Annotated[bool, Option("-t", "--enable_thunderscope")]
89-
EnableVisualizerOption = Annotated[bool, Option("-v", "--enable_visualizer")]
9089
StopAIOnStartOption = Annotated[bool, Option("-s", "--stop_ai_on_start")]
9190

9291
JobsOption = Annotated[str, Option("-j", "--jobs")]

0 commit comments

Comments
 (0)