-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Description
Summary
topological_navigation aborts when executing the edge action NavigateToPose because edge_action_manager2.py incorrectly assumes the Nav2 goal message has a poses[] field. NavigateToPose_Goal only contains a single pose, so the action server throws AttributeError and the goal is aborted.
Environment
-
ROS 2: Humble
-
Package:
topological_navigation -
Script(s):
topological_navigation/scripts/navigation2.pytopological_navigation/edge_action_manager2.py
Steps to Reproduce
- Run the topological navigation stack.
- Trigger an edge traversal that selects the action
NavigateToPose(via edge action manager). - Observe runtime error and aborted goal.
Expected Behavior
NavigateToPose should execute successfully, and destination extraction should use goal.pose (single pose).
Actual Behavior
The action server crashes during execute callback and aborts the goal.
Logs:
[edge_action_manager]: Executing action : NavigateToPose
[topological_navigation]: Error raised in execute callback: 'NavigateToPose_Goal' object has no attribute 'poses'
Traceback (most recent call last):
...
File ".../topological_navigation/edge_action_manager2.py", line 1388, in execute
current_destination = (target_goal.poses[-1].pose.position.x, target_goal.poses[-1].pose.position.y)
AttributeError: 'NavigateToPose_Goal' object has no attribute 'poses'
...
[topological_navigation]: Goal state not set, assuming aborted.Root Cause
edge_action_manager2.py uses:
target_goal.poses[-1]This is only valid for nav2_msgs/action/NavigateThroughPoses goals (which have poses[]).
For nav2_msgs/action/NavigateToPose, the goal field is pose (singular).
So when NavigateToPose is selected, accessing poses raises AttributeError.
Additional Notes
-
If the intended behavior is to follow multiple waypoints, then the edge action should be configured to use
NavigateThroughPosesinstead ofNavigateToPose. -
Current behavior suggests either:
- action selection is correct but the destination extraction is wrong, or
- action selection should be
NavigateThroughPosesbut is misconfigured.
Impact
- Navigation goals abort immediately when the selected edge action is
NavigateToPose. - Breaks autonomy execution flow and topological edge traversal.