mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[robotpy] Mirror most other subprojects (#8208)
GitOrigin-RevId: ac60fd3cf4a24023184376687da28373d14b781a This mirrors the robotpy files for the following projects: - apriltag - datalog - hal - ntcore - romiVendordep - wpilibc - wpimath - xrpVendordep This excludes cscore and the halsim wrappers for at this time. NOTE: This does not hook these projects up to the build system, just simply mirrors the files. The building will take place in a follow up PR to make it easier to review the changes necessary to build.
This commit is contained in:
55
wpimath/src/main/python/semiwrap/geometry/Rotation2d.yml
Normal file
55
wpimath/src/main/python/semiwrap/geometry/Rotation2d.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
extra_includes:
|
||||
- rpy/geometryToString.h
|
||||
- wpystruct.h
|
||||
|
||||
functions:
|
||||
to_json:
|
||||
ignore: true
|
||||
from_json:
|
||||
ignore: true
|
||||
classes:
|
||||
frc::Rotation2d:
|
||||
methods:
|
||||
Rotation2d:
|
||||
overloads:
|
||||
'':
|
||||
auto:
|
||||
doc: |
|
||||
Constructs a Rotation2d with the given radian value.
|
||||
:param value: The value of the angle in radians.
|
||||
param_override:
|
||||
value:
|
||||
x_type: units::radian_t
|
||||
template_impls:
|
||||
- [units::radian_t]
|
||||
double, double:
|
||||
const Eigen::Matrix2d&:
|
||||
rename: fromMatrix
|
||||
keepalive: []
|
||||
RotateBy:
|
||||
ToMatrix:
|
||||
Radians:
|
||||
Degrees:
|
||||
Cos:
|
||||
Sin:
|
||||
Tan:
|
||||
operator+:
|
||||
operator-:
|
||||
overloads:
|
||||
const Rotation2d& [const]:
|
||||
'[const]':
|
||||
operator*:
|
||||
operator/:
|
||||
operator==:
|
||||
|
||||
inline_code: |
|
||||
cls_Rotation2d
|
||||
.def_static("fromDegrees", [](units::degree_t value) {
|
||||
return std::make_unique<Rotation2d>(value);
|
||||
}, py::arg("value"))
|
||||
.def_static("fromRotations", [](units::turn_t value) {
|
||||
return std::make_unique<Rotation2d>(value);
|
||||
})
|
||||
.def("__repr__", py::overload_cast<const Rotation2d&>(&rpy::toString));
|
||||
|
||||
SetupWPyStruct<frc::Rotation2d>(cls_Rotation2d);
|
||||
Reference in New Issue
Block a user