Visual Servoing Platform  version 3.3.0 under development (2020-02-17)
servoFlirPtuIBVS.cpp
1 /****************************************************************************
2  *
3  * ViSP, open source Visual Servoing Platform software.
4  * Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * See the file LICENSE.txt at the root directory of this source
11  * distribution for additional information about the GNU GPL.
12  *
13  * For using ViSP with software that can not be combined with the GNU
14  * GPL, please contact Inria about acquiring a ViSP Professional
15  * Edition License.
16  *
17  * See http://visp.inria.fr for more information.
18  *
19  * This software was developed at:
20  * Inria Rennes - Bretagne Atlantique
21  * Campus Universitaire de Beaulieu
22  * 35042 Rennes Cedex
23  * France
24  *
25  * If you have questions regarding the use of this file, please contact
26  * Inria at visp@inria.fr
27  *
28  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30  *
31  * Description:
32  * tests the control law
33  * eye-in-hand control
34  * velocity computed in the camera frame
35  *
36  * Authors:
37  * Fabien Spindler
38  *
39  *****************************************************************************/
61 #include <iostream>
62 
63 #include <visp3/core/vpCameraParameters.h>
64 #include <visp3/core/vpXmlParserCamera.h>
65 #include <visp3/detection/vpDetectorAprilTag.h>
66 #include <visp3/gui/vpDisplayGDI.h>
67 #include <visp3/gui/vpDisplayX.h>
68 #include <visp3/gui/vpPlot.h>
69 #include <visp3/io/vpImageIo.h>
70 #include <visp3/robot/vpRobotFlirPtu.h>
71 #include <visp3/sensor/vpFlyCaptureGrabber.h>
72 #include <visp3/visual_features/vpFeatureBuilder.h>
73 #include <visp3/visual_features/vpFeaturePoint.h>
74 #include <visp3/vs/vpServo.h>
75 #include <visp3/vs/vpServoDisplay.h>
76 
77 #if defined(VISP_HAVE_FLIR_PTU_SDK) && defined(VISP_HAVE_FLYCAPTURE) && \
78  (defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI))
79 
80 void display_point_trajectory(const vpImage<unsigned char> &I, const vpImagePoint &ip,
81  std::vector<vpImagePoint> &traj_ip)
82 {
83  if (traj_ip.size()) {
84  // Add the point only if distance with the previous > 2 pixel
85  if (vpImagePoint::distance(ip, traj_ip.back()) > 2.) {
86  traj_ip.push_back(ip);
87  }
88  } else {
89  traj_ip.push_back(ip);
90  }
91  for (size_t j = 1; j < traj_ip.size(); j++) {
92  vpDisplay::displayLine(I, traj_ip[j - 1], traj_ip[j], vpColor::green, 2);
93  }
94 }
95 
96 int main(int argc, char **argv)
97 {
98  std::string opt_portname;
99  int opt_baudrate = 9600;
100  bool opt_network = false;
101  std::string opt_extrinsic;
102  std::string opt_intrinsic;
103  std::string opt_camera_name;
104  bool display_tag = true;
105  int opt_quad_decimate = 2;
106  double opt_tag_size = 0.120; // Used to compute the distance of the cog wrt the camera
107  bool opt_verbose = false;
108  bool opt_plot = false;
109  bool opt_adaptive_gain = false;
110  bool opt_task_sequencing = false;
111  double opt_constant_gain = 0.5;
112  bool opt_display_trajectory = true;
113  double convergence_threshold = 0.00005;
114 
115  if (argc == 1) {
116  std::cout << "To see how to use this example, run: " << argv[0] << " --help" << std::endl;
117  return EXIT_SUCCESS;
118  }
119 
120  for (int i = 1; i < argc; i++) {
121  if ((std::string(argv[i]) == "--portname" || std::string(argv[i]) == "-p") && (i + 1 < argc)) {
122  opt_portname = std::string(argv[i + 1]);
123  } else if ((std::string(argv[i]) == "--baudrate" || std::string(argv[i]) == "-b") && (i + 1 < argc)) {
124  opt_baudrate = std::atoi(argv[i + 1]);
125  } else if ((std::string(argv[i]) == "--network" || std::string(argv[i]) == "-n")) {
126  opt_network = true;
127  } else if (std::string(argv[i]) == "--extrinsic" && i + 1 < argc) {
128  opt_extrinsic = std::string(argv[i + 1]);
129  } else if (std::string(argv[i]) == "--intrinsic" && i + 1 < argc) {
130  opt_intrinsic = std::string(argv[i + 1]);
131  } else if (std::string(argv[i]) == "--camera-name" && i + 1 < argc) {
132  opt_camera_name = std::string(argv[i + 1]);
133  } else if (std::string(argv[i]) == "--verbose" || std::string(argv[i]) == "-v") {
134  opt_verbose = true;
135  } else if (std::string(argv[i]) == "--plot" || std::string(argv[i]) == "-p") {
136  opt_plot = true;
137  } else if (std::string(argv[i]) == "--display-image-trajectory" || std::string(argv[i]) == "-traj") {
138  opt_display_trajectory = true;
139  } else if (std::string(argv[i]) == "--adaptive-gain" || std::string(argv[i]) == "-a") {
140  opt_adaptive_gain = true;
141  } else if (std::string(argv[i]) == "--constant-gain" || std::string(argv[i]) == "-g") {
142  opt_constant_gain = std::stod(argv[i + 1]);
143  ;
144  } else if (std::string(argv[i]) == "--task-sequencing") {
145  opt_task_sequencing = true;
146  } else if (std::string(argv[i]) == "--quad-decimate" && i + 1 < argc) {
147  opt_quad_decimate = std::stoi(argv[i + 1]);
148  }
149  if (std::string(argv[i]) == "--tag-size" && i + 1 < argc) {
150  opt_tag_size = std::stod(argv[i + 1]);
151  } else if (std::string(argv[i]) == "--no-convergence-threshold") {
152  convergence_threshold = 0.;
153  } else if (std::string(argv[i]) == "--help" || std::string(argv[i]) == "-h") {
154  std::cout << "SYNOPSIS" << std::endl
155  << " " << argv[0] << " [--portname <portname>] [--baudrate <rate>] [--network] "
156  << "[--extrinsic <extrinsic.yaml>] [--intrinsic <intrinsic.xml>] [--camera-name <name>] "
157  << "[--quad-decimate <decimation>] [--tag-size <size>] "
158  << "[--adaptive-gain] [--constant-gain] [--display-image-trajectory] [--plot] [--task-sequencing] "
159  << "[--no-convergence-threshold] [--verbose] [--help] [-h]" << std::endl
160  << std::endl;
161  std::cout << "DESCRIPTION" << std::endl
162  << " --portname, -p <portname>" << std::endl
163  << " Set serial or tcp port name." << std::endl
164  << std::endl
165  << " --baudrate, -b <rate>" << std::endl
166  << " Set serial communication baud rate. Default: " << opt_baudrate << "." << std::endl
167  << std::endl
168  << " --network, -n" << std::endl
169  << " Get PTU network information (Hostname, IP, Gateway) and exit. " << std::endl
170  << std::endl
171  << " --reset, -r" << std::endl
172  << " Reset PTU axis and exit. " << std::endl
173  << std::endl
174  << " --extrinsic <extrinsic.yaml>" << std::endl
175  << " YAML file containing extrinsic camera parameters as a vpHomogeneousMatrix." << std::endl
176  << " It corresponds to the homogeneous transformation eMc, between end-effector" << std::endl
177  << " and camera frame." << std::endl
178  << std::endl
179  << " --intrinsic <intrinsic.xml>" << std::endl
180  << " Intrinsic camera parameters obtained after camera calibration." << std::endl
181  << std::endl
182  << " --camera-name <name>" << std::endl
183  << " Name of the camera to consider in the xml file provided for intrinsic camera parameters."
184  << std::endl
185  << std::endl
186  << " --quad-decimate <decimation>" << std::endl
187  << " Decimation factor used to detect AprilTag. Default " << opt_quad_decimate << "." << std::endl
188  << std::endl
189  << " --tag-size <size>" << std::endl
190  << " Width in meter or the black part of the AprilTag used as target. Default " << opt_tag_size
191  << "." << std::endl
192  << std::endl
193  << " --adaptive-gain, -a" << std::endl
194  << " Enable adaptive gain instead of constant gain to speed up convergence. " << std::endl
195  << std::endl
196  << " --constant-gain, -g" << std::endl
197  << " Constant gain value. Default value: " << opt_constant_gain << std::endl
198  << std::endl
199  << " --display-image-trajectory, -traj" << std::endl
200  << " Display the trajectory of the target cog in the image. " << std::endl
201  << std::endl
202  << " --plot, -p" << std::endl
203  << " Enable curve plotter. " << std::endl
204  << std::endl
205  << " --task-sequencing" << std::endl
206  << " Enable task sequencing that allows to smoothly control the velocity of the robot. " << std::endl
207  << std::endl
208  << " --no-convergence-threshold" << std::endl
209  << " Disable ending servoing when it reaches the desired position." << std::endl
210  << std::endl
211  << " --verbose, -v" << std::endl
212  << " Additional printings. " << std::endl
213  << std::endl
214  << " --help, -h" << std::endl
215  << " Print this helper message. " << std::endl
216  << std::endl;
217  std::cout << "EXAMPLE" << std::endl
218  << " - How to get network IP" << std::endl
219 #ifdef _WIN32
220  << " $ " << argv[0] << " --portname COM1 --network" << std::endl
221  << " Try to connect FLIR PTU to port: COM1 with baudrate: 9600" << std::endl
222 #else
223  << " $ " << argv[0] << " -p /dev/ttyUSB0 --network" << std::endl
224  << " Try to connect FLIR PTU to port: /dev/ttyUSB0 with baudrate: 9600" << std::endl
225 #endif
226  << " PTU HostName: PTU-5" << std::endl
227  << " PTU IP : 169.254.110.254" << std::endl
228  << " PTU Gateway : 0.0.0.0" << std::endl
229  << " - How to run this binary using network communication" << std::endl
230  << " $ " << argv[0] << " --portname tcp:169.254.110.254 --tag-size 0.1 --gain 0.1" << std::endl;
231 
232  return EXIT_SUCCESS;
233  }
234  }
235 
236  vpRobotFlirPtu robot;
237 
238  try {
239  std::cout << "Try to connect FLIR PTU to port: " << opt_portname << " with baudrate: " << opt_baudrate << std::endl;
240  robot.connect(opt_portname, opt_baudrate);
241 
242  if (opt_network) {
243  std::cout << "PTU HostName: " << robot.getNetworkHostName() << std::endl;
244  std::cout << "PTU IP : " << robot.getNetworkIP() << std::endl;
245  std::cout << "PTU Gateway : " << robot.getNetworkGateway() << std::endl;
246  return EXIT_SUCCESS;
247  }
248 
250 
252  g.open(I);
253 
254  // Get camera extrinsics
256  vpRotationMatrix eRc;
257  eRc << 0, 0, 1, -1, 0, 0, 0, -1, 0;
258  etc << -0.1, -0.123, 0.035;
259  vpHomogeneousMatrix eMc(etc, eRc);
260 
261  // If provided, read camera extrinsics from command line option
262  if (!opt_extrinsic.empty()) {
263  vpPoseVector ePc;
264  ePc.loadYAML(opt_extrinsic, ePc);
265  eMc.buildFrom(ePc);
266  } else {
267  std::cout << "***************************************************************" << std::endl;
268  std::cout << "Warning, use hard coded values for extrinsic camera parameters." << std::endl;
269  std::cout << "Create a yaml file that contains the extrinsic:" << std::endl
270  << std::endl
271  << "$ cat eMc.yaml" << std::endl
272  << "rows: 4" << std::endl
273  << "cols: 4" << std::endl
274  << "data:" << std::endl
275  << " - [0, 0, 1, -0.1]" << std::endl
276  << " - [-1, 0, 0, -0.123]" << std::endl
277  << " - [0, -1, 0, 0.035]" << std::endl
278  << " - [0, 0, 0, 1]" << std::endl
279  << std::endl
280  << "and load this file with [--extrinsic <extrinsic.yaml] command line option, like:" << std::endl
281  << std::endl
282  << "$ " << argv[0] << "-p " << opt_portname << " --extrinsic eMc.yaml" << std::endl
283  << std::endl;
284  std::cout << "***************************************************************" << std::endl;
285  }
286 
287  std::cout << "Considered extrinsic transformation eMc:\n" << eMc << std::endl;
288 
289  // Get camera intrinsics
290  vpCameraParameters cam(900, 900, I.getWidth() / 2., I.getHeight() / 2.);
291 
292  // If provided, read camera intrinsics from command line option
293  if (!opt_intrinsic.empty() && !opt_camera_name.empty()) {
294 #ifdef VISP_HAVE_PUGIXML
295  vpXmlParserCamera parser;
296  parser.parse(cam, opt_intrinsic, opt_camera_name, vpCameraParameters::perspectiveProjWithoutDistortion);
297 #endif
298  } else {
299  std::cout << "***************************************************************" << std::endl;
300  std::cout << "Warning, use hard coded values for intrinsic camera parameters." << std::endl;
301  std::cout << "Calibrate your camera and load the parameters from command line options, like:" << std::endl
302  << std::endl
303  << "$ " << argv[0] << "-p " << opt_portname << " --intrinsic camera.xml --camera-name \"Camera\""
304  << std::endl
305  << std::endl;
306  std::cout << "***************************************************************" << std::endl;
307  }
308 
309  std::cout << "Considered intrinsic camera parameters:\n" << cam << "\n";
310 
311 #if defined(VISP_HAVE_X11)
312  vpDisplayX dc(I, 10, 10, "Color image");
313 #elif defined(VISP_HAVE_GDI)
314  vpDisplayGDI dc(I, 10, 10, "Color image");
315 #endif
316 
319  vpDetectorAprilTag detector(tagFamily);
320  detector.setAprilTagPoseEstimationMethod(poseEstimationMethod);
321  detector.setDisplayTag(display_tag);
322  detector.setAprilTagQuadDecimate(opt_quad_decimate);
323 
324  // Create visual features
325  vpFeaturePoint p, pd; // We use 1 point, the tag cog
326 
327  // Set desired position to the image center
328  pd.set_x(0);
329  pd.set_y(0);
330 
331  vpServo task;
332  // Add the visual feature point
333  task.addFeature(p, pd);
336 
337  if (opt_adaptive_gain) {
338  vpAdaptiveGain lambda(1.5, 0.4, 30); // lambda(0)=4, lambda(oo)=0.4 and lambda'(0)=30
339  task.setLambda(lambda);
340  } else {
341  task.setLambda(opt_constant_gain);
342  }
343 
344  vpPlot *plotter = nullptr;
345  int iter_plot = 0;
346 
347  if (opt_plot) {
348  plotter = new vpPlot(2, static_cast<int>(250 * 2), 500, static_cast<int>(I.getWidth()) + 80, 10,
349  "Real time curves plotter");
350  plotter->setTitle(0, "Visual features error");
351  plotter->setTitle(1, "Joint velocities");
352  plotter->initGraph(0, 2);
353  plotter->initGraph(1, 2);
354  plotter->setLegend(0, 0, "error_feat_p_x");
355  plotter->setLegend(0, 1, "error_feat_p_y");
356  plotter->setLegend(1, 0, "qdot_pan");
357  plotter->setLegend(1, 1, "qdot_tilt");
358  }
359 
360  bool final_quit = false;
361  bool has_converged = false;
362  bool send_velocities = false;
363  bool servo_started = false;
364  std::vector<vpImagePoint> traj_cog;
365  vpMatrix eJe;
366 
367  static double t_init_servo = vpTime::measureTimeMs();
368 
369  robot.set_eMc(eMc); // Set location of the camera wrt end-effector frame
370 
371  vpVelocityTwistMatrix cVe = robot.get_cVe();
372  std::cout << cVe << std::endl;
373  task.set_cVe(cVe);
374 
376 
377  while (!has_converged && !final_quit) {
378  double t_start = vpTime::measureTimeMs();
379 
380  g.acquire(I);
381 
383 
384  std::vector<vpHomogeneousMatrix> cMo_vec;
385  detector.detect(I, opt_tag_size, cam, cMo_vec);
386 
387  std::stringstream ss;
388  ss << "Left click to " << (send_velocities ? "stop the robot" : "servo the robot") << ", right click to quit.";
389  vpDisplay::displayText(I, 20, 20, ss.str(), vpColor::red);
390 
391  vpColVector qdot(2);
392 
393  // Only one tag has to be detected
394  if (detector.getNbObjects() == 1) {
395 
396  vpImagePoint cog = detector.getCog(0);
397  double Z = cMo_vec[0][2][3];
398 
399  // Update current feature from measured cog position
400  double x = 0, y = 0;
401  vpPixelMeterConversion::convertPoint(cam, cog, x, y);
402  if (opt_verbose) {
403  std::cout << "Z: " << Z << std::endl;
404  }
405  p.set_xyZ(x, y, Z);
406  pd.set_Z(Z);
407 
408  // Get robot Jacobian
409  robot.get_eJe(eJe);
410  task.set_eJe(eJe);
411 
412  if (opt_task_sequencing) {
413  if (!servo_started) {
414  if (send_velocities) {
415  servo_started = true;
416  }
417  t_init_servo = vpTime::measureTimeMs();
418  }
419  qdot = task.computeControlLaw((vpTime::measureTimeMs() - t_init_servo) / 1000.);
420  } else {
421  qdot = task.computeControlLaw();
422  }
423 
424  // Display the current and desired feature points in the image display
426 
427  // Display the trajectory of the points used as features
428  if (opt_display_trajectory) {
429  display_point_trajectory(I, cog, traj_cog);
430  }
431 
432  if (opt_plot) {
433  plotter->plot(0, iter_plot, task.getError());
434  plotter->plot(1, iter_plot, qdot);
435  iter_plot++;
436  }
437 
438  if (opt_verbose) {
439  std::cout << "qdot: " << qdot.t() << std::endl;
440  }
441 
442  double error = task.getError().sumSquare();
443  ss.str("");
444  ss << "error: " << error;
445  vpDisplay::displayText(I, 20, static_cast<int>(I.getWidth()) - 150, ss.str(), vpColor::red);
446 
447  if (opt_verbose)
448  std::cout << "error: " << error << std::endl;
449 
450  if (error < convergence_threshold) {
451  has_converged = true;
452  std::cout << "Servo task has converged"
453  << "\n";
454  vpDisplay::displayText(I, 100, 20, "Servo task has converged", vpColor::red);
455  }
456  } // end if (cMo_vec.size() == 1)
457  else {
458  qdot = 0;
459  }
460 
461  if (!send_velocities) {
462  qdot = 0;
463  }
464 
465  // Send to the robot
466  robot.setVelocity(vpRobot::JOINT_STATE, qdot);
467  ss.str("");
468  ss << "Loop time: " << vpTime::measureTimeMs() - t_start << " ms";
469  vpDisplay::displayText(I, 40, 20, ss.str(), vpColor::red);
470 
471  vpDisplay::flush(I);
472 
474  if (vpDisplay::getClick(I, button, false)) {
475  switch (button) {
477  send_velocities = !send_velocities;
478  break;
479 
481  final_quit = true;
482  qdot = 0;
483  break;
484 
485  default:
486  break;
487  }
488  }
489  }
490  std::cout << "Stop the robot " << std::endl;
492 
493  if (opt_plot && plotter != nullptr) {
494  delete plotter;
495  plotter = nullptr;
496  }
497 
498  task.kill();
499 
500  if (!final_quit) {
501  while (!final_quit) {
502  g.acquire(I);
504 
505  vpDisplay::displayText(I, 20, 20, "Click to quit the program.", vpColor::red);
506  vpDisplay::displayText(I, 40, 20, "Visual servo converged.", vpColor::red);
507 
508  if (vpDisplay::getClick(I, false)) {
509  final_quit = true;
510  }
511 
512  vpDisplay::flush(I);
513  }
514  }
515  } catch (const vpRobotException &e) {
516  std::cout << "Catch Flir Ptu signal exception: " << e.getMessage() << std::endl;
518  } catch (const vpException &e) {
519  std::cout << "ViSP exception: " << e.what() << std::endl;
520  std::cout << "Stop the robot " << std::endl;
522  }
523 
524  return EXIT_SUCCESS;
525 }
526 #else
527 int main()
528 {
529 #if !defined(VISP_HAVE_FLYCAPTURE)
530  std::cout << "Install FLIR Flycapture" << std::endl;
531 #endif
532 #if !defined(VISP_HAVE_FLIR_PTU_SDK)
533  std::cout << "Install FLIR PTU SDK." << std::endl;
534 #endif
535  return 0;
536 }
537 #endif
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:164
Adaptive gain computation.
Error that can be emited by the vpRobot class and its derivates.
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
void setAprilTagPoseEstimationMethod(const vpPoseEstimationMethod &poseEstimationMethod)
static bool loadYAML(const std::string &filename, vpArray2D< Type > &A, char *header=NULL)
Definition: vpArray2D.h:653
Implementation of an homogeneous matrix and operations on such kind of matrices.
AprilTag 36h11 pattern (recommended)
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, unsigned int select=vpBasicFeature::FEATURE_ALL)
Definition: vpServo.cpp:497
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:128
void set_eJe(const vpMatrix &eJe_)
Definition: vpServo.h:508
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
Definition: vpDisplayX.h:150
void acquire(vpImage< unsigned char > &I)
std::string getNetworkHostName()
error that can be emited by ViSP classes.
Definition: vpException.h:71
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
size_t getNbObjects() const
void set_y(double y)
XML parser to load and save intrinsic camera parameters.
static const vpColor green
Definition: vpColor.h:182
void setLegend(unsigned int graphNum, unsigned int curveNum, const std::string &legend)
Definition: vpPlot.cpp:547
void set_x(double x)
static void flush(const vpImage< unsigned char > &I)
VISP_EXPORT double measureTimeMs()
Definition: vpTime.cpp:126
void open(vpImage< unsigned char > &I)
static const vpColor red
Definition: vpColor.h:179
Implementation of a rotation matrix and operations on such kind of matrices.
void setAprilTagQuadDecimate(float quadDecimate)
std::string getNetworkGateway()
void kill()
Definition: vpServo.cpp:192
Initialize the velocity controller.
Definition: vpRobot.h:66
vpColVector computeControlLaw()
Definition: vpServo.cpp:935
vpRobot::vpRobotStateType setRobotState(vpRobot::vpRobotStateType newState)
void set_Z(double Z)
void set_eMc(vpHomogeneousMatrix &eMc)
static void display(const vpImage< unsigned char > &I)
Generic class defining intrinsic camera parameters.
void setLambda(double c)
Definition: vpServo.h:406
void set_xyZ(double x, double y, double Z)
void setTitle(unsigned int graphNum, const std::string &title)
Definition: vpPlot.cpp:498
void get_eJe(vpMatrix &eJe)
void plot(unsigned int graphNum, unsigned int curveNum, double x, double y)
Definition: vpPlot.cpp:286
vpImagePoint getCog(size_t i) const
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
Definition: vpServo.cpp:574
const char * what() const
int parse(vpCameraParameters &cam, const std::string &filename, const std::string &camera_name, const vpCameraParameters::vpCameraParametersProjType &projModel, unsigned int image_width=0, unsigned int image_height=0)
Stops robot motion especially in velocity and acceleration control.
Definition: vpRobot.h:65
const char * getMessage(void) const
Definition: vpException.cpp:90
void connect(const std::string &portname, int baudrate=9600)
void initGraph(unsigned int graphNum, unsigned int curveNbr)
Definition: vpPlot.cpp:206
unsigned int getHeight() const
Definition: vpImage.h:186
std::string getNetworkIP()
Implementation of column vector and the associated operations.
Definition: vpColVector.h:130
void setDisplayTag(bool display, const vpColor &color=vpColor::none, unsigned int thickness=2)
void set_cVe(const vpVelocityTwistMatrix &cVe_)
Definition: vpServo.h:450
Implementation of a pose vector and operations on poses.
Definition: vpPoseVector.h:151
double sumSquare() const
vpVelocityTwistMatrix get_cVe() const
This class enables real time drawing of 2D or 3D graphics. An instance of the class open a window whi...
Definition: vpPlot.h:115
vpColVector getError() const
Definition: vpServo.h:282
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition: vpImagePoint.h:88
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
unsigned int getWidth() const
Definition: vpImage.h:244
void setServo(const vpServoType &servo_type)
Definition: vpServo.cpp:223
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1, bool segment=true)
Class that consider the case of a translation vector.
static void display(const vpServo &s, const vpCameraParameters &cam, const vpImage< unsigned char > &I, vpColor currentColor=vpColor::green, vpColor desiredColor=vpColor::red, unsigned int thickness=1)
static double distance(const vpImagePoint &iP1, const vpImagePoint &iP2)
Definition: vpImagePoint.h:285
bool detect(const vpImage< unsigned char > &I)