47 #include <visp3/core/vpDebug.h>
48 #include <visp3/core/vpMath.h>
49 #include <visp3/core/vpXmlParserCamera.h>
50 #include <visp3/robot/vpViper650.h>
52 static const char *opt_viper650[] = {
"CAMERA",
"eMc_ROT_XYZ",
"eMc_TRANS_XYZ", NULL};
54 #ifdef VISP_HAVE_VIPER650_DATA
56 std::string(VISP_VIPER650_DATA_PATH) +
57 std::string(
"/include/const_eMc_MarlinF033C_without_distortion_Viper650.cnf");
60 std::string(VISP_VIPER650_DATA_PATH) + std::string(
"/include/const_eMc_MarlinF033C_with_distortion_Viper650.cnf");
63 std::string(VISP_VIPER650_DATA_PATH) +
64 std::string(
"/include/const_eMc_PTGreyFlea2_without_distortion_Viper650.cnf");
67 std::string(VISP_VIPER650_DATA_PATH) + std::string(
"/include/const_eMc_PTGreyFlea2_with_distortion_Viper650.cnf");
70 std::string(VISP_VIPER650_DATA_PATH) + std::string(
"/include/"
71 "const_eMc_schunk_gripper_without_distortion_Viper650."
75 std::string(VISP_VIPER650_DATA_PATH) +
76 std::string(
"/include/const_eMc_schunk_gripper_with_distortion_Viper650.cnf");
79 std::string(VISP_VIPER650_DATA_PATH) + std::string(
"/include/const_eMc_generic_without_distortion_Viper650.cnf");
82 std::string(VISP_VIPER650_DATA_PATH) + std::string(
"/include/const_eMc_generic_with_distortion_Viper650.cnf");
85 std::string(VISP_VIPER650_DATA_PATH) + std::string(
"/include/const_camera_Viper650.xml");
87 #endif // VISP_HAVE_VIPER650_DATA
112 c56 = -341.33 / 9102.22;
184 #ifdef VISP_HAVE_VIPER650_DATA
186 std::string filename_eMc;
234 "No predefined file available for a custom tool"
235 "You should use init(vpViper650::vpToolType, const std::string&) or"
236 "init(vpViper650::vpToolType, const vpHomogeneousMatrix&) instead");
252 this->
init(filename_eMc);
254 #else // VISP_HAVE_VIPER650_DATA
318 "No predefined parameters available for a custom tool"
319 "You should use init(vpViper650::vpToolType, const std::string&) or"
320 "init(vpViper650::vpToolType, const vpHomogeneousMatrix&) instead");
325 #endif // VISP_HAVE_VIPER650_DATA
401 std::ifstream fdconfig(filename.c_str(), std::ios::in);
403 if (!fdconfig.is_open()) {
410 bool get_erc =
false;
411 bool get_etc =
false;
414 while (std::getline(fdconfig, line)) {
416 if ((line.compare(0, 1,
"#") == 0) || line.empty()) {
419 std::istringstream ss(line);
423 for (code = 0; NULL != opt_viper650[code]; ++code) {
424 if (key.compare(opt_viper650[code]) == 0) {
434 ss >> erc_[0] >> erc_[1] >> erc_[2];
437 erc_ = erc_ * M_PI / 180.0;
450 filename.c_str(), lineNum));
457 if (get_etc && get_erc) {
461 "Could not read translation and rotation "
462 "parameters from config file %s",
539 const unsigned int &image_height)
const
541 #if defined(VISP_HAVE_PUGIXML) && defined(VISP_HAVE_VIPER650_DATA)
604 if (image_width == 640 && image_height == 480) {
616 vpTRACE(
"Cannot get default intrinsic camera parameters for this image "
625 if (image_width == 640 && image_height == 480) {
637 vpTRACE(
"Cannot get default intrinsic camera parameters for this image "
645 if (image_width == 640 && image_height == 480) {
657 vpTRACE(
"Cannot get default intrinsic camera parameters for this image "