Skip to content

Comments

Fix dispatch command acknowledgment message publishing#508

Open
yutaroha wants to merge 3 commits intoopen-rmf:mainfrom
yutaroha:fix_dispatch_ack
Open

Fix dispatch command acknowledgment message publishing#508
yutaroha wants to merge 3 commits intoopen-rmf:mainfrom
yutaroha:fix_dispatch_ack

Conversation

@yutaroha
Copy link
Contributor

Bug fix

Fixed bug

In dispatch_command_cb, when task reassignment succeeds, the acknowledgment message was published with success always being false (the default value). A local copy msg was created from dispatch_ack and msg.success = true was set, but the original dispatch_ack (without the flag) was mistakenly published instead of msg.

Fix applied

Changed dispatch_ack_pub->publish(dispatch_ack) to dispatch_ack_pub->publish(msg) in the success callback of reassign_dispatched_tasks in FleetUpdateHandle.cpp.

Note on behavioral impact

This fix does not change observable behavior in the current implementation. The Dispatcher's handle_dispatch_ack() (Dispatcher.cpp:998) does not check the success field of the acknowledgment message — it only uses dispatch_id and command.type to process the response, treating any received acknowledgment as an indication of success.

It may be worth considering whether the Dispatcher should inspect the success field and handle failure cases (e.g., logging an error or retrying the dispatch command) rather than unconditionally advancing the task state to Dispatched.

…execution

Signed-off-by: fsi.hayashi <yutaroha@fsi.co.jp>
Signed-off-by: fsi.hayashi <yutaroha@fsi.co.jp>
Reverts the double coordinate transformation fix applied in
6bfa983, restoring
internal_RobotUpdateHandle.hpp to its prior state.

Signed-off-by: fsi.hayashi <yutaroha@fsi.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

1 participant