[Bug]: An error occurred when I called the skip interface
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
Start at rmf_fleet_adapter/src/rmf_fleet_adapter/TaskManager.cpp around line 555, where the reported nlohmann::json exception occurs. Reproduce with ros2 launch rmf_demos office.demo.launch, RMF-WEB, and a compose task with multiple phases, then call the skip interface. Done means the multi-phase skip request completes without the numeric-index JSON exception.
Written by the indexing model from the issue text.
Description
Before proceeding, is there an existing issue or discussion for this?
- I have done a search for similar issues and discussions.
OS and version
Ubuntu22.04
Open-RMF installation type
Source build
Other Open-RMF installation methods
No response
Open-RMF version or commit hash
2.3.0
ROS distribution
Rolling
ROS installation type
Source build
Other ROS installation methods
No response
Package or library, if applicable
No response
Description of the bug
The following error occurred when I called the skip interface.
terminate called after throwing an instance of 'nlohmann::detail::type_error'
[fleet_adapter-14] what(): [json.exception.type_error.305] cannot use operator[] with a numeric argument with object
After debugging, I have located the point where the error occurred.
Then I made some simple modifications.
for (const auto &[phase, skip_info] : _skip_info_map)
{
auto &skip_requests = phases[std::to_string(phase)]["skip_requests"];
for (const auto &s : {&skip_info.active_skips, &skip_info.removed_skips})
{
for (const auto &[token, msg] : *s)
skip_requests[token] = msg;
}
}
Steps to reproduce the bug
- Launch RMF using ros2
launch rmf_demos office.demo.launch - Launch RMF-WEB
- Send a
composetask with multiple phases - Calling the skip interface
Expected behavior
No response
Actual behavior
No response
Additional information or screenshots
No response
- Dominant language
- Python
- Stars
- 439
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-rmf/rmf
-
enhancement
-
[Feature request]: Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100