Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed openvino_people_msgs/COLCON_IGNORE
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static UNUSED void printPerformanceCounts(ov::InferRequest request, std::ostream
bool bshowHeader = true)
{
auto performanceMap = request.get_profiling_info();
//printPerformanceCounts(performanceMap, stream, deviceName, bshowHeader);
// printPerformanceCounts(performanceMap, stream, deviceName, bshowHeader);
}

inline std::map<std::string, std::string> getMapFullDevicesNames(ov::Core& core, std::vector<std::string> devices)
Expand Down
5 changes: 4 additions & 1 deletion openvino_wrapper_lib/src/inputs/realsense_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ bool Input::RealSenseCamera::initialize(size_t width, size_t height)
if (3 * width != 4 * height) {
slog::err << "The aspect ratio must be 4:3 when using RealSense camera" << slog::endl;
throw std::runtime_error("The aspect ratio must be 4:3 when using RealSense camera!");
return false;
}

auto devSerialNumber = getCameraSN();
Expand Down Expand Up @@ -63,7 +62,11 @@ bool Input::RealSenseCamera::read(cv::Mat* frame)
cv::Mat(cv::Size(static_cast<int>(getWidth()), static_cast<int>(getHeight())), CV_8UC3,
const_cast<void*>(color_frame.get_data()), cv::Mat::AUTO_STEP)
.copyTo(*frame);
} catch (const std::exception& e) {
slog::err << "RealSense camera read error: " << e.what() << slog::endl;
return false;
} catch (...) {
slog::err << "RealSense camera read error: unknown exception" << slog::endl;
return false;
}

Expand Down
9 changes: 5 additions & 4 deletions sample/src/image_object_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ int main(int argc, char** argv)
auto node = std::make_shared<vino_service::FrameProcessingServer<object_msgs::srv::DetectObject>>(service_name,
config_path);
rclcpp::spin(node);
} catch (std::exception& e) {
std::cout << e.what() << std::endl;
} catch (const std::exception& e) {
slog::err << "[frame_processing_server] Error: " << e.what() << slog::endl;
return -1;
} catch (...) {
std::cout << "[ERROR] [frame_processing_server]: "
<< "exception caught" << std::endl;
slog::err << "[frame_processing_server] Error: Unknown exception caught" << slog::endl;
return -1;
}

return 0;
Expand Down
9 changes: 5 additions & 4 deletions sample/src/image_people_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ int main(int argc, char** argv)
auto node = std::make_shared<vino_service::FrameProcessingServer<object_msgs::srv::People>>(
"service_people_detection", config_path);
rclcpp::spin(node);
} catch (std::exception& e) {
std::cout << e.what() << std::endl;
} catch (const std::exception& e) {
slog::err << "[service_people_detection] Error: " << e.what() << slog::endl;
return -1;
} catch (...) {
std::cout << "[ERROR] [service_people_detection]: "
<< "exception caught" << std::endl;
slog::err << "[service_people_detection] Error: Unknown exception caught" << slog::endl;
return -1;
}

return 0;
Expand Down
5 changes: 2 additions & 3 deletions sample/src/parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ int main(int argc, char* argv[])
std::string config = getConfigPath(argc, argv);
if (config.empty()) {
throw std::runtime_error("Config File is not correctly set.");
return -1;
}

Params::ParamManager::getInstance().parse(config);
Expand All @@ -47,11 +46,11 @@ int main(int argc, char* argv[])
slog::info << "print again, should same as above....." << slog::endl;
Params::ParamManager::getInstance().print();
} catch (const std::exception& error) {
slog::err << error.what() << slog::endl;
slog::err << "Error: " << error.what() << slog::endl;
return -1;
} catch (...) {
slog::err << "Unknown/internal exception happened." << slog::endl;
return -2;
return -1;
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions sample/src/pipeline_with_params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ int main(int argc, char* argv[])
rclcpp::shutdown();

} catch (const std::exception& error) {
slog::err << error.what() << slog::endl;
slog::err << "Pipeline error: " << error.what() << slog::endl;
return -2;
} catch (...) {
slog::err << "Unknown/internal exception happened." << slog::endl;
slog::err << "Pipeline error: Unknown/internal exception happened." << slog::endl;
return -3;
}

Expand Down
Loading