Add tick-based time unit and segmented RLE plan encoding support#69
Open
joonyeol-sim wants to merge 1 commit intodevfrom
Open
Add tick-based time unit and segmented RLE plan encoding support#69joonyeol-sim wants to merge 1 commit intodevfrom
joonyeol-sim wants to merge 1 commit intodevfrom
Conversation
94979b7 to
5678944
Compare
- Extract `decode_segmented_rle_string_path()` as instance method from nested function - Move method definition above `extract_agent_actions()` for logical ordering - Update call site to use `self.decode_segmented_rle_string_path()` - No functional changes to decoding logic or validation Refactor segmented RLE decoding to support inline string format in path fields - Replace `decode_segmented_rle_actions()` with `extract_agent_actions()` that handles both segmented-rle-v1 string chunks and legacy comma-separated motions - Add `decode_segmented_rle_string_path()` to parse inline format: `[(startTick,x,y,dir,counter):(action ticks,...)]` - Remove support for separate `actualPlanSegments`/`plannerPlanSegments` fields; decode directly from path strings - Validate chunk contiguity, state field count, and run format in string-based RLE paths - Simplify caller code by consolidating action extraction into single method Support compact format for segmented RLE action encoding - Add compact format: agent-indexed list with [start_state_with_tick, tick_actions] entries - Extract `decode_tick_actions_list()` helper to decode RLE runs shared by both formats - Support 'tick_actions' field name in legacy format (fallback to 'runs') - Validate contiguous tick sequences and start states in compact format - Handle JSON-encoded start_state_with_tick arrays in compact format Add tick and timestep display labels with timeline synchronization - Add separate tick label UI element above timestep label - Implement `set_time_labels()` to compute and update both tick and timestep values based on timeline position - Replace hardcoded `self.pcf.moves` with `animation_substeps` in forward/backward animation loops - Update timeline slider callback to synchronize both labels via `set_time_labels()` - Adjust animation delay based on time unit (single delay for tick-based, double for timestep-based) Add tick-based time unit support with segmented RLE action decoding - Add `timeUnit`, `ticksPerTimestep`, and `animationSubsteps` configuration fields - Implement `decode_segmented_rle_actions()` to parse RLE-encoded action segments with tick granularity - Add `transition_state()` for fractional state transitions within timesteps - Extract actions using new `extract_agent_actions()` with fallback to legacy comma-separated paths - Support `makespanTicks` field and adjust animation delay for tick-based plans - Apply tick-based transitions when rendering actual and planner paths Add support for fractional orientations in angle and direction calculations - Extend `get_angle()` to handle non-integer directions using linear interpolation - Update `get_dir_loc()` to calculate directional indicator positions for fractional orientations using trigonometry - Modify `get_rotate()` to compute rotation deltas for fractional directions
70a02c9 to
73ac8a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
planEncoding.timeUnit: "tick") with fractional state transitions, enabling finer-grained animation for 2026 Startkit compatibilityactualPlanSegments/plannerPlanSegments) as a new compact plan format alongside the existing comma-separated legacy pathsget_angle,get_dir_loc, andget_rotationfor smooth intermediate tick renderingRelated Isseus #68