Skip to content

Add claude GitHub actions 1777390682438#1928

Open
zhangyinxina-ui wants to merge 6 commits intodimensionalOS:mainfrom
zhangyinxina-ui:add-claude-github-actions-1777390682438
Open

Add claude GitHub actions 1777390682438#1928
zhangyinxina-ui wants to merge 6 commits intodimensionalOS:mainfrom
zhangyinxina-ui:add-claude-github-actions-1777390682438

Conversation

@zhangyinxina-ui
Copy link
Copy Markdown

Problem

Closes DIM-XXX

Solution

Breaking Changes

How to Test

Contributor License Agreement

  • I have read and approved the CLA.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3469dfe11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if planar_distance > 1e-3:
duration = planar_distance / safe_speed
move_rpc(
Twist(linear=Vector3(safe_speed if x >= 0 else -safe_speed, 0.0, 0.0), angular=Vector3()),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Move forward after yaw alignment in navigate_3d

After navigate_3d rotates to atan2(y, x), the robot is already facing the requested planar target direction, so using x to choose forward/backward speed flips movement for all goals with x < 0. For example, x=-1, y=0 rotates ~180° and then drives backward, which sends the robot away from the intended offset rather than toward it. This makes a large portion of 3D navigation requests systematically incorrect.

Useful? React with 👍 / 👎.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR adds stair-climbing skills (climb_stairs_3d, navigate_3d, climb_stairs) for multi-floor simulation, a new stair_navigation waypoint-generation module, and two GitHub Actions workflows that integrate Claude for automated code review and comment responses.

  • P1 — wrong direction after yaw alignment (skill_container.py): navigate_3d rotates the robot to face the target, then uses safe_speed if x >= 0 else -safe_speed. For any target with x < 0, this drives the robot backward (away from the target) instead of forward after alignment.
  • P1 — immediate false failure in climb_stairs_3d (navigation.py): the poll loop checks IDLE+not-reached right after set_goal_rpc, before the navigation stack has had a chance to transition away from IDLE, causing every waypoint to fail on the very first poll.

Confidence Score: 3/5

Not safe to merge — two P1 defects cause incorrect robot motion and immediate false failure during stair traversal.

Two independent P1 bugs: navigate_3d drives in the wrong direction for any x<0 target, and climb_stairs_3d will falsely abort on the first poll of every waypoint if the navigation stack is even slightly slow to acknowledge the goal. Both affect the primary purpose of this PR.

dimos/robot/unitree/g1/skill_container.py (direction bug in navigate_3d) and dimos/agents/skills/navigation.py (race condition in climb_stairs_3d polling loop)

Important Files Changed

Filename Overview
dimos/robot/unitree/g1/skill_container.py Adds navigate_3d, climb_stairs, and _run_stair_sequence; navigate_3d has a P1 directional bug — after yaw-aligning to face the target, it uses negative speed for x<0, moving the robot away from the target instead of toward it.
dimos/agents/skills/navigation.py Adds climb_stairs_3d skill; the waypoint polling loop has a race condition that can immediately fail on every waypoint if the navigation stack hasn't left IDLE before the first poll.
dimos/navigation/stair_navigation.py New pure helper that generates evenly-spaced 3D PoseStamped waypoints for stair ascent/descent; logic is correct and well-validated.
dimos/navigation/test_stair_navigation.py Tests for generate_stair_waypoints covering shape, invalid inputs, and descending; assertions are correct.
dimos/robot/unitree/g1/test_skill_container.py Unit tests for G1 skill container; test_navigate_3d_uses_planar_and_stair_segments asserts forward speed for calls[1] which passes even with the direction bug for the specific (x=1,y=1) test case, so the bug goes undetected.
.github/workflows/claude-code-review.yml Adds automated Claude PR review workflow triggered on PR events; permissions are read-only for contents/pull-requests.
.github/workflows/claude.yml Adds Claude comment-response workflow triggered by @claude mentions; permissions are appropriately scoped.
dimos/agents/system_prompt.py Adds one-line mention of climb_stairs_3d to the navigation section of the system prompt.
dimos/robot/unitree/g1/system_prompt.py Updates G1 system prompt to advertise navigate_3d and climb_stairs skills with usage examples.

Sequence Diagram

sequenceDiagram
    participant Agent
    participant NavigationSkill as NavigationSkillContainer
    participant G1Skill as UnitreeG1SkillContainer
    participant NavStack as NavigationInterface RPC
    participant MoveRPC as G1ConnectionBase.move

    Note over Agent,MoveRPC: climb_stairs_3d flow (NavigationSkillContainer)
    Agent->>NavigationSkill: climb_stairs_3d(goal_x, goal_y, total_height, steps)
    NavigationSkill->>NavigationSkill: generate_stair_waypoints()
    loop For each waypoint
        NavigationSkill->>NavStack: set_goal_rpc(waypoint)
        loop Poll until timeout
            NavigationSkill->>NavStack: get_state_rpc()
            NavigationSkill->>NavStack: is_goal_reached_rpc()
        end
    end
    NavigationSkill-->>Agent: Completed stair climbing...

    Note over Agent,MoveRPC: navigate_3d flow (UnitreeG1SkillContainer)
    Agent->>G1Skill: navigate_3d(x, y, z, speed)
    G1Skill->>MoveRPC: yaw align (angular only)
    G1Skill->>MoveRPC: planar move (linear.x = +/-safe_speed) ⚠️
    G1Skill->>G1Skill: _run_stair_sequence(z)
    loop step_count segments
        G1Skill->>MoveRPC: move forward/backward
    end
    G1Skill-->>Agent: 3D navigation completed...
Loading

Reviews (1): Last reviewed commit: ""Claude Code Review workflow"" | Re-trigger Greptile

Comment on lines +144 to +147
move_rpc(
Twist(linear=Vector3(safe_speed if x >= 0 else -safe_speed, 0.0, 0.0), angular=Vector3()),
duration=duration,
)
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.

P1 Backward motion after yaw alignment sends robot in wrong direction

The yaw-alignment step (lines 132–138) rotates the robot so its forward direction points at (x, y). After that rotation, the robot should always move forward (+safe_speed) to reach the target. Using safe_speed if x >= 0 else -safe_speed is wrong: for any target where x < 0 (e.g., x=-1, y=0), the robot rotates 180° and then drives backward, which moves it away from the target instead of toward it.

move_rpc(
    Twist(linear=Vector3(safe_speed, 0.0, 0.0), angular=Vector3()),
    duration=duration,
)

Comment on lines +358 to +363
while time.time() - start_time < timeout_per_step:
if get_state_rpc() == NavigationState.IDLE:
if is_goal_reached_rpc():
break
return f"3D stair navigation failed at waypoint {idx}/{len(waypoints)}."
time.sleep(0.2)
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.

P1 Immediate IDLE→failure race condition after setting a goal

Right after set_goal_rpc(waypoint) is called, the poll loop immediately enters and checks get_state_rpc() == NavigationState.IDLE. If the navigation stack hasn't yet transitioned out of IDLE (it is still processing/acknowledging the new goal), the condition evaluates to IDLE + is_goal_reached = False, which causes an instant return of the failure string — killing the climb on every waypoint. A brief startup grace period (e.g., waiting for the state to leave IDLE before applying the IDLE=failure branch) is needed to prevent this false early-exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant