Conversation
Greptile SummaryThis PR fixes TF frame consistency in the navigation system by changing references from Key changes:
This resolves the frame mismatch issue identified in the previous review thread. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
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
|
dimos/agents/skills/navigation.py
Outdated
| 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) |
There was a problem hiding this comment.
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.
| tf = self.tf.get("world", "base_link", time_tolerance=2.0) | |
| tf = self.tf.get("map", "base_link", time_tolerance=2.0) |
There was a problem hiding this comment.
it was fixed with the previous commit
|
@greptile |
leshy
left a comment
There was a problem hiding this comment.
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")
changed tf base from map to world