Test for reading the Virtuose's current position using a callback function.
#include <visp3/core/vpTime.h>
#include <visp3/robot/vpVirtuose.h>
#if defined(VISP_HAVE_VIRTUOSE)
void CallBackVirtuose(VirtContext VC, void *ptr)
{
(void)VC;
std::cout <<
"pose: " << localPose.
t() << std::endl;
std::cout <<
"vel: " << vel.
t() << std::endl;
return;
}
int main()
{
try {
int counter = 0;
bool swtch = true;
while (swtch) {
if (counter >= 2) {
swtch = false;
}
counter++;
}
std::cout << "The end" << std::endl;
}
}
#else
int main() { std::cout << "You should install Virtuose API to use this binary..." << std::endl; }
#endif