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] Pipeline crash with std::out_of_range on a std::unordered_map #596

Open
MRo47 opened this issue Sep 25, 2024 · 3 comments
Open

[BUG] Pipeline crash with std::out_of_range on a std::unordered_map #596

MRo47 opened this issue Sep 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@MRo47
Copy link

MRo47 commented Sep 25, 2024

Don't think this issue exists, searched in issues and PR's

Version: I'm currently 1 commit behind iron branch: cf5d2aaee9117298ea1632c98ffd36a5d7d535ac
Device: OAK-D pro W

Trying to run yolo object detection on stereo pipeline, on the left mono camera only.

Steps to reproduce

  1. modify depthai-ros/depthai_ros_driver/config/camera.yaml
/**:
  ros__parameters:
    camera:
      i_enable_imu: true
      i_enable_ir: true
      i_nn_type: none
      i_pipeline_type: Stereo
    left:
      i_enable_nn: true
    left_nn:
      i_nn_config_path: depthai_ros_driver/yolo
  1. Then launch using
ros2 launch depthai_ros_driver camera.launch.py use_gdb:=true

I get error

1726855536.0914462 [bash-1] terminate called after throwing an instance of 'std::out_of_range'
1726855536.0915015 [bash-1]   what():  _Map_base::at

GDB

On tracing with gdb I found the error happens at

line 75 in src/dai_nodes/sensors/sensor_helpers.cpp

return rsSocketNameMap.at(socket);

the value its currently holding, probably by default is 1869766505 which does not correspond to any of the map entries that actually are enums

const std::unordered_map<dai::CameraBoardSocket, std::string> rsSocketNameMap = {
    {dai::CameraBoardSocket::AUTO, "color"},
    {dai::CameraBoardSocket::CAM_A, "color"},
    {dai::CameraBoardSocket::CAM_B, "infra2"},
    {dai::CameraBoardSocket::CAM_C, "infra1"},
    {dai::CameraBoardSocket::CAM_D, "infra4"},
    {dai::CameraBoardSocket::CAM_E, "infra3"},
};
@MRo47 MRo47 added the bug Something isn't working label Sep 25, 2024
@MRo47
Copy link
Author

MRo47 commented Sep 25, 2024

Also this does not happen when the i_nn_config_path is set to depthai_ros_driver/mobilenet_ssd

@Serafadam
Copy link
Collaborator

Hi, thanks for the report, this should be fixed in the next release (2.10.2)

This was referenced Sep 26, 2024
@MRo47
Copy link
Author

MRo47 commented Sep 26, 2024

Cheers thank you

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

2 participants