ros-industrial / easy_perception_deployment

A ROS2 package that accelerates the training and deployment of CV models for industries.
Apache License 2.0
53 stars 16 forks source link

Error in Action mode when there is no object detected #16

Closed Dcrypt closed 3 years ago

Dcrypt commented 3 years ago
[processor-1] processor: /root/epd_ros2_ws/src/easy_perception_deployment/easy_perception_deployment/include/ort_cpp_lib/p3_ort_base.cpp:768: EPD::EPDObjectLocalization Ort::P3OrtBase::infer_action(const cv::Mat&, const cv::Mat&, sensor_msgs::msg::CameraInfo, double, int, int, int, int, float, float*, float, const Scalar&): Assertion `allClassNames.size() > *std::max_element(classIndices.begin(), classIndices.end())' failed.
[ERROR] [processor-1]: process has died [pid 2038, exit code -6, cmd '/root/epd_ros2_ws/src/easy_perception_deployment/easy_perception_deployment/install/easy_perception_deployment/lib/easy_perception_deployment/processor --ros-args -r /processor/image_input:=/camera/color/image_raw'].

For Action mode, I encountered the error above whenever there is no object detected by the camera.

During visualization mode, it functions normally if no object is detected.

cardboardcode commented 3 years ago

This is still an ongoing issue we are attempting to resolve internally.

For now, as a hot fix, please comment out the following lines as shown in the link below: https://github.com/ros-industrial/easy_perception_deployment/blob/affd46dfa3ff1a44cac48d200f200ec65b8761d8/easy_perception_deployment/include/ort_cpp_lib/p3_ort_base.cpp#L764-L769

Once you have commented it out, rebuild the package and deploy again. You should not encounter the issue anymore.