Repository: robotpy/robotpy-wpimath (language: python)

Issue:
[BUG]: TrajectoryParameterizer returns None
### Problem description

TrajectoryParameterizer.parameterizeTrajectory() [is meant to return a trajectory](https://github.com/wpilibsuite/allwpilib/blob/main/wpimath/src/main/java/edu/wpi/first/math/trajectory/TrajectoryParameterizer.java#L57) but returns None and [appears to have been overwritten to do nothing](https://github.com/robotpy/robotpy-wpimath/blob/main/gen/controls/TrajectoryParameterizer.yml#L13-L22).

### Operating System

Windows

### Installed Python Packages

```text
fresh python 3.8.6 venv with just `robotpy[all] --pre` installed
```


### Reproducible example code

```text
from wpimath.trajectory import TrajectoryParameterizer
from wpimath.spline import CubicHermiteSpline, SplineHelper
from wpimath.geometry import Pose2d
from typing import Tuple
from math import pi

start = Pose2d(1, 1, 0)
end = Pose2d(2, 2, pi/2)

# generate the spline from start and end poses
vec1, vec2 = SplineHelper.cubicControlVectorsFromWaypoints(start, [], end)
spline = CubicHermiteSpline(vec1.x, vec2.x, vec1.y, vec2.y)

# sample the pose and curvature along the spline
points: Tuple[Pose2d, float] = []
for i in range(100):
    points.append(spline.getPoint(i/100))

trajectory = TrajectoryParameterizer.timeParameterizeTrajectory(points, [], 0, 0, 4, 3, False)
print(trajectory) # None
```



Discussion / hints:
lol oops

Fix patch:
diff --git a/gen/controls/TrajectoryParameterizer.yml b/gen/controls/TrajectoryParameterizer.yml
index 165d13e..e3b3cf8 100644
--- a/gen/controls/TrajectoryParameterizer.yml
+++ b/gen/controls/TrajectoryParameterizer.yml
@@ -9,14 +9,3 @@ classes:
     - units::curvature_t
     methods:
       TimeParameterizeTrajectory:
-        cpp_code: |
-          [](
-            const std::vector<TrajectoryParameterizer::PoseWithCurvature>& points,
-            const std::vector<std::shared_ptr<TrajectoryConstraint>>& constraints,
-            units::meters_per_second_t startVelocity,
-            units::meters_per_second_t endVelocity,
-            units::meters_per_second_t maxVelocity,
-            units::meters_per_second_squared_t maxAcceleration, bool reversed
-          ){
-
-          }


Test patch:
diff --git a/tests/test_trajectory.py b/tests/test_trajectory.py
index 6e7de74..817a63f 100644
--- a/tests/test_trajectory.py
+++ b/tests/test_trajectory.py
@@ -1,7 +1,8 @@
-from wpimath.trajectory import TrajectoryGenerator
-from wpimath.geometry import Transform2d
+from wpimath.trajectory import TrajectoryGenerator, TrajectoryParameterizer
+from wpimath.geometry import Pose2d, Transform2d
 import wpimath.trajectory
 import wpimath.trajectory.constraint
+from wpimath.spline import CubicHermiteSpline, SplineHelper
 
 from wpimath.geometry import Pose2d, Rotation2d, Translation2d
 
@@ -13,6 +14,9 @@
     RectangularRegionConstraint,
 )
 
+import math
+import typing
+
 
 def getTestTrajectory(config: TrajectoryConfig) -> Trajectory:
     # 2018 cross scale auto waypoints
@@ -113,3 +117,27 @@ def test_rectangular_region_is_pose_in_region():
     )
     assert not regionConstraint.isPoseInRegion(Pose2d())
     assert regionConstraint.isPoseInRegion(Pose2d.fromFeet(3, 14.5, Rotation2d()))
+
+
+#
+# TrajectoryParameterizer
+#
+
+
+def test_trajectory_parameterizer():
+    start = Pose2d(1, 1, 0)
+    end = Pose2d(2, 2, math.pi / 2)
+
+    # generate the spline from start and end poses
+    vec1, vec2 = SplineHelper.cubicControlVectorsFromWaypoints(start, [], end)
+    spline = CubicHermiteSpline(vec1.x, vec2.x, vec1.y, vec2.y)
+
+    # sample the pose and curvature along the spline
+    points: typing.Tuple[Pose2d, float] = []
+    for i in range(100):
+        points.append(spline.getPoint(i / 100))
+
+    trajectory = TrajectoryParameterizer.timeParameterizeTrajectory(
+        points, [], 0, 0, 4, 3, False
+    )
+    assert trajectory is not None