[robotpy] Sync robotpy (#8318)

Project import generated by Copybara.

GitOrigin-RevId: f6818c55dda55da1226e47a05a22d30f7cc477f1
This commit is contained in:
PJ Reiniger
2025-11-01 13:28:05 -04:00
committed by GitHub
parent 3f88c287d6
commit 49e84c6b52
51 changed files with 226 additions and 285 deletions

View File

@@ -4,17 +4,17 @@ requires = [
"hatchling",
"hatch-nativelib~=0.2.0",
"hatch-robotpy~=0.2.1",
"robotpy-native-wpiutil==2027.0.0a2",
"robotpy-native-wpiutil==0.0.0",
]
[project]
name = "robotpy-native-wpimath"
version = "2027.0.0a2"
version = "0.0.0"
description = "WPILib Math Library"
license = "BSD-3-Clause"
dependencies = [
"robotpy-native-wpiutil==2027.0.0a2",
"robotpy-native-wpiutil==0.0.0",
]
[tool.hatch.build.targets.wheel]
@@ -24,7 +24,7 @@ packages = ["src/native"]
artifact_id = "wpimath-cpp"
group_id = "edu.wpi.first.wpimath"
repo_url = "https://frcmaven.wpi.edu/artifactory/release-2027"
version = "2027.0.0-alpha-2"
version = "0.0.0"
extract_to = "src/native/wpimath"
libs = ["wpimath"]

View File

@@ -1,26 +1,26 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"semiwrap~=0.1.7",
"hatch-meson~=0.1.0b2",
"semiwrap~=0.2.1",
"hatch-meson~=0.1.0",
"hatch-robotpy~=0.2.1",
"hatchling",
"robotpy-native-wpimath==2027.0.0a2",
"robotpy-wpiutil==2027.0.0a2",
"robotpy-native-wpimath==0.0.0",
"robotpy-wpiutil==0.0.0",
# "numpy", # broken in raspbian CI
]
[project]
name = "robotpy-wpimath"
version = "2027.0.0a2"
version = "0.0.0"
description = "Binary wrapper for FRC WPIMath library"
authors = [
{name = "RobotPy Development Team", email = "robotpy@googlegroups.com"},
]
license = "BSD-3-Clause"
dependencies = [
"robotpy-native-wpimath==2027.0.0a2",
"robotpy-wpiutil==2027.0.0a2",
"robotpy-native-wpimath==0.0.0",
"robotpy-wpiutil==0.0.0",
]
[project.urls]
@@ -45,6 +45,8 @@ update_init = [
"wpimath.estimator wpimath._controls._controls.estimator",
"wpimath.filter",
"wpimath.geometry",
"wpimath.kinematics",
"wpimath.interpolation",
"wpimath.optimization wpimath._controls._controls.optimization",
"wpimath.path wpimath._controls._controls.path",
"wpimath.spline",
@@ -73,6 +75,8 @@ scan_headers_ignore = [
"frc/estimator/UnscentedKalmanFilter.h",
"frc/estimator/UnscentedTransform.h",
"frc/geometry/detail/RotationVectorToMatrix.h",
"frc/system/Discretization.h",
"frc/system/NumericalIntegration.h",
"frc/system/NumericalJacobian.h",
@@ -1574,7 +1578,6 @@ DifferentialDriveAccelerationLimiter = "frc/controller/DifferentialDriveAccelera
DifferentialDriveFeedforward = "frc/controller/DifferentialDriveFeedforward.h"
DifferentialDriveWheelVoltages = "frc/controller/DifferentialDriveWheelVoltages.h"
ElevatorFeedforward = "frc/controller/ElevatorFeedforward.h"
HolonomicDriveController = "frc/controller/HolonomicDriveController.h"
ImplicitModelFollower = "frc/controller/ImplicitModelFollower.h"
LTVDifferentialDriveController = "frc/controller/LTVDifferentialDriveController.h"
LTVUnicycleController = "frc/controller/LTVUnicycleController.h"

View File

@@ -4,33 +4,23 @@ functions:
- [double]
AngleModulus:
FloorDiv:
template_impls:
- [int64_t, int64_t]
# work around GCC 10 issue on raspbian
cpp_code: |
[](int64_t x, int64_t y) -> int64_t {
return frc::FloorDiv(x, y);
}
# Use // operator instead, it's more efficient
# - https://github.com/robotpy/mostrobotpy/pull/200
ignore: true
FloorMod:
template_impls:
- [int64_t, int64_t]
# work around GCC 10 issue on raspbian
cpp_code: |
[](int64_t x, int64_t y) -> int64_t {
return frc::FloorMod(x, y);
}
# Use % operator instead, it's more efficient
# - https://github.com/robotpy/mostrobotpy/pull/200
ignore: true
ApplyDeadband:
param_override:
maxMagnitude:
default: '1.0'
template_impls:
- [double]
CopySignPow:
param_override:
maxMagnitude:
default: '1.0'
template_impls:
- [double]
overloads:
T, T, T:
template_impls:
- [double]
const Eigen::Vector<T, N>&, T, T:
ignore: true
IsNear:
overloads:
T, T, T:
@@ -45,3 +35,9 @@ functions:
overloads:
const Translation2d&, const Translation2d&, units::second_t, units::meters_per_second_t:
const Translation3d&, const Translation3d&, units::second_t, units::meters_per_second_t:
CopyDirectionPow:
overloads:
T, double, T:
ignore: true
const Eigen::Vector<T, N>&, double, T:
ignore: true

View File

@@ -1,3 +1,6 @@
defaults:
subpackage: controller
classes:
frc::DifferentialDriveFeedforward:
force_type_casters:

View File

@@ -1,23 +0,0 @@
defaults:
subpackage: controller
classes:
frc::HolonomicDriveController:
methods:
HolonomicDriveController:
AtReference:
SetTolerance:
Calculate:
overloads:
const Pose2d&, const Pose2d&, units::meters_per_second_t, const Rotation2d&:
const Pose2d&, const Trajectory::State&, const Rotation2d&:
SetEnabled:
getThetaController:
ignore: true
getXController:
ignore: true
getYController:
ignore: true
GetXController:
GetYController:
GetThetaController:

View File

@@ -27,8 +27,6 @@ classes:
RotateBy:
TransformBy:
RelativeTo:
Exp:
Log:
ToMatrix:
Nearest:
overloads:

View File

@@ -7,11 +7,6 @@ functions:
ignore: true
from_json:
ignore: true
RotationVectorToMatrix:
overloads:
const ct_vector3d&:
ignore: true
const Eigen::Vector3d&:
classes:
frc::Pose3d:
methods:
@@ -36,13 +31,11 @@ classes:
operator*:
operator/:
RotateBy:
RotateAround:
TransformBy:
RelativeTo:
Exp:
Log:
ToMatrix:
ToPose2d:
RotateAround:
Nearest:
overloads:
std::span<const Pose3d> [const]:

View File

@@ -30,6 +30,7 @@ classes:
operator/:
operator==:
operator+:
Log:
inline_code: |
cls_Transform2d

View File

@@ -28,6 +28,7 @@ classes:
operator/:
operator+:
operator==:
Log:
inline_code: |

View File

@@ -38,6 +38,10 @@ classes:
operator*:
operator/:
operator==:
SquaredDistance:
SquaredNorm:
Dot:
Cross:
inline_code: |
cls_Translation2d

View File

@@ -41,6 +41,10 @@ classes:
ignore: true
RotateAround:
SquaredDistance:
SquaredNorm:
Dot:
Cross:
inline_code: |
cls_Translation3d
.def_static("fromFeet", [](units::foot_t x, units::foot_t y, units::foot_t z){

View File

@@ -11,6 +11,7 @@ classes:
methods:
operator==:
operator*:
Exp:
inline_code: |
cls_Twist2d

View File

@@ -14,6 +14,7 @@ classes:
methods:
operator==:
operator*:
Exp:
inline_code: |-
cls_Twist3d

View File

@@ -7,8 +7,6 @@ from . import geometry
from ._wpimath import (
angleModulus,
applyDeadband,
floorDiv,
floorMod,
inputModulus,
objectToRobotPose,
slewRateLimit,
@@ -17,8 +15,6 @@ from ._wpimath import (
__all__ = [
"angleModulus",
"applyDeadband",
"floorDiv",
"floorMod",
"inputModulus",
"objectToRobotPose",
"slewRateLimit",

View File

@@ -6,9 +6,9 @@ from .._controls._controls.controller import (
ControlAffinePlantInversionFeedforward_2_1,
ControlAffinePlantInversionFeedforward_2_2,
DifferentialDriveAccelerationLimiter,
DifferentialDriveFeedforward,
DifferentialDriveWheelVoltages,
ElevatorFeedforward,
HolonomicDriveController,
ImplicitModelFollower_1_1,
ImplicitModelFollower_2_1,
ImplicitModelFollower_2_2,
@@ -36,9 +36,9 @@ __all__ = [
"ControlAffinePlantInversionFeedforward_2_1",
"ControlAffinePlantInversionFeedforward_2_2",
"DifferentialDriveAccelerationLimiter",
"DifferentialDriveFeedforward",
"DifferentialDriveWheelVoltages",
"ElevatorFeedforward",
"HolonomicDriveController",
"ImplicitModelFollower_1_1",
"ImplicitModelFollower_2_1",
"ImplicitModelFollower_2_2",

View File

@@ -17,7 +17,6 @@ from ._geometry import (
Translation3d,
Twist2d,
Twist3d,
rotationVectorToMatrix,
)
__all__ = [
@@ -36,5 +35,4 @@ __all__ = [
"Translation3d",
"Twist2d",
"Twist3d",
"rotationVectorToMatrix",
]

View File

@@ -1,6 +1,6 @@
from . import _init__interpolation # noqa: F401
# autogenerated by 'robotpy-build create-imports wpimath.interpolation wpimath.interpolation._interpolation'
# autogenerated by 'semiwrap create-imports wpimath.interpolation wpimath.interpolation._interpolation'
from ._interpolation import (
TimeInterpolatableFloatBuffer,
TimeInterpolatablePose2dBuffer,

View File

@@ -1,35 +1,47 @@
from . import _init__kinematics
# autogenerated by 'robotpy-build create-imports wpimath.kinematics'
# autogenerated by 'semiwrap create-imports wpimath.kinematics wpimath.kinematics._kinematics'
from ._kinematics import (
ChassisSpeeds,
DifferentialDriveKinematics,
DifferentialDriveKinematicsBase,
DifferentialDriveOdometry,
DifferentialDriveOdometry3d,
DifferentialDriveOdometry3dBase,
DifferentialDriveOdometryBase,
DifferentialDriveWheelPositions,
DifferentialDriveWheelSpeeds,
MecanumDriveKinematics,
MecanumDriveKinematicsBase,
MecanumDriveOdometry,
MecanumDriveOdometry3d,
MecanumDriveOdometry3dBase,
MecanumDriveOdometryBase,
MecanumDriveWheelPositions,
MecanumDriveWheelSpeeds,
SwerveDrive2Kinematics,
SwerveDrive2KinematicsBase,
SwerveDrive2Odometry,
SwerveDrive2Odometry3d,
SwerveDrive2Odometry3dBase,
SwerveDrive2OdometryBase,
SwerveDrive3Kinematics,
SwerveDrive3KinematicsBase,
SwerveDrive3Odometry,
SwerveDrive3Odometry3d,
SwerveDrive3Odometry3dBase,
SwerveDrive3OdometryBase,
SwerveDrive4Kinematics,
SwerveDrive4KinematicsBase,
SwerveDrive4Odometry,
SwerveDrive4Odometry3d,
SwerveDrive4Odometry3dBase,
SwerveDrive4OdometryBase,
SwerveDrive6Kinematics,
SwerveDrive6KinematicsBase,
SwerveDrive6Odometry,
SwerveDrive6Odometry3d,
SwerveDrive6Odometry3dBase,
SwerveDrive6OdometryBase,
SwerveModulePosition,
SwerveModuleState,
@@ -40,30 +52,42 @@ __all__ = [
"DifferentialDriveKinematics",
"DifferentialDriveKinematicsBase",
"DifferentialDriveOdometry",
"DifferentialDriveOdometry3d",
"DifferentialDriveOdometry3dBase",
"DifferentialDriveOdometryBase",
"DifferentialDriveWheelPositions",
"DifferentialDriveWheelSpeeds",
"MecanumDriveKinematics",
"MecanumDriveKinematicsBase",
"MecanumDriveOdometry",
"MecanumDriveOdometry3d",
"MecanumDriveOdometry3dBase",
"MecanumDriveOdometryBase",
"MecanumDriveWheelPositions",
"MecanumDriveWheelSpeeds",
"SwerveDrive2Kinematics",
"SwerveDrive2KinematicsBase",
"SwerveDrive2Odometry",
"SwerveDrive2Odometry3d",
"SwerveDrive2Odometry3dBase",
"SwerveDrive2OdometryBase",
"SwerveDrive3Kinematics",
"SwerveDrive3KinematicsBase",
"SwerveDrive3Odometry",
"SwerveDrive3Odometry3d",
"SwerveDrive3Odometry3dBase",
"SwerveDrive3OdometryBase",
"SwerveDrive4Kinematics",
"SwerveDrive4KinematicsBase",
"SwerveDrive4Odometry",
"SwerveDrive4Odometry3d",
"SwerveDrive4Odometry3dBase",
"SwerveDrive4OdometryBase",
"SwerveDrive6Kinematics",
"SwerveDrive6KinematicsBase",
"SwerveDrive6Odometry",
"SwerveDrive6Odometry3d",
"SwerveDrive6Odometry3dBase",
"SwerveDrive6OdometryBase",
"SwerveModulePosition",
"SwerveModuleState",