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]: An error occurred when I called the skip interface #374

Open
1 task done
liugehaizaixue opened this issue Jul 12, 2023 · 0 comments
Open
1 task done

[Bug]: An error occurred when I called the skip interface #374

liugehaizaixue opened this issue Jul 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@liugehaizaixue
Copy link

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

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

  1. Launch RMF using ros2 launch rmf_demos office.demo.launch
  2. Launch RMF-WEB
  3. Send a compose task with multiple phases
  4. Calling the skip interface

Expected behavior

No response

Actual behavior

No response

Additional information or screenshots

No response

@liugehaizaixue liugehaizaixue added the bug Something isn't working label Jul 12, 2023
@liugehaizaixue liugehaizaixue changed the title [Bug]: [Bug]: An error occurred when I called the skip interface Jul 12, 2023
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

No branches or pull requests

1 participant