SleipnirGroup / Choreo

A graphical tool for planning time-optimized trajectories for autonomous mobile robots in the FIRST Robotics Competition.
BSD 3-Clause "New" or "Revised" License
129 stars 38 forks source link

[spec] Change `EventMarker` to use `Expr` for timestamp #738

Closed oh-yes-0-fps closed 4 days ago

shueja commented 6 days ago

Which field needs to be Expr? The wait time on event markers is already an Expr.

calcmogul commented 5 days ago

So like this?

diff --git a/src/document/2025/v2025_0_0.ts b/src/document/2025/v2025_0_0.ts
index 0b29185..d1a59a6 100644
--- a/src/document/2025/v2025_0_0.ts
+++ b/src/document/2025/v2025_0_0.ts
@@ -135,7 +135,7 @@ export interface Traj {
   params: ChoreoPath<Expr>;
   snapshot: ChoreoPath<number>;
   traj: Output;
-  events: EventMarker[];
+  events: EventMarker<Expr>[];
   pplibCommands: PplibCommandMarker<number>[];
 }

@@ -172,7 +172,7 @@ export interface PplibCommandMarker<T extends ExprOrNumber> {
   targetTimestamp: number | undefined;
   command: PplibCommand<T>;
 }
-export interface EventMarker {
+export interface EventMarker<T extends ExprOrNumber> {
   event: string;
-  timestamp: number;
+  timestamp: T;
 }
oh-yes-0-fps commented 5 days ago

Yes, but changes need to be made accordingly in rust and choreolib

shueja commented 4 days ago

Made obsolete by design changes which are now targeted for beta 2