Skip to content

fix: NavigateToPose.Result has no attribute error_code and log error msg#757

Merged
rachwalk merged 7 commits intomainfrom
jj/fix/nav2_error_msg
Jan 27, 2026
Merged

fix: NavigateToPose.Result has no attribute error_code and log error msg#757
rachwalk merged 7 commits intomainfrom
jj/fix/nav2_error_msg

Conversation

@Juliaj
Copy link
Collaborator

@Juliaj Juliaj commented Jan 26, 2026

Purpose

Fix

"navigate_to_pose_blocking", error: 'NavigateToPose_Result' object has no attribute 'error_code'
"navigate_to_pose_blocking", error: 'NavigateToPose_Result' object has no attribute 'error_message'

Proposed Changes

  • send_goal() returns GetResultService.Response instead of NavigateToPose.Result. It is not clear on why during runtime, it would report the attribute error of error_code. Added debug logging to investigate further.
  • To get additional error info, checking status and then error message may be more descriptive. The nav2 has limited support for error_code. _get_error_message is to support this.
  • In addition to the new tests, the changes in tests are to address [CI] Segfaults in CI with ROS2 Humble unit tests #759 and time to msg handling for humble.

Issues

  • Links to relevant issues

Testing

  • Unit test added.

@Juliaj Juliaj requested a review from rachwalk January 26, 2026 03:39
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.31%. Comparing base (d506429) to head (394154c).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ai_core/rai/tools/ros2/navigation/nav2_blocking.py 75.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #757      +/-   ##
==========================================
+ Coverage   65.79%   66.31%   +0.52%     
==========================================
  Files          78       78              
  Lines        3403     3423      +20     
==========================================
+ Hits         2239     2270      +31     
+ Misses       1164     1153      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@rachwalk rachwalk left a comment

Choose a reason for hiding this comment

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

LGTM

@rachwalk rachwalk merged commit f2105fb into main Jan 27, 2026
15 checks passed
@rachwalk rachwalk deleted the jj/fix/nav2_error_msg branch January 27, 2026 09:21
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.

2 participants