64 #include <visp/vpConfig.h>
65 #include <visp/vpDebug.h>
73 #if (defined(VISP_HAVE_PTU46) & defined (VISP_HAVE_DC1394) )
75 #ifdef VISP_HAVE_PTHREAD
79 #include <visp/vp1394Grabber.h>
80 #include <visp/vpImage.h>
81 #include <visp/vpDisplay.h>
82 #include <visp/vpDisplayX.h>
84 #include <visp/vpMath.h>
85 #include <visp/vpHomogeneousMatrix.h>
86 #include <visp/vpFeaturePoint.h>
87 #include <visp/vpPoint.h>
88 #include <visp/vpServo.h>
89 #include <visp/vpFeatureBuilder.h>
91 #include <visp/vpRobotPtu46.h>
94 #include <visp/vpException.h>
95 #include <visp/vpMatrixException.h>
96 #include <visp/vpServoDisplay.h>
98 #include <visp/vpDot2.h>
101 #ifdef VISP_HAVE_PTHREAD
102 pthread_mutex_t mutexEndLoop = PTHREAD_MUTEX_INITIALIZER;
105 void signalCtrC(
int signumber )
107 #ifdef VISP_HAVE_PTHREAD
108 pthread_mutex_unlock( &mutexEndLoop );
117 std::cout << std::endl ;
118 std::cout <<
"-------------------------------------------------------" << std::endl ;
119 std::cout <<
" Test program for vpServo " <<std::endl ;
120 std::cout <<
" Eye-in-hand task control, velocity computed in the camera frame" << std::endl ;
121 std::cout <<
" Simulation " << std::endl ;
122 std::cout <<
" task : servo a point " << std::endl ;
123 std::cout <<
"-------------------------------------------------------" << std::endl ;
124 std::cout << std::endl ;
128 #ifdef VISP_HAVE_PTHREAD
129 pthread_mutex_lock( &mutexEndLoop );
131 signal( SIGINT,&signalCtrC );
156 vpDisplayX display(I,100,100,
"testDisplayX.cpp ") ;
193 vpTRACE(
"sets the current position of the visual feature ") ;
198 vpTRACE(
"sets the desired position of the visual feature ") ;
203 vpTRACE(
"\t we want an eye-in-hand control law") ;
204 vpTRACE(
"\t articular velocity are computed") ;
209 vpTRACE(
"Set the position of the camera in the end-effector frame ") ;
215 std::cout << cVe <<std::endl ;
219 vpTRACE(
"Set the Jacobian (expressed in the end-effector frame)") ;
225 vpTRACE(
"\t we want to see a point on a point..") ;
226 std::cout << std::endl ;
233 vpTRACE(
"Display task information " ) ;
239 unsigned int iter=0 ;
241 #ifdef VISP_HAVE_PTHREAD
242 while( 0 != pthread_mutex_trylock( &mutexEndLoop ) )
247 std::cout <<
"---------------------------------------------" << iter <<std::endl ;
277 vpTRACE(
"Display task information " ) ;
289 vpERROR_TRACE(
"You don't have a ptu-46 head connected to your computer ",
290 "or 1394 framegrabbing capabilities...");