pbio/trajectory: Walk position trajectories in full.
@@ -106,7 +106,10 @@ static void walk_trajectory(pbio_trajectory_t *trj) {
// Start and end angles in millidegrees.
static const pbio_angle_t angles[] = {
{.rotations = 0, .millidegrees = 0 },
- {.rotations = 0, .millidegrees = 30 * 1000 },
+ {.rotations = 0, .millidegrees = 1 * MDEG_PER_DEG },
+ {.rotations = 0, .millidegrees = 30 * MDEG_PER_DEG },
+ {.rotations = 0, .millidegrees = 360 * MDEG_PER_DEG },
+ {.rotations = -4, .millidegrees = 0},
{.rotations = -123, .millidegrees = 456 },
{.rotations = INT32_MAX / 4, .millidegrees = INT32_MAX / 4 },
};
@@ -295,6 +298,9 @@ static void test_position_trajectory(void *env) {
pbio_trajectory_get_reference(&trj, command.time_start, &ref);
get_position_command(i, &command);
tt_want(pbio_math_sign_not_opposite(ref.speed, command.speed_start));
+
+ // Walk the whole trajectory.
+ walk_trajectory(&trj);
}
}
