Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d81ffd8
SCRIPT Move subprojects
pjreiniger Nov 8, 2025
32352bb
SCRIPT fixup project rename
pjreiniger Nov 8, 2025
0eafe15
SCRIPT Move cc files
pjreiniger Nov 8, 2025
609554c
SCRIPT Move java files
pjreiniger Nov 8, 2025
703f327
SCRIPT Generic Renames
pjreiniger Nov 8, 2025
dc72cfb
SCRIPT Run java package replacements
pjreiniger Nov 8, 2025
2dcffa6
SCRIPT Run cc include replacements
pjreiniger Nov 8, 2025
700ffd1
HAND FIX - Fixup bazel files
pjreiniger Nov 8, 2025
85fe3bb
HAND FIX - Fixup pregen files
pjreiniger Nov 8, 2025
3d50aff
SCRIPT: Pregenerate files
pjreiniger Nov 8, 2025
692fd6a
HAND FIXES: Fixup java and python compilation
pjreiniger Nov 8, 2025
3399ea5
HAND FIXES: Fixup gradle / cmake / styleguide
pjreiniger Nov 8, 2025
4cb7339
SCRIPT: Spotless Apply
pjreiniger Nov 8, 2025
59195a4
SCRIPT: wpiformat
pjreiniger Nov 8, 2025
d45d53c
HAND FIXES: Fix upstream util scripts
pjreiniger Nov 8, 2025
2df0bf1
SCRIPT run upstream utils
pjreiniger Nov 8, 2025
7ad5948
HAND FIXES: Fixup remaining rename issues
pjreiniger Nov 8, 2025
5f449e5
HAND FIX: Fix robotpy yaml files
pjreiniger Nov 8, 2025
339f6fc
SCRIPT: Placeholder for robotpy compilation
pjreiniger Nov 8, 2025
f996fb7
SCRIPT: Placeholder for robotpy compilation
pjreiniger Nov 8, 2025
0d04e57
HAND FIXES: Update upstream for namespace changes
pjreiniger Nov 8, 2025
62e5e52
SCRIPT namespace replacements
pjreiniger Nov 8, 2025
b9b6a6c
SCRIPT run upstream utils
pjreiniger Nov 8, 2025
2021cf9
HAND FIXES: Update build scripts for namespaces
pjreiniger Nov 8, 2025
d633f4b
HAND FIXES: Manual cleanup of namespaces
pjreiniger Nov 8, 2025
ddf86e5
HAND FIXES: Update maven info
pjreiniger Nov 8, 2025
c49bfc6
SCRIPT: 'edu.wpi.first' replacements
pjreiniger Nov 8, 2025
ed0c4af
SCRIPT: FRC_ replacements
pjreiniger Nov 8, 2025
8fb9175
HAND FIX final frc:: replacements
pjreiniger Nov 8, 2025
37fd431
HAND FIX: final java package changes
pjreiniger Nov 8, 2025
66cd4b5
HAND FIXES: Fix ntcoreffi
pjreiniger Nov 8, 2025
01692c7
HAND FIX: Fixup robotpy yaml files
pjreiniger Nov 8, 2025
b2dcc62
SCRIPT: Spotless Apply
pjreiniger Nov 8, 2025
51d4a4b
SCRIPT: wpiformat
pjreiniger Nov 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ apriltag/bin
cameraserver/bin
cameraserver/multiCameraServer/bin
cscore/bin
fieldImages/bin
fields/bin
hal/bin
developerRobot/bin
ntcore/bin
romiVendordep/bin
wpilibNewCommands/bin
commandsv2/bin
wpilibj/bin
wpimath/bin
wpinet/bin
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/simulation/ @wpilibsuite/simulation

/wpilibNewCommands/ @wpilibsuite/commandbased
/commandsv2/ @wpilibsuite/commandbased

/wpilibcExamples/ @wpilibsuite/wpilib @wpilibsuite/documentation

Expand Down
4 changes: 2 additions & 2 deletions .github/actions/pregen/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
run: |
./wpilibc/generate_hids.py
./wpilibj/generate_hids.py
./wpilibNewCommands/generate_hids.py
./commandsv2/generate_hids.py
shell: bash

- name: Regenerate PWM motor controllers
Expand All @@ -43,7 +43,7 @@ runs:
shell: bash

- name: Regenerate mrcal minimath
run: ./wpical/generate_mrcal.py
run: ./tools/wpical/generate_mrcal.py
shell: bash

- name: Regenerate wpimath
Expand Down
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- any-glob-to-any-file: apriltag/**
'component: command-based':
- changed-files:
- any-glob-to-any-file: wpilibNewCommands/**
- any-glob-to-any-file: commandsv2/**
'component: cscore':
- changed-files:
- any-glob-to-any-file: cscore/**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/command-robotpy-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types:
- opened
paths:
- 'wpilibNewCommands/src/**/*.java'
- 'commandsv2/src/**/*.java'

jobs:
comment:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: tsan
cmake-flags: "-DCMAKE_BUILD_TYPE=Tsan"
ctest-env: "TSAN_OPTIONS=second_deadlock_stack=1"
ctest-flags: "-E 'cscore|cameraserver|wpilibc|wpilibNewCommands'"
ctest-flags: "-E 'cscore|cameraserver|wpilibc|commandsv2'"
- name: ubsan
cmake-flags: "-DCMAKE_BUILD_TYPE=Ubsan"
ctest-env: ""
Expand Down
9 changes: 1 addition & 8 deletions .styleguide
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ modifiableFileExclude {
generatedFileExclude {
FRCNetComm\.java$
simulation/gz_msgs/src/include/simulation/gz_msgs/msgs\.h$
fieldImages/src/main/native/resources/
fields/src/main/native/resources/
apriltag/src/test/resources/
wpilibc/src/generated/

Expand All @@ -43,20 +43,13 @@ includeOtherLibs {
^fmt/
^glass/
^gtest/
^hal/
^imgui
^implot
^mockdata/
^networktables/
^ntcore
^opencv2/
^support/
^units/
^unsupported/
^upb/
^vision/
^wpi/
^wpigui
^wpimath/
^wpinet/
}
20 changes: 10 additions & 10 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ write_source_files(
"//wpilibcExamples:write_example_project_list",
"//wpilibj:write_wpilibj",
"//wpilibjExamples:write_example_project_list",
"//wpilibNewCommands:write_wpilib_new_commands",
"//commandsv2:write_wpilib_new_commands",
"//commandsv3:write_commandsv3",
"//wpimath:write_wpimath",
"//wpiunits:write_wpiunits",
Expand All @@ -70,12 +70,12 @@ publish_all(
"//cscore:cscore-java_publish.publish",
"//datalog:datalog-cpp_publish.publish",
"//datalog:datalog-java_publish.publish",
"//datalogtool:datalogtool_publish.publish",
"//tools/datalogtool:datalogtool_publish.publish",
"//docs:wpilibj_publish.publish",
"//epilogue-processor:processor-java_publish.publish",
"//epilogue-runtime:epilogue-java_publish.publish",
"//fieldImages:fieldImages-cpp_publish.publish",
"//fieldImages:fieldImages-java_publish.publish",
"//fields:fields-cpp_publish.publish",
"//fields:fields-java_publish.publish",
"//glass:glass-cpp_publish.publish",
"//glass:glassapp_publish.publish",
"//glass:glassnt-cpp_publish.publish",
Expand All @@ -84,8 +84,8 @@ publish_all(
"//ntcore:ntcore-cpp_publish.publish",
"//ntcore:ntcore-java_publish.publish",
"//ntcoreffi:ntcoreffi-cpp_publish.publish",
"//outlineviewer:outlineviewer_publish.publish",
"//processstarter:processstarter_publish.publish",
"//tools/outlineviewer:outlineviewer_publish.publish",
"//tools/processstarter:processstarter_publish.publish",
"//romiVendordep:romiVendordep-cpp_publish.publish",
"//romiVendordep:romiVendordep-java_publish.publish",
"//simulation/halsim_ds_socket:halsim_ds_socket-cpp_publish.publish",
Expand All @@ -94,13 +94,13 @@ publish_all(
"//simulation/halsim_ws_core:halsim_ws_core-cpp_publish.publish",
"//simulation/halsim_ws_server:halsim_ws_server-cpp_publish.publish",
"//simulation/halsim_xrp:halsim_xrp-cpp_publish.publish",
"//sysid:sysid_publish.publish",
"//tools/sysid:sysid_publish.publish",
"//thirdparty/googletest:googletest-cpp_publish.publish",
"//thirdparty/imgui_suite:imguiSuite-cpp_publish.publish",
"//wpical:wpical_publish.publish",
"//tools/wpical:wpical_publish.publish",
"//wpigui:wpigui-cpp_publish.publish",
"//wpilibNewCommands:wpilibNewCommands-cpp_publish.publish",
"//wpilibNewCommands:wpilibNewCommands-java_publish.publish",
"//commandsv2:commandsv2-cpp_publish.publish",
"//commandsv2:commandsv2-java_publish.publish",
"//commandsv3:commandsv3-java_publish.publish",
"//wpilibc:wpilibc-cpp_publish.publish",
"//wpilibcExamples:commands_publish.publish",
Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,17 @@ if(WITH_WPIUNITS AND NOT WITH_WPIMATH)
endif()

if(WITH_GUI)
add_subdirectory(fieldImages)
add_subdirectory(fields)
add_subdirectory(thirdparty/imgui_suite)
add_subdirectory(wpigui)
add_subdirectory(glass)
add_subdirectory(outlineviewer)
add_subdirectory(sysid)
add_subdirectory(tools/outlineviewer)
add_subdirectory(tools/sysid)
if(WITH_WPICAL)
add_subdirectory(wpical)
add_subdirectory(tools/wpical)
endif()
if(LIBSSH_FOUND)
add_subdirectory(datalogtool)
add_subdirectory(tools/datalogtool)
endif()
endif()

Expand All @@ -349,12 +349,12 @@ if(WITH_WPILIB)
set(COMMANDSV3_DEP_REPLACE "find_dependency(commandsv3)")
set(WPILIBC_DEP_REPLACE "find_dependency(wpilibc)")
set(WPILIBJ_DEP_REPLACE "find_dependency(wpilibj)")
set(WPILIBNEWCOMMANDS_DEP_REPLACE "find_dependency(wpilibNewCommands)")
set(COMMAND_DEP_REPLACE "find_dependency(commandsv2)")
add_subdirectory(apriltag)
add_subdirectory(wpilibj)
add_subdirectory(wpilibc)
add_subdirectory(commandsv3) # must be after wpilibj
add_subdirectory(wpilibNewCommands)
add_subdirectory(commandsv2)
add_subdirectory(romiVendordep)
add_subdirectory(xrpVendordep)
if(WITH_EXAMPLES)
Expand Down
4 changes: 2 additions & 2 deletions GeneratedFiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ The Python script used to generate a subproject's files will always be located i

The templates will be located under `subproject/src/generate/main`, and generated files will be located under `subproject/src/generated/main`.

If the generated file is for C++, the hierarchy should be symmetrical, so if a generated header is located under `subproject/src/generated/main/native/include/frc/header.h`, the template to generate it should be located under `subproject/src/generate/main/native/include/frc/template.h.jinja`. You should pretend like `subproject/src/generate/main` is just like `subproject/src/main`, in that the file hierarchy must make sense if the files weren't generated, e.g, headers that would go in `subproject/src/main/native/include/blah` should be in `subproject/src/generated/main/native/include/blah`.
If the generated file is for C++, the hierarchy should be symmetrical, so if a generated header is located under `subproject/src/generated/main/native/include/wpi/header.h`, the template to generate it should be located under `subproject/src/generate/main/native/include/wpi/template.h.jinja`. You should pretend like `subproject/src/generate/main` is just like `subproject/src/main`, in that the file hierarchy must make sense if the files weren't generated, e.g, headers that would go in `subproject/src/main/native/include/blah` should be in `subproject/src/generated/main/native/include/blah`.

If the generated file is for Java, templates should be located under `subproject/src/generate/main/java`, and the hierarchy for output files should reflect the declared package of the output Java files. For example, a Jinja template at `subproject/src/main/java/template.java.jinja` with the package `edu.wpi.first.wpilibj` would be used to generate Java files located at `subproject/src/generated/main/java/edu/wpi/first/wpilibj`
If the generated file is for Java, templates should be located under `subproject/src/generate/main/java`, and the hierarchy for output files should reflect the declared package of the output Java files. For example, a Jinja template at `subproject/src/main/java/template.java.jinja` with the package `org.wpilib.wpilibj` would be used to generate Java files located at `subproject/src/generated/main/java/org/wpilib/wpilibj`

The JSON files live under `subproject/src/generate` since they apply to both languages. One unique case is JSON files that are used by multiple subprojects, currently only JSON files shared by wpilibc and wpilibj. In that specific case, the JSON files will always be located in wpilibj since Java is the most used language.

Expand Down
2 changes: 1 addition & 1 deletion MavenArtifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ All artifacts are based at `edu.wpi.first.artifactname` in the repository.
* wpinet
* wpiutil

* wpilibNewCommands
* commandsv2
* wpilibc
* hal
* cameraserver
Expand Down
8 changes: 4 additions & 4 deletions README-CMake.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ WPILib is normally built with Gradle, however for some systems, such as Linux ba
* cameraserver
* commandsv3
* cscore
* fieldImages
* fields
* hal (simulation HAL only)
* ntcore
* romiVendordep
* simulation extensions
* wpigui
* wpilib (wpilibc, wpilibj, and myRobot)
* wpilibNewCommands
* commandsv2
* wpimath
* wpinet
* wpiunits
Expand Down Expand Up @@ -162,7 +162,7 @@ file(GLOB_RECURSE JAVA_SOURCES *.java)
# If you want Gradle compatibility or you are using one of the templates/examples, comment out the above line and uncomment this line instead:
# file(GLOB_RECURSE JAVA_SOURCES src/main/java/*.java)
add_jar(robot ${JAVA_SOURCES}
INCLUDE_JARS apriltag_jar cscore_jar hal_jar ntcore_jar wpilibNewCommands_jar wpimath_jar wpinet_jar wpiutil_jar wpiunits_jar wpilibj_jar ${opencvJar})
INCLUDE_JARS apriltag_jar cscore_jar hal_jar ntcore_jar commandsv2_jar wpimath_jar wpinet_jar wpiutil_jar wpiunits_jar wpilibj_jar ${opencvJar})
export_jars(TARGETS robot FILE robot.jar)
```
This includes all the built JARs except for the vendordeps. If you are not using a JAR/library, you may remove it.
Expand All @@ -176,7 +176,7 @@ After that, run `cmake --build .` to create your JAR file. To execute the JAR fi

## Using vendordeps

Vendordeps are not included as part of the `wpilib` CMake package. However, if you want to use a vendordep, you need to use `find_package(VENDORDEP)`, where `VENDORDEP` is the name of the vendordep (case-sensitive), like `xrpVendordep` or `romiVendordep`. Note that wpilibNewCommands, while a vendordep in normal robot projects, is not built as a vendordep in CMake, and is instead included as part of the `wpilib` CMake package. After you used `find_package`, you can reference the vendordep library like normal, either by using `target_link_libraries` for C++ or `add_jar` for Java.
Vendordeps are not included as part of the `wpilib` CMake package. However, if you want to use a vendordep, you need to use `find_package(VENDORDEP)`, where `VENDORDEP` is the name of the vendordep (case-sensitive), like `xrpVendordep` or `romiVendordep`. Note that commandsv2, while a vendordep in normal robot projects, is not built as a vendordep in CMake, and is instead included as part of the `wpilib` CMake package. After you used `find_package`, you can reference the vendordep library like normal, either by using `target_link_libraries` for C++ or `add_jar` for Java.

## Troubleshooting
Below are some common issues that are run into when building.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ If opening from a fresh clone, generated java dependencies will not exist. Most
- `cscore`
- `hal`
- `ntcore`
- `wpilibNewCommands`
- `commandsv2`
- `wpimath`
- `wpinet`
- `wpiunits`
Expand Down
10 changes: 5 additions & 5 deletions apriltag/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ cc_library(

generate_resources(
name = "generate-resources",
namespace = "frc",
namespace = "wpi::apriltag",
prefix = "APRILTAG",
resource_files = glob(["src/main/native/resources/**"]),
)
Expand Down Expand Up @@ -133,7 +133,7 @@ wpilib_jni_java_library(
srcs = glob(["src/main/java/**/*.java"]),
extra_source_pkgs = ["resources"],
maven_artifact_name = "apriltag-java",
maven_group_id = "edu.wpi.first.apriltag",
maven_group_id = "org.wpilib.apriltag",
native_libs = [":apriltagjni"],
resource_strip_prefix = "apriltag/src/main/native/resources",
resources = glob(["src/main/native/resources/**"]),
Expand Down Expand Up @@ -191,8 +191,8 @@ cc_binary(

java_binary(
name = "DevMain-Java",
srcs = ["src/dev/java/edu/wpi/first/apriltag/DevMain.java"],
main_class = "edu.wpi.first.apriltag.DevMain",
srcs = ["src/dev/java/org/wpilib/vision/apriltag/DevMain.java"],
main_class = "org.wpilib.vision.apriltag.DevMain",
deps = [
":apriltag-java",
],
Expand All @@ -210,5 +210,5 @@ py_binary(
package_minimal_jni_project(
name = "apriltag",
maven_artifact_name = "apriltag-cpp",
maven_group_id = "edu.wpi.first.apriltag",
maven_group_id = "org.wpilib.apriltag",
)
6 changes: 3 additions & 3 deletions apriltag/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if(WITH_JAVA)
apriltag_jar
SOURCES ${JAVA_SOURCES}
RESOURCES
NAMESPACE "edu/wpi/first/apriltag" ${JAVA_RESOURCES}
NAMESPACE "org/wpilib/vision/apriltag" ${JAVA_RESOURCES}
INCLUDE_JARS
wpimath_jar
wpiunits_jar
Expand Down Expand Up @@ -107,10 +107,10 @@ if(WITH_JAVA_SOURCE)
endif()

generate_resources(
src/main/native/resources/edu/wpi/first/apriltag
src/main/native/resources/org/wpilib/vision/apriltag
generated/main/cpp
APRILTAG
frc
wpi::apriltag
apriltag_resources_src
)

Expand Down
4 changes: 2 additions & 2 deletions apriltag/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ apply plugin: 'c'

ext {
nativeName = 'apriltag'
devMain = 'edu.wpi.first.apriltag.DevMain'
devMain = 'org.wpilib.vision.apriltag.DevMain'
useJava = true
useCpp = true
sharedCvConfigs = [
apriltagDev : [],
apriltagTest: []]
staticCvConfigs = []

def generateTask = createGenerateResourcesTask('main', 'APRILTAG', 'frc', project)
def generateTask = createGenerateResourcesTask('main', 'APRILTAG', 'wpi::apriltag', project)

tasks.withType(CppCompile) {
dependsOn generateTask
Expand Down
20 changes: 0 additions & 20 deletions apriltag/src/dev/java/edu/wpi/first/apriltag/DevMain.java

This file was deleted.

20 changes: 20 additions & 0 deletions apriltag/src/dev/java/org/wpilib/vision/apriltag/DevMain.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

package org.wpilib.vision.apriltag;

public final class DevMain {
/** Main entry point. */
public static void main(String[] args) {
System.out.println("Hello World!");
AprilTagDetector detector = new AprilTagDetector();
detector.addFamily("tag16h5");
AprilTagDetector.Config config = new AprilTagDetector.Config();
config.refineEdges = false;
detector.setConfig(config);
detector.close();
}

private DevMain() {}
}
4 changes: 2 additions & 2 deletions apriltag/src/dev/native/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

#include "frc/apriltag/AprilTagDetector.h"
#include "wpi/apriltag/AprilTagDetector.hpp"

int main() {
frc::AprilTagDetector detector;
wpi::apriltag::AprilTagDetector detector;
detector.AddFamily("tag16h5");
detector.SetConfig({.refineEdges = false});
}
Loading
Loading