Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions subprojects/robotpy-wpimath/tests/test_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def test_pose2d():
buffer.addSample(0, Pose2d(0, 0, Rotation2d.fromDegrees(90)))
buffer.addSample(1, Pose2d(1, 1, Rotation2d(0)))
sample = buffer.sample(0.5)
assert sample is not None
assert math.isclose(sample.X(), 1 - 1 / 2**0.5)
assert math.isclose(sample.Y(), 1 / 2**0.5)
assert math.isclose(sample.rotation().degrees(), 45)
10 changes: 9 additions & 1 deletion subprojects/robotpy-wpimath/wpimath/interpolation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
from . import _init_interpolation # noqa: F401

# autogenerated by 'robotpy-build create-imports wpimath.interpolation'
# autogenerated by 'robotpy-build create-imports wpimath.interpolation wpimath.interpolation._interpolation'
from ._interpolation import (
TimeInterpolatableFloatBuffer,
TimeInterpolatablePose2dBuffer,
TimeInterpolatablePose3dBuffer,
TimeInterpolatableRotation2dBuffer,
TimeInterpolatableRotation3dBuffer,
TimeInterpolatableTranslation2dBuffer,
TimeInterpolatableTranslation3dBuffer,
)

__all__ = [
"TimeInterpolatableFloatBuffer",
"TimeInterpolatablePose2dBuffer",
"TimeInterpolatablePose3dBuffer",
"TimeInterpolatableRotation2dBuffer",
"TimeInterpolatableRotation3dBuffer",
"TimeInterpolatableTranslation2dBuffer",
"TimeInterpolatableTranslation3dBuffer",
]
Loading