1 #include <yarp/os/LogStream.h> 2 #include <yarp/os/Property.h> 3 #include <yarp/dev/Drivers.h> 4 #include <yarp/dev/IVisualServoing.h> 5 #include <yarp/dev/PolyDriver.h> 6 #include <yarp/math/Math.h> 15 int main(
int argc,
char **argv)
18 if (!yarp.checkNetwork(3.0))
20 yError(
"YARP seems unavailable!");
24 YARP_REGISTER_PLUGINS(visualservoingplugin);
26 Property prop_client_vs;
27 prop_client_vs.put(
"device",
"visualservoingclient");
28 prop_client_vs.put(
"verbosity",
true);
29 prop_client_vs.put(
"local",
"/VisualServoingClientTest");
30 prop_client_vs.put(
"remote",
"/visualservoing");
31 bool use_fwd_kin =
false;
33 PolyDriver drv_client_vs(prop_client_vs);
34 if (!drv_client_vs.isValid())
36 yError(
"Could not run VisualServoingClient!");
40 IVisualServoing *visual_servoing;
41 drv_client_vs.view(visual_servoing);
42 if (visual_servoing == YARP_NULLPTR)
44 yError(
"Could not get interfacate to VisualServoingClient!");
49 visual_servoing->setVisualServoControl(
"decoupled");
52 visual_servoing->storedInit(
"t170904");
54 visual_servoing->initFacilities(use_fwd_kin);
55 visual_servoing->storedGoToGoal(
"t170904");
57 visual_servoing->checkVisualServoingController();
58 visual_servoing->waitVisualServoingDone();
60 visual_servoing->stopFacilities();
63 visual_servoing->storedInit(
"t170427");
65 visual_servoing->initFacilities(use_fwd_kin);
66 visual_servoing->storedGoToGoal(
"t170427");
68 visual_servoing->checkVisualServoingController();
69 visual_servoing->waitVisualServoingDone();
71 visual_servoing->stopFacilities();
int main(int argc, char *argv[])
YARP_DECLARE_PLUGINS(visualservoingplugin)