Skip to content

Stuck State Cleanup and Refactor - #436

Merged
108 commits merged into
developmentfrom
stuck-state-changes
May 24, 2026
Merged

Stuck State Cleanup and Refactor#436
108 commits merged into
developmentfrom
stuck-state-changes

Conversation

@ClayJay3

Copy link
Copy Markdown
Member

Description

Adds stuck state logic for search pattern. Also abstracts path splicing code into stuck state via the Waypoint Handlers StorePath and RetrievePath methods.

Changes Made

  • Moved splicing logic used for Navigating into Stuck State. There are not very many changes except the usage of the Waypoint Handlers StorePath and RetrievePath methods.
  • Due to Search Pattern reversing its path for a reverse spiral, when in the forward spiral, stuck state needs to store two paths. One path is the remaining path of the forward spiral with the obstacle splice. The other path is the entire path with obstacle splice. The first path is given to the visualizer and pure pursuit controller and the other path replaces the m_vSearchPath so it can be correctly reversed when end of path is reached.
  • Due to needing two paths to be spliced, the splicing part of the code was moved to its own function to make the code significantly less evil.

Testing

  • Tested on Linux Mint
  • Sim Tested
    1. Tested in Navigating State
    2. Tested in Search Pattern in first spiral
    3. Tested in Search Pattern reverse spiral

**Screenshots/Video

obstacle path with forward spiral
image
same obstacle path after reverse spiral
image
navigating obstacle path
image

Known Issues

  • TODO: closest point used for the point filter is not necessarily current point in path (thinking of seach state drifting). Maybe use target index from path controller instead?

Diamondman32 and others added 30 commits October 11, 2025 00:29
@ClayJay3
ClayJay3 requested a review from a team as a code owner May 20, 2026 14:59
@ClayJay3 ClayJay3 added cleanup Code refactoring or cleanup tasks to remove deprecated features, improve clarity, or ensure code qua state-machine Issues related to the implementation, design, or modification of state machines in the system. labels May 20, 2026
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 medium

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
Performance 2 medium

View in Codacy

🟢 Metrics 98 complexity · -13 duplication

Metric Results
Complexity 98
Duplication -13

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request performs a significant refactor of the Autonomy software stack, including migrating the LiDAR database backend from SQLite to DuckDB, removing legacy TensorFlow/EdgeTPU dependencies, and updating the state machine logic for approaching markers and objects. Additionally, it includes updates to the dev container configuration and visualization tools. My review identified a critical configuration error in the devcontainer.json file and an out-of-bounds access issue in the logging module due to removed functionality.

Comment thread .devcontainer/devcontainer.json
Comment thread src/AutonomyLogging.h
@ClayJay3 ClayJay3 closed this pull request by merging all changes into development in b6112e8 May 24, 2026
@ClayJay3
ClayJay3 deleted the stuck-state-changes branch May 24, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code refactoring or cleanup tasks to remove deprecated features, improve clarity, or ensure code qua state-machine Issues related to the implementation, design, or modification of state machines in the system.

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

8 participants