mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
SCRIPT namespace replacements
This commit is contained in:
committed by
Peter Johnson
parent
ae6c043632
commit
9aca8e0fd6
@@ -2,7 +2,7 @@ extra_includes:
|
||||
- wpystruct.h
|
||||
|
||||
classes:
|
||||
frc::ChassisSpeeds:
|
||||
wpi::math::ChassisSpeeds:
|
||||
force_no_default_constructor: true
|
||||
attributes:
|
||||
vx:
|
||||
@@ -12,8 +12,8 @@ classes:
|
||||
ToTwist2d:
|
||||
Discretize:
|
||||
overloads:
|
||||
units::meters_per_second_t, units::meters_per_second_t, units::radians_per_second_t, units::second_t:
|
||||
const ChassisSpeeds&, units::second_t:
|
||||
wpi::units::meters_per_second_t, wpi::units::meters_per_second_t, wpi::units::radians_per_second_t, wpi::units::second_t:
|
||||
const ChassisSpeeds&, wpi::units::second_t:
|
||||
operator+:
|
||||
operator-:
|
||||
overloads:
|
||||
@@ -29,35 +29,35 @@ inline_code: |
|
||||
cls_ChassisSpeeds
|
||||
.def(
|
||||
py::init<
|
||||
units::meters_per_second_t, units::meters_per_second_t,
|
||||
units::radians_per_second_t
|
||||
wpi::units::meters_per_second_t, wpi::units::meters_per_second_t,
|
||||
wpi::units::radians_per_second_t
|
||||
>(),
|
||||
py::arg("vx") = 0, py::arg("vy") = 0, py::arg("omega") = 0
|
||||
)
|
||||
.def_static("fromFeet", [](units::feet_per_second_t vx, units::feet_per_second_t vy, units::radians_per_second_t omega){
|
||||
.def_static("fromFeet", [](wpi::units::feet_per_second_t vx, wpi::units::feet_per_second_t vy, wpi::units::radians_per_second_t omega){
|
||||
return ChassisSpeeds{vx, vy, omega};
|
||||
}, py::arg("vx") = 0, py::arg("vy") = 0, py::arg("omega") = 0)
|
||||
.def_property("vx_fps",
|
||||
[](ChassisSpeeds * self) -> units::feet_per_second_t {
|
||||
[](ChassisSpeeds * self) -> wpi::units::feet_per_second_t {
|
||||
return self->vx;
|
||||
},
|
||||
[](ChassisSpeeds * self, units::feet_per_second_t vx) {
|
||||
[](ChassisSpeeds * self, wpi::units::feet_per_second_t vx) {
|
||||
self->vx = vx;
|
||||
}
|
||||
)
|
||||
.def_property("vy_fps",
|
||||
[](ChassisSpeeds * self) -> units::feet_per_second_t {
|
||||
[](ChassisSpeeds * self) -> wpi::units::feet_per_second_t {
|
||||
return self->vy;
|
||||
},
|
||||
[](ChassisSpeeds * self, units::feet_per_second_t vy) {
|
||||
[](ChassisSpeeds * self, wpi::units::feet_per_second_t vy) {
|
||||
self->vy = vy;
|
||||
}
|
||||
)
|
||||
.def_property("omega_dps",
|
||||
[](ChassisSpeeds * self) -> units::degrees_per_second_t {
|
||||
[](ChassisSpeeds * self) -> wpi::units::degrees_per_second_t {
|
||||
return self->omega;
|
||||
},
|
||||
[](ChassisSpeeds * self, units::degrees_per_second_t omega) {
|
||||
[](ChassisSpeeds * self, wpi::units::degrees_per_second_t omega) {
|
||||
self->omega = omega;
|
||||
}
|
||||
)
|
||||
@@ -81,4 +81,4 @@ inline_code: |
|
||||
})
|
||||
;
|
||||
|
||||
SetupWPyStruct<frc::ChassisSpeeds>(cls_ChassisSpeeds);
|
||||
SetupWPyStruct<wpi::math::ChassisSpeeds>(cls_ChassisSpeeds);
|
||||
|
||||
@@ -2,7 +2,7 @@ extra_includes:
|
||||
- wpystruct.h
|
||||
|
||||
classes:
|
||||
frc::DifferentialDriveKinematics:
|
||||
wpi::math::DifferentialDriveKinematics:
|
||||
attributes:
|
||||
trackwidth:
|
||||
methods:
|
||||
@@ -11,9 +11,9 @@ classes:
|
||||
ToWheelSpeeds:
|
||||
ToTwist2d:
|
||||
overloads:
|
||||
const units::meter_t, const units::meter_t [const]:
|
||||
const wpi::units::meter_t, const wpi::units::meter_t [const]:
|
||||
const DifferentialDriveWheelPositions&, const DifferentialDriveWheelPositions& [const]:
|
||||
Interpolate:
|
||||
|
||||
inline_code: |
|
||||
SetupWPyStruct<frc::DifferentialDriveKinematics>(cls_DifferentialDriveKinematics);
|
||||
SetupWPyStruct<wpi::math::DifferentialDriveKinematics>(cls_DifferentialDriveKinematics);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
classes:
|
||||
frc::DifferentialDriveOdometry:
|
||||
wpi::math::DifferentialDriveOdometry:
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
DifferentialDriveOdometry:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
classes:
|
||||
frc::DifferentialDriveOdometry3d:
|
||||
wpi::math::DifferentialDriveOdometry3d:
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
DifferentialDriveOdometry3d:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
classes:
|
||||
frc::DifferentialDriveWheelPositions:
|
||||
wpi::math::DifferentialDriveWheelPositions:
|
||||
attributes:
|
||||
left:
|
||||
right:
|
||||
|
||||
@@ -2,7 +2,7 @@ extra_includes:
|
||||
- wpystruct.h
|
||||
|
||||
classes:
|
||||
frc::DifferentialDriveWheelSpeeds:
|
||||
wpi::math::DifferentialDriveWheelSpeeds:
|
||||
force_no_default_constructor: true
|
||||
attributes:
|
||||
left:
|
||||
@@ -21,25 +21,25 @@ classes:
|
||||
inline_code: |
|
||||
cls_DifferentialDriveWheelSpeeds
|
||||
.def(
|
||||
py::init<units::meters_per_second_t, units::meters_per_second_t>(),
|
||||
py::init<wpi::units::meters_per_second_t, wpi::units::meters_per_second_t>(),
|
||||
py::arg("left") = 0, py::arg("right") = 0
|
||||
)
|
||||
.def_static("fromFeet", [](units::feet_per_second_t left, units::feet_per_second_t right){
|
||||
.def_static("fromFeet", [](wpi::units::feet_per_second_t left, wpi::units::feet_per_second_t right){
|
||||
return DifferentialDriveWheelSpeeds{left, right};
|
||||
}, py::arg("left"), py::arg("right"))
|
||||
.def_property("left_fps",
|
||||
[](DifferentialDriveWheelSpeeds * self) -> units::feet_per_second_t {
|
||||
[](DifferentialDriveWheelSpeeds * self) -> wpi::units::feet_per_second_t {
|
||||
return self->left;
|
||||
},
|
||||
[](DifferentialDriveWheelSpeeds * self, units::feet_per_second_t left) {
|
||||
[](DifferentialDriveWheelSpeeds * self, wpi::units::feet_per_second_t left) {
|
||||
self->left = left;
|
||||
}
|
||||
)
|
||||
.def_property("right_fps",
|
||||
[](DifferentialDriveWheelSpeeds * self) -> units::feet_per_second_t {
|
||||
[](DifferentialDriveWheelSpeeds * self) -> wpi::units::feet_per_second_t {
|
||||
return self->right;
|
||||
},
|
||||
[](DifferentialDriveWheelSpeeds * self, units::feet_per_second_t right) {
|
||||
[](DifferentialDriveWheelSpeeds * self, wpi::units::feet_per_second_t right) {
|
||||
self->right = right;
|
||||
}
|
||||
)
|
||||
@@ -49,5 +49,5 @@ inline_code: |
|
||||
})
|
||||
;
|
||||
|
||||
SetupWPyStruct<frc::DifferentialDriveWheelSpeeds>(cls_DifferentialDriveWheelSpeeds);
|
||||
SetupWPyStruct<wpi::math::DifferentialDriveWheelSpeeds>(cls_DifferentialDriveWheelSpeeds);
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ extra_includes:
|
||||
|
||||
|
||||
classes:
|
||||
frc::Kinematics:
|
||||
wpi::math::Kinematics:
|
||||
force_type_casters:
|
||||
- wpi::array
|
||||
- wpi::util::array
|
||||
template_params:
|
||||
- WheelSpeeds
|
||||
- WheelPositions
|
||||
@@ -22,32 +22,32 @@ classes:
|
||||
|
||||
templates:
|
||||
DifferentialDriveKinematicsBase:
|
||||
qualname: frc::Kinematics
|
||||
qualname: wpi::math::Kinematics
|
||||
params:
|
||||
- frc::DifferentialDriveWheelSpeeds
|
||||
- frc::DifferentialDriveWheelPositions
|
||||
- wpi::math::DifferentialDriveWheelSpeeds
|
||||
- wpi::math::DifferentialDriveWheelPositions
|
||||
MecanumDriveKinematicsBase:
|
||||
qualname: frc::Kinematics
|
||||
qualname: wpi::math::Kinematics
|
||||
params:
|
||||
- frc::MecanumDriveWheelSpeeds
|
||||
- frc::MecanumDriveWheelPositions
|
||||
- wpi::math::MecanumDriveWheelSpeeds
|
||||
- wpi::math::MecanumDriveWheelPositions
|
||||
SwerveDrive2KinematicsBase:
|
||||
qualname: frc::Kinematics
|
||||
qualname: wpi::math::Kinematics
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,2>
|
||||
- wpi::array<frc::SwerveModulePosition,2>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,2>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,2>
|
||||
SwerveDrive3KinematicsBase:
|
||||
qualname: frc::Kinematics
|
||||
qualname: wpi::math::Kinematics
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,3>
|
||||
- wpi::array<frc::SwerveModulePosition,3>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,3>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,3>
|
||||
SwerveDrive4KinematicsBase:
|
||||
qualname: frc::Kinematics
|
||||
qualname: wpi::math::Kinematics
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,4>
|
||||
- wpi::array<frc::SwerveModulePosition,4>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,4>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,4>
|
||||
SwerveDrive6KinematicsBase:
|
||||
qualname: frc::Kinematics
|
||||
qualname: wpi::math::Kinematics
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,6>
|
||||
- wpi::array<frc::SwerveModulePosition,6>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,6>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,6>
|
||||
|
||||
@@ -2,7 +2,7 @@ extra_includes:
|
||||
- wpystruct.h
|
||||
|
||||
classes:
|
||||
frc::MecanumDriveKinematics:
|
||||
wpi::math::MecanumDriveKinematics:
|
||||
methods:
|
||||
MecanumDriveKinematics:
|
||||
ToWheelSpeeds:
|
||||
@@ -47,4 +47,4 @@ classes:
|
||||
Interpolate:
|
||||
|
||||
inline_code: |
|
||||
SetupWPyStruct<frc::MecanumDriveKinematics>(cls_MecanumDriveKinematics);
|
||||
SetupWPyStruct<wpi::math::MecanumDriveKinematics>(cls_MecanumDriveKinematics);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
classes:
|
||||
frc::MecanumDriveOdometry:
|
||||
wpi::math::MecanumDriveOdometry:
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
MecanumDriveOdometry:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
classes:
|
||||
frc::MecanumDriveOdometry3d:
|
||||
wpi::math::MecanumDriveOdometry3d:
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
MecanumDriveOdometry3d:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
classes:
|
||||
frc::MecanumDriveWheelPositions:
|
||||
wpi::math::MecanumDriveWheelPositions:
|
||||
attributes:
|
||||
frontLeft:
|
||||
frontRight:
|
||||
|
||||
@@ -2,7 +2,7 @@ extra_includes:
|
||||
- wpystruct.h
|
||||
|
||||
classes:
|
||||
frc::MecanumDriveWheelSpeeds:
|
||||
wpi::math::MecanumDriveWheelSpeeds:
|
||||
force_no_default_constructor: true
|
||||
attributes:
|
||||
frontLeft:
|
||||
@@ -23,50 +23,50 @@ inline_code: |
|
||||
cls_MecanumDriveWheelSpeeds
|
||||
.def(
|
||||
py::init<
|
||||
units::meters_per_second_t, units::meters_per_second_t,
|
||||
units::meters_per_second_t, units::meters_per_second_t
|
||||
wpi::units::meters_per_second_t, wpi::units::meters_per_second_t,
|
||||
wpi::units::meters_per_second_t, wpi::units::meters_per_second_t
|
||||
>(),
|
||||
py::arg("frontLeft") = 0, py::arg("frontRight") = 0,
|
||||
py::arg("rearLeft") = 0, py::arg("rearRight") = 0
|
||||
)
|
||||
.def_static("fromFeet", [](
|
||||
units::feet_per_second_t frontLeft,
|
||||
units::feet_per_second_t frontRight,
|
||||
units::feet_per_second_t rearLeft,
|
||||
units::feet_per_second_t rearRight
|
||||
wpi::units::feet_per_second_t frontLeft,
|
||||
wpi::units::feet_per_second_t frontRight,
|
||||
wpi::units::feet_per_second_t rearLeft,
|
||||
wpi::units::feet_per_second_t rearRight
|
||||
){
|
||||
return MecanumDriveWheelSpeeds{frontLeft, frontRight, rearLeft, rearRight};
|
||||
}, py::arg("frontLeft"), py::arg("frontRight"),
|
||||
py::arg("rearLeft"), py::arg("rearRight"))
|
||||
.def_property("frontLeft_fps",
|
||||
[](MecanumDriveWheelSpeeds * self) -> units::feet_per_second_t {
|
||||
[](MecanumDriveWheelSpeeds * self) -> wpi::units::feet_per_second_t {
|
||||
return self->frontLeft;
|
||||
},
|
||||
[](MecanumDriveWheelSpeeds * self, units::feet_per_second_t fps) {
|
||||
[](MecanumDriveWheelSpeeds * self, wpi::units::feet_per_second_t fps) {
|
||||
self->frontLeft = fps;
|
||||
}
|
||||
)
|
||||
.def_property("frontRight_fps",
|
||||
[](MecanumDriveWheelSpeeds * self) -> units::feet_per_second_t {
|
||||
[](MecanumDriveWheelSpeeds * self) -> wpi::units::feet_per_second_t {
|
||||
return self->frontRight;
|
||||
},
|
||||
[](MecanumDriveWheelSpeeds * self, units::feet_per_second_t fps) {
|
||||
[](MecanumDriveWheelSpeeds * self, wpi::units::feet_per_second_t fps) {
|
||||
self->frontRight = fps;
|
||||
}
|
||||
)
|
||||
.def_property("rearLeft_fps",
|
||||
[](MecanumDriveWheelSpeeds * self) -> units::feet_per_second_t {
|
||||
[](MecanumDriveWheelSpeeds * self) -> wpi::units::feet_per_second_t {
|
||||
return self->rearLeft;
|
||||
},
|
||||
[](MecanumDriveWheelSpeeds * self, units::feet_per_second_t fps) {
|
||||
[](MecanumDriveWheelSpeeds * self, wpi::units::feet_per_second_t fps) {
|
||||
self->rearLeft = fps;
|
||||
}
|
||||
)
|
||||
.def_property("rearRight_fps",
|
||||
[](MecanumDriveWheelSpeeds * self) -> units::feet_per_second_t {
|
||||
[](MecanumDriveWheelSpeeds * self) -> wpi::units::feet_per_second_t {
|
||||
return self->rearRight;
|
||||
},
|
||||
[](MecanumDriveWheelSpeeds * self, units::feet_per_second_t fps) {
|
||||
[](MecanumDriveWheelSpeeds * self, wpi::units::feet_per_second_t fps) {
|
||||
self->rearRight = fps;
|
||||
}
|
||||
)
|
||||
@@ -78,4 +78,4 @@ inline_code: |
|
||||
})
|
||||
;
|
||||
|
||||
SetupWPyStruct<frc::MecanumDriveWheelSpeeds>(cls_MecanumDriveWheelSpeeds);
|
||||
SetupWPyStruct<wpi::math::MecanumDriveWheelSpeeds>(cls_MecanumDriveWheelSpeeds);
|
||||
|
||||
@@ -6,7 +6,7 @@ extra_includes:
|
||||
- wpi/math/kinematics/SwerveDriveKinematics.hpp
|
||||
|
||||
classes:
|
||||
frc::Odometry:
|
||||
wpi::math::Odometry:
|
||||
template_params:
|
||||
- WheelSpeeds
|
||||
- WheelPositions
|
||||
@@ -21,32 +21,32 @@ classes:
|
||||
|
||||
templates:
|
||||
DifferentialDriveOdometryBase:
|
||||
qualname: frc::Odometry
|
||||
qualname: wpi::math::Odometry
|
||||
params:
|
||||
- frc::DifferentialDriveWheelSpeeds
|
||||
- frc::DifferentialDriveWheelPositions
|
||||
- wpi::math::DifferentialDriveWheelSpeeds
|
||||
- wpi::math::DifferentialDriveWheelPositions
|
||||
MecanumDriveOdometryBase:
|
||||
qualname: frc::Odometry
|
||||
qualname: wpi::math::Odometry
|
||||
params:
|
||||
- frc::MecanumDriveWheelSpeeds
|
||||
- frc::MecanumDriveWheelPositions
|
||||
- wpi::math::MecanumDriveWheelSpeeds
|
||||
- wpi::math::MecanumDriveWheelPositions
|
||||
SwerveDrive2OdometryBase:
|
||||
qualname: frc::Odometry
|
||||
qualname: wpi::math::Odometry
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,2>
|
||||
- wpi::array<frc::SwerveModulePosition,2>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,2>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,2>
|
||||
SwerveDrive3OdometryBase:
|
||||
qualname: frc::Odometry
|
||||
qualname: wpi::math::Odometry
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,3>
|
||||
- wpi::array<frc::SwerveModulePosition,3>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,3>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,3>
|
||||
SwerveDrive4OdometryBase:
|
||||
qualname: frc::Odometry
|
||||
qualname: wpi::math::Odometry
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,4>
|
||||
- wpi::array<frc::SwerveModulePosition,4>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,4>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,4>
|
||||
SwerveDrive6OdometryBase:
|
||||
qualname: frc::Odometry
|
||||
qualname: wpi::math::Odometry
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,6>
|
||||
- wpi::array<frc::SwerveModulePosition,6>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,6>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,6>
|
||||
|
||||
@@ -6,7 +6,7 @@ extra_includes:
|
||||
- wpi/math/kinematics/SwerveDriveKinematics.hpp
|
||||
|
||||
classes:
|
||||
frc::Odometry3d:
|
||||
wpi::math::Odometry3d:
|
||||
template_params:
|
||||
- WheelSpeeds
|
||||
- WheelPositions
|
||||
@@ -22,32 +22,32 @@ classes:
|
||||
|
||||
templates:
|
||||
DifferentialDriveOdometry3dBase:
|
||||
qualname: frc::Odometry3d
|
||||
qualname: wpi::math::Odometry3d
|
||||
params:
|
||||
- frc::DifferentialDriveWheelSpeeds
|
||||
- frc::DifferentialDriveWheelPositions
|
||||
- wpi::math::DifferentialDriveWheelSpeeds
|
||||
- wpi::math::DifferentialDriveWheelPositions
|
||||
MecanumDriveOdometry3dBase:
|
||||
qualname: frc::Odometry3d
|
||||
qualname: wpi::math::Odometry3d
|
||||
params:
|
||||
- frc::MecanumDriveWheelSpeeds
|
||||
- frc::MecanumDriveWheelPositions
|
||||
- wpi::math::MecanumDriveWheelSpeeds
|
||||
- wpi::math::MecanumDriveWheelPositions
|
||||
SwerveDrive2Odometry3dBase:
|
||||
qualname: frc::Odometry3d
|
||||
qualname: wpi::math::Odometry3d
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,2>
|
||||
- wpi::array<frc::SwerveModulePosition,2>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,2>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,2>
|
||||
SwerveDrive3Odometry3dBase:
|
||||
qualname: frc::Odometry3d
|
||||
qualname: wpi::math::Odometry3d
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,3>
|
||||
- wpi::array<frc::SwerveModulePosition,3>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,3>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,3>
|
||||
SwerveDrive4Odometry3dBase:
|
||||
qualname: frc::Odometry3d
|
||||
qualname: wpi::math::Odometry3d
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,4>
|
||||
- wpi::array<frc::SwerveModulePosition,4>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,4>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,4>
|
||||
SwerveDrive6Odometry3dBase:
|
||||
qualname: frc::Odometry3d
|
||||
qualname: wpi::math::Odometry3d
|
||||
params:
|
||||
- wpi::array<frc::SwerveModuleState,6>
|
||||
- wpi::array<frc::SwerveModulePosition,6>
|
||||
- wpi::util::array<wpi::math::SwerveModuleState,6>
|
||||
- wpi::util::array<wpi::math::SwerveModulePosition,6>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
classes:
|
||||
frc::SwerveDriveKinematics:
|
||||
wpi::math::SwerveDriveKinematics:
|
||||
force_type_casters:
|
||||
- wpi::array
|
||||
- wpi::util::array
|
||||
template_params:
|
||||
- size_t NumModules
|
||||
methods:
|
||||
@@ -9,14 +9,14 @@ classes:
|
||||
overloads:
|
||||
ModuleTranslations&&...:
|
||||
ignore: true
|
||||
const wpi::array<Translation2d, NumModules>&:
|
||||
const wpi::util::array<Translation2d, NumModules>&:
|
||||
ignore: true
|
||||
|
||||
ResetHeadings:
|
||||
overloads:
|
||||
ModuleHeadings&&...:
|
||||
ignore: true
|
||||
wpi::array<Rotation2d, NumModules>:
|
||||
wpi::util::array<Rotation2d, NumModules>:
|
||||
|
||||
ToSwerveModuleStates:
|
||||
doc: |
|
||||
@@ -48,29 +48,29 @@ classes:
|
||||
overloads:
|
||||
ModuleStates&&... [const]:
|
||||
ignore: true
|
||||
const wpi::array<SwerveModuleState, NumModules>& [const]:
|
||||
const wpi::util::array<SwerveModuleState, NumModules>& [const]:
|
||||
ToTwist2d:
|
||||
overloads:
|
||||
ModuleDeltas&&... [const]:
|
||||
ignore: true
|
||||
wpi::array<SwerveModulePosition, NumModules> [const]:
|
||||
const wpi::array<SwerveModulePosition, NumModules>&, const wpi::array<SwerveModulePosition, NumModules>& [const]:
|
||||
wpi::util::array<SwerveModulePosition, NumModules> [const]:
|
||||
const wpi::util::array<SwerveModulePosition, NumModules>&, const wpi::util::array<SwerveModulePosition, NumModules>& [const]:
|
||||
DesaturateWheelSpeeds:
|
||||
overloads:
|
||||
wpi::array<SwerveModuleState, NumModules>*, units::meters_per_second_t:
|
||||
wpi::util::array<SwerveModuleState, NumModules>*, wpi::units::meters_per_second_t:
|
||||
cpp_code: |
|
||||
[](wpi::array<SwerveModuleState, NumModules> moduleStates, units::meters_per_second_t attainableMaxSpeed) {
|
||||
frc::SwerveDriveKinematics<NumModules>::DesaturateWheelSpeeds(&moduleStates, attainableMaxSpeed);
|
||||
[](wpi::util::array<SwerveModuleState, NumModules> moduleStates, wpi::units::meters_per_second_t attainableMaxSpeed) {
|
||||
wpi::math::SwerveDriveKinematics<NumModules>::DesaturateWheelSpeeds(&moduleStates, attainableMaxSpeed);
|
||||
return moduleStates;
|
||||
}
|
||||
? wpi::array<SwerveModuleState, NumModules>*, ChassisSpeeds, units::meters_per_second_t, units::meters_per_second_t, units::radians_per_second_t
|
||||
? wpi::util::array<SwerveModuleState, NumModules>*, ChassisSpeeds, wpi::units::meters_per_second_t, wpi::units::meters_per_second_t, wpi::units::radians_per_second_t
|
||||
: cpp_code: |
|
||||
[](wpi::array<SwerveModuleState, NumModules> moduleStates,
|
||||
[](wpi::util::array<SwerveModuleState, NumModules> moduleStates,
|
||||
ChassisSpeeds currentChassisSpeed,
|
||||
units::meters_per_second_t attainableMaxModuleSpeed,
|
||||
units::meters_per_second_t attainableMaxRobotTranslationSpeed,
|
||||
units::radians_per_second_t attainableMaxRobotRotationSpeed) {
|
||||
frc::SwerveDriveKinematics<NumModules>::DesaturateWheelSpeeds(&moduleStates, currentChassisSpeed, attainableMaxModuleSpeed, attainableMaxRobotTranslationSpeed, attainableMaxRobotRotationSpeed);
|
||||
wpi::units::meters_per_second_t attainableMaxModuleSpeed,
|
||||
wpi::units::meters_per_second_t attainableMaxRobotTranslationSpeed,
|
||||
wpi::units::radians_per_second_t attainableMaxRobotRotationSpeed) {
|
||||
wpi::math::SwerveDriveKinematics<NumModules>::DesaturateWheelSpeeds(&moduleStates, currentChassisSpeed, attainableMaxModuleSpeed, attainableMaxRobotTranslationSpeed, attainableMaxRobotRotationSpeed);
|
||||
return moduleStates;
|
||||
}
|
||||
|
||||
@@ -91,18 +91,18 @@ classes:
|
||||
|
||||
templates:
|
||||
SwerveDrive2Kinematics:
|
||||
qualname: frc::SwerveDriveKinematics
|
||||
qualname: wpi::math::SwerveDriveKinematics
|
||||
params:
|
||||
- 2
|
||||
SwerveDrive3Kinematics:
|
||||
qualname: frc::SwerveDriveKinematics
|
||||
qualname: wpi::math::SwerveDriveKinematics
|
||||
params:
|
||||
- 3
|
||||
SwerveDrive4Kinematics:
|
||||
qualname: frc::SwerveDriveKinematics
|
||||
qualname: wpi::math::SwerveDriveKinematics
|
||||
params:
|
||||
- 4
|
||||
SwerveDrive6Kinematics:
|
||||
qualname: frc::SwerveDriveKinematics
|
||||
qualname: wpi::math::SwerveDriveKinematics
|
||||
params:
|
||||
- 6
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
classes:
|
||||
frc::SwerveDriveOdometry:
|
||||
wpi::math::SwerveDriveOdometry:
|
||||
force_no_trampoline: true
|
||||
template_params:
|
||||
- size_t NumModules
|
||||
@@ -7,18 +7,18 @@ classes:
|
||||
SwerveDriveOdometry:
|
||||
templates:
|
||||
SwerveDrive2Odometry:
|
||||
qualname: frc::SwerveDriveOdometry
|
||||
qualname: wpi::math::SwerveDriveOdometry
|
||||
params:
|
||||
- 2
|
||||
SwerveDrive3Odometry:
|
||||
qualname: frc::SwerveDriveOdometry
|
||||
qualname: wpi::math::SwerveDriveOdometry
|
||||
params:
|
||||
- 3
|
||||
SwerveDrive4Odometry:
|
||||
qualname: frc::SwerveDriveOdometry
|
||||
qualname: wpi::math::SwerveDriveOdometry
|
||||
params:
|
||||
- 4
|
||||
SwerveDrive6Odometry:
|
||||
qualname: frc::SwerveDriveOdometry
|
||||
qualname: wpi::math::SwerveDriveOdometry
|
||||
params:
|
||||
- 6
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
classes:
|
||||
frc::SwerveDriveOdometry3d:
|
||||
wpi::math::SwerveDriveOdometry3d:
|
||||
force_no_trampoline: true
|
||||
template_params:
|
||||
- size_t NumModules
|
||||
@@ -8,18 +8,18 @@ classes:
|
||||
|
||||
templates:
|
||||
SwerveDrive2Odometry3d:
|
||||
qualname: frc::SwerveDriveOdometry3d
|
||||
qualname: wpi::math::SwerveDriveOdometry3d
|
||||
params:
|
||||
- 2
|
||||
SwerveDrive3Odometry3d:
|
||||
qualname: frc::SwerveDriveOdometry3d
|
||||
qualname: wpi::math::SwerveDriveOdometry3d
|
||||
params:
|
||||
- 3
|
||||
SwerveDrive4Odometry3d:
|
||||
qualname: frc::SwerveDriveOdometry3d
|
||||
qualname: wpi::math::SwerveDriveOdometry3d
|
||||
params:
|
||||
- 4
|
||||
SwerveDrive6Odometry3d:
|
||||
qualname: frc::SwerveDriveOdometry3d
|
||||
qualname: wpi::math::SwerveDriveOdometry3d
|
||||
params:
|
||||
- 6
|
||||
|
||||
@@ -2,7 +2,7 @@ extra_includes:
|
||||
- wpystruct.h
|
||||
|
||||
classes:
|
||||
frc::SwerveModulePosition:
|
||||
wpi::math::SwerveModulePosition:
|
||||
force_no_default_constructor: true
|
||||
attributes:
|
||||
distance:
|
||||
@@ -13,15 +13,15 @@ classes:
|
||||
inline_code: |
|
||||
.def(
|
||||
py::init<
|
||||
units::meter_t, frc::Rotation2d
|
||||
wpi::units::meter_t, wpi::math::Rotation2d
|
||||
>(),
|
||||
py::arg("distance") = 0, py::arg("angle") = frc::Rotation2d()
|
||||
py::arg("distance") = 0, py::arg("angle") = wpi::math::Rotation2d()
|
||||
)
|
||||
.def_property("distance_ft",
|
||||
[](SwerveModulePosition * self) -> units::foot_t {
|
||||
[](SwerveModulePosition * self) -> wpi::units::foot_t {
|
||||
return self->distance;
|
||||
},
|
||||
[](SwerveModulePosition * self, units::foot_t distance) {
|
||||
[](SwerveModulePosition * self, wpi::units::foot_t distance) {
|
||||
self->distance = distance;
|
||||
}
|
||||
)
|
||||
@@ -31,4 +31,4 @@ classes:
|
||||
})
|
||||
|
||||
inline_code: |
|
||||
SetupWPyStruct<frc::SwerveModulePosition>(cls_SwerveModulePosition);
|
||||
SetupWPyStruct<wpi::math::SwerveModulePosition>(cls_SwerveModulePosition);
|
||||
|
||||
@@ -2,7 +2,7 @@ extra_includes:
|
||||
- wpystruct.h
|
||||
|
||||
classes:
|
||||
frc::SwerveModuleState:
|
||||
wpi::math::SwerveModuleState:
|
||||
force_no_default_constructor: true
|
||||
attributes:
|
||||
speed:
|
||||
@@ -20,15 +20,15 @@ inline_code: |
|
||||
cls_SwerveModuleState
|
||||
.def(
|
||||
py::init<
|
||||
units::meters_per_second_t, frc::Rotation2d
|
||||
wpi::units::meters_per_second_t, wpi::math::Rotation2d
|
||||
>(),
|
||||
py::arg("speed") = 0, py::arg("angle") = frc::Rotation2d()
|
||||
py::arg("speed") = 0, py::arg("angle") = wpi::math::Rotation2d()
|
||||
)
|
||||
.def_property("speed_fps",
|
||||
[](SwerveModuleState * self) -> units::feet_per_second_t {
|
||||
[](SwerveModuleState * self) -> wpi::units::feet_per_second_t {
|
||||
return self->speed;
|
||||
},
|
||||
[](SwerveModuleState * self, units::feet_per_second_t speed) {
|
||||
[](SwerveModuleState * self, wpi::units::feet_per_second_t speed) {
|
||||
self->speed = speed;
|
||||
}
|
||||
)
|
||||
@@ -38,4 +38,4 @@ inline_code: |
|
||||
})
|
||||
;
|
||||
|
||||
SetupWPyStruct<frc::SwerveModuleState>(cls_SwerveModuleState);
|
||||
SetupWPyStruct<wpi::math::SwerveModuleState>(cls_SwerveModuleState);
|
||||
|
||||
Reference in New Issue
Block a user