Skip to content

[ISSUE]: Nav2 action goal mismatch in edge_action_manager2 causes NavigateToPose abort #223

@ibrahimhroob

Description

@ibrahimhroob

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.py
    • topological_navigation/edge_action_manager2.py

Steps to Reproduce

  1. Run the topological navigation stack.
  2. Trigger an edge traversal that selects the action NavigateToPose (via edge action manager).
  3. 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 NavigateThroughPoses instead of NavigateToPose.

  • Current behavior suggests either:

    1. action selection is correct but the destination extraction is wrong, or
    2. action selection should be NavigateThroughPoses but is misconfigured.

Impact

  • Navigation goals abort immediately when the selected edge action is NavigateToPose.
  • Breaks autonomy execution flow and topological edge traversal.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions