Skip to content

Fix slotcar final orientation#162

Merged
xiyuoh merged 1 commit intoopen-rmf:mainfrom
kjchee:fix/slotcar-final-rotation
May 1, 2026
Merged

Fix slotcar final orientation#162
xiyuoh merged 1 commit intoopen-rmf:mainfrom
kjchee:fix/slotcar-final-rotation

Conversation

@kjchee
Copy link
Copy Markdown
Contributor

@kjchee kjchee commented Apr 29, 2026

Bug fix

Fixed bug

Robots do not rotate to the requested final orientation.

Fix applied

a. Root cause:
When a caller (specifically when processing final destination orientation) passes dpos = Zero() along with a requested_heading, the early-return if (dpos.norm() < 1e-3) always triggers first and returns 0.0. The requested_heading is never processed, so the function reports rotation change = 0.0.

b. Fix:
Added a && !requested_heading check so the early-return doesn't trigger when the caller actually requests a rotation.

c. To Test:

  1. launch office
ros2 launch rmf_demos_gz office.launch.xml
  1. send robot to a patrol_A2 with specific orientation 90 degree
ros2 run rmf_demos_tasks dispatch_go_to_place -p patrol_A2 -o 90 --use_sim_time

Signed-off-by: kjchee <keai_jiang_chee@cgh.com.sg>
Copy link
Copy Markdown
Member

@xiyuoh xiyuoh left a comment

Choose a reason for hiding this comment

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

Great catch! Thanks for the fix, tested and works as expected

@xiyuoh xiyuoh merged commit dd32b1a into open-rmf:main May 1, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Inbox to Done in PMC Board May 1, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (d9c2a90) to head (79448ce).
⚠️ Report is 47 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main   #162       +/-   ##
=========================================
  Coverage    0.00%      0               
=========================================
  Files        1368      0     -1368     
  Lines      134666      0   -134666     
=========================================
+ Misses     134666      0   -134666     
Flag Coverage Δ
tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1368 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants