Skip to content

Conversation

@sinha7y
Copy link
Collaborator

@sinha7y sinha7y commented Jan 15, 2026

changed tf base from map to world

@sinha7y sinha7y requested a review from a team January 15, 2026 22:13
@greptile-apps
Copy link

greptile-apps bot commented Jan 15, 2026

Greptile Summary

This PR fixes TF frame consistency in the navigation system by changing references from map to world frame in three methods: tag_location() (line 96), _navigate_by_tagged_location() (line 165), and _get_goal_pose_from_result() (line 396).

Key changes:

  • Fixed frame mismatch where tagged locations were stored in world coordinates but navigation goals were created with map frame
  • Aligns with the TF tree structure where map is parent to world (rosnav.py:231-232)
  • Ensures consistency with the A* path planner which uses world frame for all generated paths (min_cost_astar.py)

This resolves the frame mismatch issue identified in the previous review thread.

Confidence Score: 5/5

  • This PR is safe to merge with no risk - it fixes a legitimate frame mismatch bug
  • The changes are minimal, focused, and correct the identified frame inconsistency. All three changes align the navigation skill with the rest of the navigation stack which uses world frame. The TF tree structure confirms mapworld relationship, and the A* planner already uses world frame for paths.
  • No files require special attention

Important Files Changed

Filename Overview
dimos/agents/skills/navigation.py Fixed TF frame consistency by changing from map to world frame in tag_location, navigate_by_tagged_location, and _get_goal_pose_from_result methods

Sequence Diagram

sequenceDiagram
    participant Agent as Navigation Skill
    participant SM as SpatialMemory
    participant TF as TF Tree
    participant Nav as NavigationInterface
    
    Note over Agent,Nav: Tag Location Flow
    Agent->>TF: get("world", "base_link")
    TF-->>Agent: Transform (world coords)
    Agent->>SM: tag_location(name, world_coords)
    SM-->>Agent: Success
    
    Note over Agent,Nav: Navigate to Tagged Location Flow
    Agent->>SM: query_tagged_location(name)
    SM-->>Agent: RobotLocation (world coords)
    Agent->>Agent: Create PoseStamped(frame_id="world")
    Agent->>Nav: set_goal(pose_world)
    Nav-->>Agent: Goal reached
    
    Note over TF: TF Tree: map → world → base_link
    Note over TF: A* planner uses world frame for all paths
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

if not self._skill_started:
raise ValueError(f"{self} has not been started.")
tf = self.tf.get("map", "base_link", time_tolerance=2.0)
tf = self.tf.get("world", "base_link", time_tolerance=2.0)
Copy link

Choose a reason for hiding this comment

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

logic: frame mismatch: tagging uses world frame but navigation to tagged locations uses map frame (line 165). In the TF tree, map is parent to world (rosnav.py:231-232). When retrieving a tagged location, the stored coordinates will be in world frame but the navigation goal is created with frame_id="map", causing incorrect positioning.

Suggested change
tf = self.tf.get("world", "base_link", time_tolerance=2.0)
tf = self.tf.get("map", "base_link", time_tolerance=2.0)

Copy link
Contributor

Choose a reason for hiding this comment

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

@sinha7y is this true

Copy link
Collaborator Author

@sinha7y sinha7y Jan 16, 2026

Choose a reason for hiding this comment

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

it was fixed with the previous commit

@sinha7y
Copy link
Collaborator Author

sinha7y commented Jan 16, 2026

@greptile

Copy link
Contributor

@leshy leshy left a comment

Choose a reason for hiding this comment

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

this will likely break go2, issue here is that we don't have settings for this and policy for frame naming, can add a setting for this at the nav skillcontainer for now

mujoco_connection.py:                frame_id="world",
type/lidar.py:            frame_id="world",
type/odometry.py:        return Odometry(position=pos, orientation=rot, ts=ts, frame_id="world")
unitree_go2_blueprints.py:            ("world/robot/camera", "camera_optical", GO2Connection.camera_info_static),
unitree_skill_container.py:        tf = self.tf.get("world", "base_link")

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.

4 participants