-
Notifications
You must be signed in to change notification settings - Fork 0
tf fix for navigation to tagged location #1031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
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
|
There was a problem hiding this 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
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.
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.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sinha7y is this true
There was a problem hiding this comment.
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
|
@greptile |
leshy
left a comment
There was a problem hiding this 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")
changed tf base from map to world