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)
#ifdef ENABLE_VISP_NAMESPACE
#endif
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
Implementation of column vector and the associated operations.
error that can be emitted by ViSP classes.
const std::string & getStringMessage() const
Implementation of a pose vector and operations on poses.
vpPoseVector getPhysicalPosition() const
void setPeriodicFunction(VirtPeriodicFunction CallBackVirt)
void stopPeriodicFunction()
void setVerbose(bool mode)
void startPeriodicFunction()
vpColVector getPhysicalVelocity() const
VISP_EXPORT void sleepMs(double t)