Visual Servoing Platform  version 3.5.1 under development (2022-08-09)
tutorial-pioneer-robot.cpp
#include <iostream>
#include <visp3/robot/vpRobotPioneer.h>
int main()
{
#ifdef VISP_HAVE_PIONEER
try {
ArArgumentBuilder args;
args.add("-rp");
#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__))) // UNIX
args.add("/dev/ttyUSB0");
#else
args.add("COM3");
#endif
ArSimpleConnector conn(&args);
if (!conn.connectRobot(&robot))
return -1;
robot.useSonar(false);
vpTime::wait(2000);
v = 0;
v[0] = 0.10; // Translational velocity in m/s
vpTime::wait(1000);
std::cout << "Measured vel: " << v_mes.t() << std::endl;
vpTime::wait(1000);
robot.stopRunning();
robot.waitForRunExit();
} catch (const vpException &e) {
std::cout << "Catch an exception: " << e << std::endl;
}
#endif
}
Implementation of column vector and the associated operations.
Definition: vpColVector.h:131
vpRowVector t() const
error that can be emited by ViSP classes.
Definition: vpException.h:72
Interface for Pioneer mobile robots based on Aria 3rd party library.
void useSonar(bool usage)
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
void getVelocity(const vpRobot::vpControlFrameType frame, vpColVector &velocity)
@ REFERENCE_FRAME
Definition: vpRobot.h:77
VISP_EXPORT int wait(double t0, double t)