fix(src): fixed problem of printing accuracy

This commit is contained in:
Osenberg 2019-06-25 12:49:41 +08:00
parent 0881a70922
commit 7a23c28965
2 changed files with 8 additions and 5 deletions

View File

@ -48,8 +48,10 @@ int main(int argc, char *argv[]) {
auto info = api->GetCameraROSMsgInfoPair(); auto info = api->GetCameraROSMsgInfoPair();
if (info && !info->isEmpty()) if (info && !info->isEmpty()) {
std::cout << "ROSMsgInfoPair:"<< std::endl << *info << std::endl; LOG(INFO) << "ROSMsgInfoPair:";
LOG(INFO) << *info;
}
return 0; return 0;
} }

View File

@ -313,13 +313,14 @@ std::ostream &operator<<(std::ostream &os, const Extrinsics &ex) {
} }
std::ostream &operator<<(std::ostream &os, const OptionInfo &info) { 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; << ", def: " << info.def;
} }
std::ostream &operator<<(std::ostream &os, const CameraROSMsgInfo &info) { std::ostream &operator<<(std::ostream &os, const CameraROSMsgInfo &info) {
os << "width: " << info.width << ", height: " << info.height << std::endl os << FULL_PRECISION << "width: " << info.width << ", height: "
<< "distortion_model: " << info.distortion_model; << info.height << std::endl << "distortion_model: "
<< info.distortion_model;
os << std::endl << "D: "; os << std::endl << "D: ";
for (size_t i = 0; i < 5; i++) for (size_t i = 0; i < 5; i++)
os << info.D[i] << ","; os << info.D[i] << ",";