43 #include <visp/vpConfig.h>
45 #include <visp/vpRobotPioneer.h>
46 #include <visp/vpCameraParameters.h>
47 #include <visp/vpDisplayGDI.h>
48 #include <visp/vpDisplayX.h>
49 #include <visp/vpDot2.h>
50 #include <visp/vpFeatureBuilder.h>
51 #include <visp/vpFeatureDepth.h>
52 #include <visp/vpFeaturePoint.h>
53 #include <visp/vpHomogeneousMatrix.h>
54 #include <visp/vpImage.h>
55 #include <visp/vpImageConvert.h>
56 #include <visp/vp1394TwoGrabber.h>
57 #include <visp/vp1394CMUGrabber.h>
58 #include <visp/vpV4l2Grabber.h>
59 #include <visp/vpOpenCVGrabber.h>
60 #include <visp/vpServo.h>
61 #include <visp/vpVelocityTwistMatrix.h>
63 #if defined(VISP_HAVE_DC1394_2) || defined(VISP_HAVE_V4L2) || defined(VISP_HAVE_CMU1394) || defined(VISP_HAVE_OPENCV)
64 #if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI)
65 #if defined(VISP_HAVE_PIONEER)
66 # define TEST_COULD_BE_ACHIEVED
71 #undef VISP_HAVE_OPENCV // To use a firewire camera
72 #undef VISP_HAVE_V4L2 // To use a firewire camera
93 #ifdef TEST_COULD_BE_ACHIEVED
94 int main(
int argc,
char **argv)
99 double coef = 1./6.77;
102 ArArgumentParser parser(&argc, argv);
103 parser.loadDefaultArguments();
107 ArRobotConnector robotConnector(&parser, &robot);
108 if(!robotConnector.connectRobot())
110 ArLog::log(ArLog::Terse,
"Could not connect to the robot.");
111 if(parser.checkHelpAndWarnUnparsed())
117 if (!Aria::parseArgs())
130 std::cout <<
"Robot connected" << std::endl;
136 #if defined(VISP_HAVE_OPENCV)
138 std::cout <<
"Use device: " << device << std::endl;
139 cv::VideoCapture g(device);
140 g.set(CV_CAP_PROP_FRAME_WIDTH, 640);
141 g.set(CV_CAP_PROP_FRAME_HEIGHT, 480);
150 #elif defined(VISP_HAVE_V4L2)
159 #elif defined(VISP_HAVE_DC1394_2)
166 #elif defined(VISP_HAVE_CMU1394)
177 #if defined(VISP_HAVE_OPENCV)
185 #if defined(VISP_HAVE_X11)
187 #elif defined(VISP_HAVE_GDI)
211 std::cout <<
"cVe: \n" << cVe << std::endl;
216 std::cout <<
"eJe: \n" << eJe << std::endl;
240 std::cout <<
"Z " << Z << std::endl;
254 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100)
282 std::cout <<
"Send velocity to the pionner: " << v[0] <<
" m/s "
301 std::cout <<
"Ending robot thread..." << std::endl;
305 robot.waitForRunExit();
314 std::cout <<
"You don't have the right 3rd party libraries to run this example..." << std::endl;