Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2025 WPILib updates #100

Merged
merged 31 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f8c9974
Updated dependencies
virtuald Aug 18, 2024
c55d4a5
WPIUtil updates
virtuald Aug 18, 2024
47c7ba1
Update robotpy-hal
virtuald Aug 18, 2024
3055a16
Update wpimath for 2025
virtuald Aug 21, 2024
c6a5dae
Update robotpy-apriltag
virtuald Aug 21, 2024
4ad07d7
Various updates
virtuald Sep 3, 2024
071b52f
Updated dependencies
virtuald Sep 3, 2024
ba2b5e8
Updated dependencies
virtuald Sep 28, 2024
7d1ba28
Fix MemoryBuffer::GetFile API change
virtuald Sep 29, 2024
824e0e2
Update robotpy-hal
virtuald Sep 29, 2024
2d161c1
Update pyntcore API
virtuald Sep 29, 2024
62a3b82
Update wpimath APIs
virtuald Sep 29, 2024
08ffed9
Update wpimath tests, add additional fromFeet to Translation2d
virtuald Sep 29, 2024
010900d
Update to cvnp d2b808a0b6faeb025647973cb966e728e816d6d2
virtuald Sep 29, 2024
0486ab8
Update robotpy-apriltag
virtuald Sep 29, 2024
bf9ec05
Update robotpy-wpilib
virtuald Sep 29, 2024
005ec35
Bump macos deployment target
virtuald Sep 29, 2024
2334870
Update XRP .gitignore
virtuald Sep 29, 2024
b7e7d31
Updated dependencies
virtuald Sep 29, 2024
e2f072e
Workaround for GCC issue on raspbian
virtuald Sep 29, 2024
46482c1
Updated dependencies
virtuald Oct 2, 2024
75ded9d
Update to latest WPILib dev commit
virtuald Oct 2, 2024
5cf3015
Add Python 3.13 compatibility
virtuald Oct 12, 2024
c81e450
Updated dependencies
virtuald Oct 12, 2024
089d35c
Fix ct_string type caster for updated pybind11
virtuald Oct 13, 2024
fe23dac
Updates for wpilib
virtuald Oct 13, 2024
971f94f
Install MarkupSafe separately because it's sdist is broken
virtuald Oct 15, 2024
0e9c3ca
Merge remote-tracking branch 'origin/main' into 2025-dev
virtuald Oct 17, 2024
b6aff15
Switch to 2025 docker images
virtuald Oct 17, 2024
c730cf6
Fix container name for now
virtuald Oct 17, 2024
5b9c72b
Update numpy version
virtuald Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 25 additions & 19 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Install deps
shell: bash
Expand All @@ -68,13 +68,13 @@ jobs:
max-parallel: ${{ fromJSON(needs.setup_concurrency.outputs.max-parallel).v }}
fail-fast: true
matrix:
os: ["ubuntu-22.04", "macos-12", "windows-2022"]
os: ["ubuntu-22.04", "macos-13", "windows-2022"]
python_version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Install numpy (needed for stubgen but broken in raspbian CI)
shell: bash
run: |
python -m pip --disable-pip-version-check install 'numpy<2'
python -m pip --disable-pip-version-check install numpy

- name: Build + test wheels
shell: bash
Expand Down Expand Up @@ -169,30 +169,30 @@ jobs:
max-parallel: ${{ fromJSON(needs.setup_concurrency.outputs.max-parallel).v }}
matrix:
os:
- container: wpilib/roborio-cross-ubuntu:2024-22.04-py312
- container: wpilib/roborio-cross-ubuntu:2025-22.04-py313
name: roborio

- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py38
name: raspbian-py38
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py39
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py39
name: raspbian-py39
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py310
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py310
name: raspbian-py310
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py311
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py311
name: raspbian-py311
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py312
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py312
name: raspbian-py312

- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py38
name: raspbian-aarch64-py38
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py39
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py313
name: raspbian-py313

- container: wpilib/aarch64-cross-ubuntu:2025-bullseye-22.04-py39
name: raspbian-aarch64-py39
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py310
- container: wpilib/aarch64-cross-ubuntu:2025-bullseye-22.04-py310
name: raspbian-aarch64-py310
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py311
- container: wpilib/aarch64-cross-ubuntu:2025-bullseye-22.04-py311
name: raspbian-aarch64-py311
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py312
- container: wpilib/aarch64-cross-ubuntu:2025-bullseye-22.04-py312
name: raspbian-aarch64-py312
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py313
name: raspbian-aarch64-py313

container:
image: "${{ matrix.os.container }}"
Expand Down Expand Up @@ -222,7 +222,13 @@ jobs:
run: |
pwd
/usr/bin/git config --global --add safe.directory $(pwd)


# See https://github.com/pallets/markupsafe/issues/475
- name: Install MarkupSafe
shell: bash
run: |
/build/venv/bin/cross-pip install --no-build-isolation "markupsafe; python_version < '3.12'"

- name: Install deps
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion devtools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# MACOSX_DEPLOYMENT_TARGET is required for linking to WPILib
if sys.platform == "darwin":
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "12"
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "13"


@click.group()
Expand Down
8 changes: 4 additions & 4 deletions rdev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

[params]

wpilib_bin_url = "https://frcmaven.wpi.edu/artifactory/release"
wpilib_bin_version = "2024.3.2"
# wpilib_bin_url = "https://frcmaven.wpi.edu/artifactory/development"
# wpilib_bin_url = "https://frcmaven.wpi.edu/artifactory/release"
wpilib_bin_version = "2025.1.1-beta-1"
wpilib_bin_url = "https://frcmaven.wpi.edu/artifactory/development"

# Don't update these artifacts
exclude_artifacts = [
"opencv-cpp"
]

robotpy_build_req = "<2025.0.0,~=2024.0.0"
robotpy_build_req = "<2025.0.0b1,~=2025.0.0a1"

#
# Subproject configuration
Expand Down
1 change: 1 addition & 0 deletions rdev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ black
click
packaging
pydantic<2
pytest
requests
setuptools
setuptools_scm >= 6.2, < 8
Expand Down
2 changes: 1 addition & 1 deletion subprojects/pyntcore/gen/NetworkTableInstance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ classes:
StopClient:
SetServer:
overloads:
const char*, unsigned int:
std::string_view, unsigned int:
std::span<const std::pair<std::string_view, unsigned int>>:
std::span<const std::string_view>, unsigned int:
SetServerTeam:
Expand Down
2 changes: 1 addition & 1 deletion subprojects/pyntcore/ntcore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from . import _init_ntcore

# autogenerated by 'robotpy-build create-imports ntcore'
# autogenerated by 'robotpy-build create-imports ntcore ntcore._ntcore'
from ._ntcore import (
BooleanArrayEntry,
BooleanArrayPublisher,
Expand Down
24 changes: 16 additions & 8 deletions subprojects/pyntcore/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,32 @@ install_requires = [

[build-system]
requires = [
"robotpy-build<2025.0.0,~=2024.0.0",
"robotpy-build<2025.0.0b1,~=2025.0.0a1",
"robotpy-wpiutil~=2024.3.1",
"robotpy-wpinet~=2024.3.1",
]

[tool.robotpy-build]
base_package = "ntcore"
update_init = [
"ntcore",
"ntcore.meta ntcore._ntcore.meta"
]
scan_headers_ignore = [
"networktables/ProtobufTopic.h",
"networktables/UnitTopic.h",

"ntcore.h",
"ntcore_c.h",
"ntcore_c_types.h",
"ntcore_test.h",
]

[tool.robotpy-build.wrappers."ntcore".maven_lib_download]
artifact_id = "ntcore-cpp"
group_id = "edu.wpi.first.ntcore"
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
version = "2024.3.2"
repo_url = "https://frcmaven.wpi.edu/artifactory/development"
version = "2025.1.1-beta-1"

libs = ["ntcore"]

Expand Down Expand Up @@ -66,11 +79,6 @@ StructArrayTopic = "networktables/StructArrayTopic.h"
StringArrayTopic = "networktables/StringArrayTopic.h"
StringTopic = "networktables/StringTopic.h"
Topic = "networktables/Topic.h"
# UnitTopic = "networktables/UnitTopic.h"

# ntcore = "ntcore.h"
# ntcore_c = "ntcore_c.h"
# ntcore_c_types = "ntcore_c_types.h"
ntcore_cpp = "ntcore_cpp.h"
ntcore_cpp_types = "ntcore_cpp_types.h"
# ntcore_test = "ntcore_test.h"
3 changes: 3 additions & 0 deletions subprojects/robotpy-apriltag/gen/AprilTagFieldLayout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ functions:
ignore: true
from_json:
ignore: true
LoadAprilTagLayoutField:
ignore: true
classes:
AprilTagFieldLayout:
enums:
Expand All @@ -15,6 +17,7 @@ classes:
"":
std::string_view:
std::vector<AprilTag>, units::meter_t, units::meter_t:
LoadField:
GetFieldLength:
GetFieldWidth:
GetTags:
Expand Down
22 changes: 19 additions & 3 deletions subprojects/robotpy-apriltag/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,35 @@ install_requires = [

[build-system]
requires = [
"robotpy-build<2025.0.0,~=2024.0.0",
"robotpy-build<2025.0.0b1,~=2025.0.0a1",
"robotpy-wpiutil~=2024.3.1",
"robotpy-wpimath~=2024.3.1",
]

[tool.robotpy-build]
base_package = "robotpy_apriltag"
update_init = [
"robotpy_apriltag robotpy_apriltag._apriltag"
]
scan_headers_ignore = [
"common/*",
"test/*",

"apriltag.h",
"apriltag_math.h",
"apriltag_pose.h",

"frc/apriltag/AprilTagDetector_cv.h",

"tag16h5.h",
"tag36h11.h",
]

[tool.robotpy-build.wrappers."robotpy_apriltag".maven_lib_download]
artifact_id = "apriltag-cpp"
group_id = "edu.wpi.first.apriltag"
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
version = "2024.3.2"
repo_url = "https://frcmaven.wpi.edu/artifactory/development"
version = "2025.1.1-beta-1"

libs = ["apriltag"]

Expand Down
2 changes: 0 additions & 2 deletions subprojects/robotpy-apriltag/robotpy_apriltag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
AprilTagFieldLayout,
AprilTagPoseEstimate,
AprilTagPoseEstimator,
loadAprilTagLayoutField,
)

__all__ = [
Expand All @@ -20,5 +19,4 @@
"AprilTagFieldLayout",
"AprilTagPoseEstimate",
"AprilTagPoseEstimator",
"loadAprilTagLayoutField",
]
Binary file modified subprojects/robotpy-apriltag/tests/tag1_640_480.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions subprojects/robotpy-cscore/cscore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from . import _init_cscore

from ._logging import enableLogging

# autogenerated by 'robotpy-build create-imports cscore'
# autogenerated by 'robotpy-build create-imports cscore cscore._cscore'
from ._cscore import (
AxisCamera,
CameraServer,
Expand Down Expand Up @@ -49,9 +47,12 @@
"runMainRunLoop",
"runMainRunLoopTimeout",
"stopMainRunLoop",
"enableLogging",
]

from ._logging import enableLogging

__all__.append("enableLogging")

try:
from .version import __version__
except ImportError:
Expand Down
10 changes: 1 addition & 9 deletions subprojects/robotpy-cscore/cscore/cvnp/cvnp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,7 @@ namespace cvnp

bool is_array_contiguous(const pybind11::array& a)
{
pybind11::ssize_t expected_stride = a.itemsize();
for (int i = a.ndim() - 1; i >=0; --i)
{
pybind11::ssize_t current_stride = a.strides()[i];
if (current_stride != expected_stride)
return false;
expected_stride = expected_stride * a.shape()[i];
}
return true;
return a.flags() & pybind11::array::c_style;
}


Expand Down
1 change: 1 addition & 0 deletions subprojects/robotpy-cscore/cscore/cvnp/cvnp.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ namespace cvnp
return pybind11::array(
pybind11::dtype::of<_Tp>()
, std::vector<std::size_t> {_rows, _cols}
, std::vector<std::size_t>{_cols * sizeof(_Tp), sizeof(_Tp)} // Strides
, m.val
);
}
Expand Down
13 changes: 8 additions & 5 deletions subprojects/robotpy-cscore/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install_requires = [

[build-system]
requires = [
"robotpy-build<2025.0.0,~=2024.0.0",
"robotpy-build<2025.0.0b1,~=2025.0.0a1",
"robotpy-wpiutil~=2024.3.1",
"robotpy-wpinet~=2024.3.1",
"pyntcore~=2024.3.1",
Expand All @@ -22,20 +22,23 @@ requires = [

[tool.robotpy-build]
base_package = "cscore"
update_init = [
"cscore"
]

[tool.robotpy-build.static_libs."cscore_cpp".maven_lib_download]
artifact_id = "cscore-cpp"
group_id = "edu.wpi.first.cscore"
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
version = "2024.3.2"
repo_url = "https://frcmaven.wpi.edu/artifactory/development"
version = "2025.1.1-beta-1"

libs = ["cscore"]

[tool.robotpy-build.static_libs."cameraserver_cpp".maven_lib_download]
artifact_id = "cameraserver-cpp"
group_id = "edu.wpi.first.cameraserver"
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
version = "2024.3.2"
repo_url = "https://frcmaven.wpi.edu/artifactory/development"
version = "2025.1.1-beta-1"

libs = ["cameraserver"]

Expand Down
12 changes: 7 additions & 5 deletions subprojects/robotpy-hal/gen/DriverStation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ functions:
HAL_GetJoystickIsXbox:
HAL_GetJoystickType:
HAL_GetJoystickName:
param_override:
name:
ignore: true
cpp_code: |
[](int32_t joystickNum) {
auto name = HAL_GetJoystickName(joystickNum);
std::string sname(name);
HAL_FreeJoystickName(name);
WPI_String name;
HAL_GetJoystickName(&name, joystickNum);
std::string sname(wpi::to_string_view(&name));
WPI_FreeString(&name);
return sname;
}
HAL_FreeJoystickName:
ignore: true
HAL_GetJoystickAxisType:
HAL_SetJoystickOutputs:
HAL_GetMatchTime:
Expand Down
Loading