Skip to content

Spec/ivan/trajectory#2646

Open
leshy wants to merge 6 commits into
mainfrom
spec/ivan/trajectory
Open

Spec/ivan/trajectory#2646
leshy wants to merge 6 commits into
mainfrom
spec/ivan/trajectory

Conversation

@leshy

@leshy leshy commented Jun 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds dimos/spec/nav.py, a new specification file that defines two Protocol classes for the navigation stack. All previously-flagged import issues (In/Out, Twist, Odometry) have been resolved in this version.

  • TrajectoryController accepts odometry and a desired path as inputs and emits velocity commands, a goal_reached signal, and a stop_movement control input.
  • LocalPlanner accepts lidar point-cloud data, odometry, and a path, and outputs a collision-safe path — intended for force-based or geometry-aware obstacle avoidance.
  • The name LocalPlanner conflicts with an existing LocalPlanner Protocol in dimos/spec/control.py that carries a different interface (cmd_vel only); whether the old one should be retired or renamed is unclear from the diff.

Confidence Score: 5/5

Safe to merge — this is a new spec-only file with no runtime logic, and all imports resolve to existing modules.

The change adds a pure Protocol definition file with no executable logic. All imports were verified against the actual module tree and exist. The only notable issue is a name collision with an existing Protocol in control.py, which is a documentation/clarity concern rather than a functional defect.

dimos/spec/control.py should be reviewed alongside this change to decide whether the old LocalPlanner Protocol should be renamed or retired.

Important Files Changed

Filename Overview
dimos/spec/nav.py New file adding TrajectoryController and LocalPlanner Protocol specs for navigation; all imports are valid. LocalPlanner name duplicates an existing Protocol in control.py.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Lidar as Lidar (PointCloud2)
    participant Odometry as Odometry
    participant PathSource as Path Source
    participant LP as LocalPlanner
    participant TC as TrajectoryController
    participant Output as Robot Actuators

    Lidar->>LP: lidar: In[PointCloud2]
    Odometry->>LP: odometry: In[Odometry]
    PathSource->>LP: path: In[Path]
    LP-->>TC: safe_path: Out[Path]

    Odometry->>TC: odometry: In[Odometry]
    TC-->>Output: cmd_vel: Out[Twist]
    TC-->>Output: goal_reached: Out[bool]
    PathSource->>TC: stop_movement: In[bool]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Lidar as Lidar (PointCloud2)
    participant Odometry as Odometry
    participant PathSource as Path Source
    participant LP as LocalPlanner
    participant TC as TrajectoryController
    participant Output as Robot Actuators

    Lidar->>LP: lidar: In[PointCloud2]
    Odometry->>LP: odometry: In[Odometry]
    PathSource->>LP: path: In[Path]
    LP-->>TC: safe_path: Out[Path]

    Odometry->>TC: odometry: In[Odometry]
    TC-->>Output: cmd_vel: Out[Twist]
    TC-->>Output: goal_reached: Out[bool]
    PathSource->>TC: stop_movement: In[bool]
Loading

Reviews (3): Last reviewed commit: "fix nav spec imports: add Twist, fix bro..." | Re-trigger Greptile

Comment thread dimos/spec/nav.py Outdated
Comment thread dimos/spec/nav.py Outdated
Comment thread dimos/spec/nav.py Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #2646   +/-   ##
=======================================
  Coverage   71.10%   71.10%           
=======================================
  Files         897      897           
  Lines       80290    80290           
  Branches     7183     7183           
=======================================
+ Hits        57089    57094    +5     
+ Misses      21319    21315    -4     
+ Partials     1882     1881    -1     
Flag Coverage Δ
OS-ubuntu-24.04-arm 63.52% <ø> (+<0.01%) ⬆️
OS-ubuntu-latest 66.24% <ø> (+<0.01%) ⬆️
Py-3.10 66.22% <ø> (-0.01%) ⬇️
Py-3.11 66.23% <ø> (+<0.01%) ⬆️
Py-3.12 66.22% <ø> (-0.02%) ⬇️
Py-3.13 66.23% <ø> (+0.01%) ⬆️
Py-3.14 66.24% <ø> (+<0.01%) ⬆️
Py-3.14t 66.22% <ø> (-0.01%) ⬇️
SelfHosted-Large 30.12% <ø> (+0.02%) ⬆️
SelfHosted-Linux 37.48% <ø> (ø)
SelfHosted-macOS 36.31% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- import Twist for TrajectoryController.cmd_vel (greptile fix added In/Out but missed Twist)
- repoint Odometry from nonexistent sensor_msgs to nav_msgs
- collapse duplicate Odometry imports onto one name
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PlzReview ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant