Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Direct robot_task in DirectQueue is ordered wrongly #287

Closed
1 task done
Magmanat opened this issue Jul 14, 2023 · 3 comments · Fixed by #288
Closed
1 task done

[Bug]: Direct robot_task in DirectQueue is ordered wrongly #287

Magmanat opened this issue Jul 14, 2023 · 3 comments · Fixed by #288
Labels
bug Something isn't working

Comments

@Magmanat
Copy link

Magmanat commented Jul 14, 2023

Before proceeding, is there an existing issue or discussion for this?

OS and version

Ubuntu 22.04

Open-RMF installation type

Source build

Other Open-RMF installation methods

No response

Open-RMF version or commit hash

dc740df

ROS distribution

Humble

ROS installation type

Source build

Other ROS installation methods

No response

Package or library, if applicable

No response

Description of the bug

when sending multiple direct robot_task using fleet adapter, and with the unix_millis_earliest_start_time set as the time at which the task was sent. Queued missions are dispatched in descending order via TaskManager::_begin_next_task() Due to DirectQueue being arranged in descending order.

Steps to reproduce the bug

post robot_task with different unix times and record the rmf_id that is assigned to them
let the tasks execute in succession and realise that it chooses the largest earliest start time first

Expected behavior

The task that was actually sent first should be the one that is dispatched to the robot based on earliest unix time

Actual behavior

The task that was sent last was the one the one that is dispatched to the robot based on earliest unix time

Additional information or screenshots

No response

@Magmanat Magmanat added the bug Something isn't working label Jul 14, 2023
@Yadunund
Copy link
Member

Thanks for reporting the problem. Could you help confirm if this PR resolves the issue?

@Magmanat
Copy link
Author

Seems like this makes the direct_queue work as intended, executing the task with the earliest unix_millis_earliest_start_time

@Yadunund
Copy link
Member

Thanks for finding the bug and confirming the fix works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants