Skip to content

Commit

Permalink
[CORE] Added namespace macro in apps folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rlagneau committed May 28, 2024
1 parent 79533c7 commit 46a8096
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions apps/calibration/visp-acquire-franka-calib-data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <iostream>

#include <visp3/core/vpCameraParameters.h>
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpXmlParserCamera.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayX.h>
Expand Down Expand Up @@ -66,6 +67,9 @@ void usage(const char **argv, int error, const std::string &robot_ip)

int main(int argc, const char **argv)
{
#if defined(ENABLE_VISP_NAMESPACE)
using namespace VISP_NAMESPACE_NAME;
#endif
try {
std::string opt_robot_ip = "192.168.1.1";

Expand Down
4 changes: 4 additions & 0 deletions apps/calibration/visp-acquire-universal-robots-calib-data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <iostream>

#include <visp3/core/vpCameraParameters.h>
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpXmlParserCamera.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayX.h>
Expand Down Expand Up @@ -66,6 +67,9 @@ void usage(const char **argv, int error, const std::string &robot_ip)

int main(int argc, const char **argv)
{
#if defined(ENABLE_VISP_NAMESPACE)
using namespace VISP_NAMESPACE_NAME;
#endif
try {
std::string opt_robot_ip = "192.168.0.100";

Expand Down
8 changes: 6 additions & 2 deletions apps/calibration/visp-compute-chessboard-poses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
#include <visp3/io/vpVideoReader.h>
#include <visp3/vision/vpPose.h>

#if defined(ENABLE_VISP_NAMESPACE)
using namespace VISP_NAMESPACE_NAME;
#endif

namespace
{
void calcChessboardCorners(int width, int height, double squareSize, std::vector<vpPoint> &corners)
Expand Down Expand Up @@ -224,7 +228,7 @@ int main(int argc, const char **argv)
#elif defined(VISP_HAVE_GTK)
display = new vpDisplayGTK(I);
#endif
}
}
#endif

std::vector<vpPoint> corners_pts;
Expand Down Expand Up @@ -335,7 +339,7 @@ int main(int argc, const char **argv)
}
}
#endif
}
}
catch (const vpException &e) {
std::cout << "Catch an exception: " << e.getMessage() << std::endl;
}
Expand Down
5 changes: 5 additions & 0 deletions apps/calibration/visp-compute-hand-eye-calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
//! \example visp-compute-hand-eye-calibration.cpp
#include <map>

#include <visp3/core/vpConfig.h>
#include <visp3/core/vpIoTools.h>
#include <visp3/vision/vpHandEyeCalibration.h>

Expand Down Expand Up @@ -74,6 +75,10 @@ void usage(const char *argv[], int error)

int main(int argc, const char *argv[])
{
#if defined(ENABLE_VISP_NAMESPACE)
using namespace VISP_NAMESPACE_NAME;
#endif

std::string opt_data_path = "./";
std::string opt_fPe_files = "pose_fPe_%d.yaml";
std::string opt_cPo_files = "pose_cPo_%d.yaml";
Expand Down

0 comments on commit 46a8096

Please sign in to comment.