From 7a23c289659f536dd012870da23f6cad1ad1c014 Mon Sep 17 00:00:00 2001 From: Osenberg Date: Tue, 25 Jun 2019 12:49:41 +0800 Subject: [PATCH] fix(src): fixed problem of printing accuracy --- samples/tutorials/data/get_img_params.cc | 6 ++++-- src/mynteye/types.cc | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/samples/tutorials/data/get_img_params.cc b/samples/tutorials/data/get_img_params.cc index a12cc48..0ad070e 100644 --- a/samples/tutorials/data/get_img_params.cc +++ b/samples/tutorials/data/get_img_params.cc @@ -48,8 +48,10 @@ int main(int argc, char *argv[]) { auto info = api->GetCameraROSMsgInfoPair(); - if (info && !info->isEmpty()) - std::cout << "ROSMsgInfoPair:"<< std::endl << *info << std::endl; + if (info && !info->isEmpty()) { + LOG(INFO) << "ROSMsgInfoPair:"; + LOG(INFO) << *info; + } return 0; } diff --git a/src/mynteye/types.cc b/src/mynteye/types.cc index a92671c..d31f56f 100644 --- a/src/mynteye/types.cc +++ b/src/mynteye/types.cc @@ -313,13 +313,14 @@ std::ostream &operator<<(std::ostream &os, const Extrinsics &ex) { } std::ostream &operator<<(std::ostream &os, const OptionInfo &info) { - return os << "min: " << info.min << ", max: " << info.max + return os << FULL_PRECISION << "min: " << info.min << ", max: " << info.max << ", def: " << info.def; } std::ostream &operator<<(std::ostream &os, const CameraROSMsgInfo &info) { - os << "width: " << info.width << ", height: " << info.height << std::endl - << "distortion_model: " << info.distortion_model; + os << FULL_PRECISION << "width: " << info.width << ", height: " + << info.height << std::endl << "distortion_model: " + << info.distortion_model; os << std::endl << "D: "; for (size_t i = 0; i < 5; i++) os << info.D[i] << ",";