ptuwindow.cpp
Go to the documentation of this file.
1 
18 #include "GUI/ptuwindow.h"
19 #include "QImage"
20 #include "QRgb"
21 #include <QFileDialog>
22 
23 
24 PTUWindow::PTUWindow(QWidget *parent) :
25  QDialog(parent)
26 {
27  transformationData.clear();
30  this->init(myMarkerPublisher, calibrationObject, myTransformationPublisher, Eigen::Matrix4d::Identity());
31 }
32 
34  QDialog(parent)
35 {
36  this->init(markerPublisher, calibrationObject, transformationPublisher, calObjTransformation);
37 }
38 
40 {
41  this->setWindowTitle( "PTU Calibration");
44  double marker_recognizer_timeout,marker_recognizer_early_abort_timeout, marker_min_distance, marker_max_distance;
45  int pan_step_count, tilt_step_count;
47  mNodeHandle.getParam("pan_min_angle", pan_min_angle);
48  mNodeHandle.getParam("pan_max_angle", pan_max_angle);
49  mNodeHandle.getParam("tilt_min_angle", tilt_min_angle);
50  mNodeHandle.getParam("tilt_max_angle", tilt_max_angle);
51  mNodeHandle.getParam("pan_step_count", pan_step_count);
52  mNodeHandle.getParam("tilt_step_count", tilt_step_count);
53  mNodeHandle.getParam("marker_recognizer_timeout", marker_recognizer_timeout);
54  mNodeHandle.getParam("marker_recognizer_early_abort_timeout", marker_recognizer_early_abort_timeout);
55  mNodeHandle.getParam("marker_min_distance", marker_min_distance);
56  mNodeHandle.getParam("marker_max_distance", marker_max_distance);
57  mNodeHandle.getParam("useAveragedMarkerData", useAveragedMarkerData);
58  this->marker_min_distance = marker_min_distance;
59  this->marker_max_distance = marker_max_distance;
60  this->tilt_min_angle = tilt_min_angle;
61  this->tilt_max_angle = tilt_max_angle;
62  this->pan_min_angle = pan_min_angle;
63  this->pan_max_angle = pan_max_angle;
64  this->useAveragedMarkerData = useAveragedMarkerData;
65  ptuManager = new PTU_Manager(pan_min_angle, pan_max_angle, tilt_min_angle, tilt_max_angle, pan_step_count, tilt_step_count);
66  ROS_INFO("Manager started");
67 
69 
70  this->markerPublisher = markerPublisher;
71  this->calibrationObject = calibrationObject;
72  this->transformationPublisher = transformationPublisher;
73  this->transformation_LaserScanner = calObjTransformation;
74  this->markerManager = new Marker_Manager(marker_recognizer_timeout, marker_recognizer_early_abort_timeout);
75 
76  markerPublisher->publishARMarkers(false, false, transformation_LaserScanner);
77 
78  btnStartStopPTUSearch = new QPushButton(this);
79  btnStartStopPTUSearch->resize(100, 25);
80  btnStartStopPTUSearch->setVisible(true);
81  btnStartStopPTUSearch->setText("Start");
82 
83  btnExportCameraPoses = new QPushButton(this);
84  btnExportCameraPoses->resize(100, 25);
85  btnExportCameraPoses->setVisible(true);
86  btnExportCameraPoses->setText("Export Camera");
87  btnExportCameraPoses->setEnabled(false);
88 
89  btnExportRelativeMarkerPoses = new QPushButton(this);
90  btnExportRelativeMarkerPoses->resize(100, 25);
91  btnExportRelativeMarkerPoses->setVisible(true);
92  btnExportRelativeMarkerPoses->setText("Export Marker");
93  btnExportCameraPoses->setEnabled(false);
94 
95  btnSkipFramePTUSearch = new QPushButton(this);
96  btnSkipFramePTUSearch->resize(100, 25);
97  btnSkipFramePTUSearch->setVisible(true);
98  btnSkipFramePTUSearch->setText("Skip Frame");
99  btnSkipFramePTUSearch->setEnabled(false);
100 
101  btnExportCameraOffset = new QPushButton(this);
102  btnExportCameraOffset->resize(100, 25);
103  btnExportCameraOffset->setVisible(true);
104  btnExportCameraOffset->setText("Export Offset");
105  btnExportCameraOffset->setEnabled(false);
106 
107  lblCameraFrameCount = new QLabel(this);
108  lblCameraFrameCount->resize(200, 30);
109  lblCameraFrameCount->setVisible(true);
110 
111  lblRelativeMarkerFrameCount = new QLabel(this);
112  lblRelativeMarkerFrameCount->resize(350, 30);
113  lblRelativeMarkerFrameCount->setVisible(true);
114 
115  CameraThread * camThreadLeft = new CameraThread(0, "/stereo/left/image_raw");
116  cameraLeft = new CameraWidget(this, camThreadLeft);
117 
118  cameraLeft->resize(320,240);
119  cameraLeft->move(50,50);
120 
121  CameraThread * camThreadRight = new CameraThread(0, "/stereo/right/image_raw");
122  cameraRight = new CameraWidget(this, camThreadRight);
123  cameraRight->resize(320,240);
124  cameraRight->move(400,50);
125 
126  connect(btnStartStopPTUSearch, SIGNAL(clicked()),this, SLOT(btnStartStopPTUSearch_clicked()));
127  connect(btnExportCameraPoses, SIGNAL(clicked()),this, SLOT(btnExportCameraPoses_clicked()));
128  connect(btnExportRelativeMarkerPoses, SIGNAL(clicked()),this, SLOT(btnExportRelativeMarkerPoses_clicked()));
129  connect(btnExportCameraOffset, SIGNAL(clicked()),this, SLOT(btnExportCameraOffset_clicked()));
130  connect(btnSkipFramePTUSearch, SIGNAL(clicked()),this, SLOT(btnSkipFramePTUSearch_clicked()));
131 
132  connect(this, SIGNAL(newTransform_Camera(const Eigen::Matrix4d, Markertype)),this->transformationPublisher.get(), SLOT(newTransform_Camera(const Eigen::Matrix4d, Markertype)));
133 
134  ROS_INFO("PTU Window started");
135  stopSignal = true;
136 
137  mTFlistener = new tf::TransformListener();
138 
139  setUI_Elements();
140 }
141 
143 {
144  btnExportCameraPoses->setEnabled(transformationData.size() > 0);
145  btnExportRelativeMarkerPoses->setEnabled(relativeMarkerPoses.size() > 0);
146  btnExportCameraOffset->setEnabled(relativeMarkerPoses.size() > 0);
147 
148  QString text = "Camera datasets found: ";
149  text += QString::number(transformationData.size());
150  lblCameraFrameCount->setText(text);
151 
152  text = "Relative marker frames found: ";
153  text += QString::number(relativeMarkerPoses.size());
154  //Calculate standard deviation
155  if (relativeMarkerPoses.size() > 0)
156  {
157  double standardDeviation = 0.0;
158  for (unsigned int i = 0; i < relativeMarkerPoses.size(); i++)
159  {
160  Eigen::Vector3d averageTranslation(relativeMarkerPoses.at(i)(0,3), relativeMarkerPoses.at(i)(1,3),relativeMarkerPoses.at(i)(2,3));
161  standardDeviation += pow(averageTranslation.norm(), 2.0);
162  }
163  standardDeviation = sqrt(standardDeviation/(double)relativeMarkerPoses.size());
164  text += ", standarddeviation: ";
165  text += QString::number(standardDeviation);
166  }
167 
168  lblRelativeMarkerFrameCount->setText(text);
169 }
170 
171 void PTUWindow::resizeEvent(QResizeEvent * event)
172 {
173  cameraLeft->resize(this->width()/2-60,this->height()-150);
174  cameraLeft->move(30,50);
175  cameraRight->resize(this->width()/2-60,this->height()-150);
176  cameraRight->move(this->width()/2+30,50);
177  btnSkipFramePTUSearch->move(this->width()-540,this->height()-40);
178  btnStartStopPTUSearch->move(this->width()-435,this->height()-40);
179  btnExportCameraPoses->move(this->width()-330,this->height()-40);
180  btnExportRelativeMarkerPoses->move(this->width()-225,this->height()-40);
181  btnExportCameraOffset->move(this->width()-120,this->height()-40);
182  lblCameraFrameCount->move(30,this->height()-75);
183  lblRelativeMarkerFrameCount->move(30,this->height()-45);
184  QDialog::resizeEvent(event);
185 }
186 
188 {
190  {
192  }
193 }
194 
196 {
197  if (stopSignal)
198  {
199  ROS_INFO("PTU: Starting iteration..");
200  btnStartStopPTUSearch->setText("Stop");
201  stopSignal = false;
202  startCapture();
203  }
204  else
205  {
206  disconnect(this, SLOT(ptu_moved(double, double)));
207  disconnect(this, SLOT(markerFound(std::string, const Eigen::Matrix4d)));
208  btnStartStopPTUSearch->setText("Start");
209  stopSignal = true;
210  }
211 }
212 
214 {
215  if (cameraOffsetParameters.size() > 0)
216  {
217  QString fileName = QFileDialog::getSaveFileName(this, "Save file", "CameraOffset.off", tr("Offsetfile (*.off)"));
218  if (fileName.length() > 0)
219  {
220  ROS_INFO_STREAM("File: " << fileName.toStdString());
221  TransformationFile_Manager_Data fileManager(fileName.toStdString());
223  }
224  }
225 
226 }
227 
229 {
230  if (transformationData.size() > 0)
231  {
232  QString fileName = QFileDialog::getSaveFileName(this, "Save file", "CalibrationData.data", tr("Calibrationfile (*.data)"));
233  if (fileName.length() > 0)
234  {
235  ROS_INFO_STREAM("File: " << fileName.toStdString());
236  TransformationFile_Manager_Data fileManager(fileName.toStdString());
237  fileManager.writeToFile(transformationData);
238  }
239  }
240 }
241 
243 {
244  if (relativeMarkerPoses.size() > 0)
245  {
246  QString fileName = QFileDialog::getSaveFileName(this, "Save file", "CalibrationData.data", tr("Calibrationfile (*.data)"));
247  if (fileName.length() > 0)
248  {
249  ROS_INFO_STREAM("File: " << fileName.toStdString());
250  TransformationFile_Manager_Data fileManager(fileName.toStdString());
252  }
253  }
254 }
255 
257 {
259  colouredCameraFrames.clear();
260  markerLeftPoses.clear();
261  markerRightPoses.clear();
262  tempMarkerLeftPoses.clear();
263  tempMarkerRightPoses.clear();
264  cameraOffsetParameters.clear();
265  connect(ptuManager, SIGNAL(ptu_moved(double, double)),this, SLOT(ptu_moved(double, double)));
266  connect(markerManager, SIGNAL(markerFound(std::string,const Eigen::Matrix4d)),this, SLOT(markerFound(std::string, const Eigen::Matrix4d)));
267  ROS_INFO("PTU: Starting iteration..");
268  if (this->useAveragedMarkerData)
269  {
270  ROS_INFO("Averaging PTU frame ON");
271  }
272  else
273  {
274  ROS_INFO("Averaging PTU frame OFF");
275  }
276  slotEnabled_PTU = true;
277  slotEnabled_Marker = false;
278  btnSkipFramePTUSearch->setEnabled(true);
279  if (!ptuManager->nextPose())
280  {
281  ROS_INFO("PTU: No iteration possible.");
282  btnStartStopPTUSearch->setText("Stop");
283  disconnect(this, SLOT(ptu_moved(double, double)));
284  disconnect(this, SLOT(markerFound(std::string, const Eigen::Matrix4d)));
285  stopSignal = true;
286  btnSkipFramePTUSearch->setEnabled(false);
287  }
288 }
289 
291 {
292  //Create visualization markers
294  cCF.pose = data.PTU_Frame;
295  cCF.color.r = 1.0;
296  cCF.color.g = (data.pan - pan_min_angle) / (pan_max_angle - pan_min_angle);
297  cCF.color.b = (data.tilt - tilt_min_angle) / (tilt_max_angle - tilt_min_angle);
298  cCF.color.a = 1.0;
299  colouredCameraFrames.push_back(cCF);
300  //Store dataset
301  transformationData.push_back(data);
302 
303  //Publish visualization
304  markerPublisher->publishColouredCameraFrames(&colouredCameraFrames);
305 }
306 
307 void PTUWindow::markerFound(std::string markerNumber, const Eigen::Matrix4d &transformation)
308 {
310  {
311  if (markerNumber != "")
312  {
313  ROS_INFO_STREAM(markerNumber);
314  bool markerLeft = (markerNumber == calibrationObject->marker_id_left);
315  bool markerRight = (markerNumber == calibrationObject->marker_id_right);
316  markerPublisher->publishARMarkers(markerLeft, markerRight, transformation_LaserScanner);
317  if (markerRight || markerLeft)
318  {
319  Eigen::Matrix4d markerBase;
320  // Constant transformation frame that is multiplied to the detected marker frame due to recent changes in the markers coordinate system
321  Eigen::Affine3d cameraCorrectionMatrix;
322  cameraCorrectionMatrix = Eigen::Affine3d (Eigen::AngleAxisd(M_PI/2.0, Eigen::Vector3d(1.0,0.0,0.0)));
323 
324  Eigen::Affine3d markerFrame(transformation);
325  Eigen::Matrix4d markerToCamera = markerFrame.inverse().matrix();
326  markerToCamera = markerToCamera;
327  if (markerToCamera(1,3) < 0)
328  {
329  Markertype markertype;
330  if (markerRight)
331  {
332  if (this->useAveragedMarkerData)
333  {
334  tempMarkerRightPoses.push_back(transformation);
335  }
336  else
337  {
338  markerRightPoses.push_back(transformation);
339  }
340  markerBase = transformation_LaserScanner * calibrationObject->frame_marker_right*cameraCorrectionMatrix.matrix();
341  markertype = Markertype::RIGHT;
342  ROS_INFO_STREAM("Marker right found");
343  }
344  else
345  {
346  if (this->useAveragedMarkerData)
347  {
348  tempMarkerLeftPoses.push_back(transformation);
349  }
350  else
351  {
352  markerLeftPoses.push_back(transformation);
353  }
354  markerBase = transformation_LaserScanner * calibrationObject->frame_marker_left*cameraCorrectionMatrix.matrix();
355  markertype = Markertype::LEFT;
356  ROS_INFO_STREAM("Marker left found");
357  }
358 
359  Eigen::Matrix4d scannerToPTU = markerBase * markerToCamera;
360  Eigen::Vector3d startPoint(markerBase(0,3), markerBase(1,3),markerBase(2,3));
361  Eigen::Vector3d endPoint(scannerToPTU(0,3), scannerToPTU(1,3),scannerToPTU(2,3));
362  if (markerPoseWithinBounds(transformation))
363  {
364  double pan = ptuManager->getPan();
365  double tilt = ptuManager->getTilt();
366 
367  //Publish tf
368  this->newTransform_Camera(markerToCamera, markertype);
369 
370  Transformation_Data dataSet;
371  dataSet.pan = pan;
372  dataSet.tilt = tilt;
373  dataSet.PTU_Frame = scannerToPTU;
375  if (this->useAveragedMarkerData)
376  {
377  tempTransformationData.push_back(dataSet);
378  }
379  else
380  {
382  }
383 
384  markerPublisher->publishCameraFramePointer(startPoint, endPoint, true);
385 
386  //Publish difference to camera model
387  if (mTFlistener->waitForTransform("/calibration_center", "/camera_right_frame", ros::Time(), ros::Duration(4.0)))
388  {
389  //Assume that tf is alive and lookups will be successful
390  tf::StampedTransform cameraOffsetTF, cameraOffsetOldTF;
391  Eigen::Affine3d cameraOffsetEigen, cameraOffsetOldEigen;
392  mTFlistener->lookupTransform("/calibration_center", "/camera_right_frame", ros::Time(0), cameraOffsetTF);
393  mTFlistener->lookupTransform("/calibration_center", "/camera_right_frame_old", ros::Time(0), cameraOffsetOldTF);
394  tf::poseTFToEigen(cameraOffsetTF, cameraOffsetEigen);
395  tf::poseTFToEigen(cameraOffsetOldTF, cameraOffsetOldEigen);
396  cameraOffsetEigen = cameraOffsetEigen.inverse() * scannerToPTU;
397  cameraOffsetOldEigen = cameraOffsetOldEigen.inverse() * scannerToPTU;
398  ROS_INFO_STREAM("Offset between camera frames (new): " << cameraOffsetEigen(0,3) << ", "<< cameraOffsetEigen(1,3) << ", "<< cameraOffsetEigen(2,3) << " for (Pan: " << pan <<", Tilt: " << tilt << ")");
399  ROS_INFO_STREAM("Offset between camera frames (old): " << cameraOffsetOldEigen(0,3) << ", "<< cameraOffsetOldEigen(1,3) << ", "<< cameraOffsetOldEigen(2,3) << " for (Pan: " << pan <<", Tilt: " << tilt << ")");
400  PanTiltOffsetTuple offsetParameter = std::make_tuple (pan,tilt, cameraOffsetEigen.matrix(), cameraOffsetOldEigen.matrix());
401  cameraOffsetParameters.push_back(offsetParameter);
402  }
403  else
404  {
405  ROS_ERROR("TF lookup timed out. Is the transformation publisher running?");
406  }
407  }
408  else
409  {
410  markerPublisher->publishCameraFramePointer(startPoint, endPoint, false);
411  ROS_ERROR_STREAM("Marker " << markerNumber << " was out of bounds.");
412  }
413  }
414  else
415  {
416  ROS_ERROR_STREAM("Marker " << markerNumber << ": unexpected position.");
417  }
418  }
419  else
420  {
421  ROS_ERROR_STREAM("Unexpected marker: " << markerNumber);
422  }
423  }
424  else
425  {
427  }
428  }
429  setUI_Elements();
430 }
431 
433 {
434  slotEnabled_Marker = false;
435  markerPublisher->publishARMarkers(false, false, transformation_LaserScanner);
436  markerManager->terminate();
437 
438  if (this->useAveragedMarkerData)
439  {
441  }
442 
443  for(unsigned int i = 0; i < markerRightPoses.size(); i++)
444  {
445  for(unsigned int j = 0; j < markerLeftPoses.size(); j++)
446  {
447  Eigen::Affine3d markerLeftReferencePose(markerLeftPoses.at(j));
448  Eigen::Affine3d markerRightReferencePose(markerRightPoses.at(i));
449  markerRightReferencePose = markerLeftReferencePose.inverse() * markerRightReferencePose;
450  relativeMarkerPoses.push_back(markerRightReferencePose.matrix());
451  }
452  }
453  markerLeftPoses.clear();
454  markerRightPoses.clear();
455  btnSkipFramePTUSearch->setEnabled(false);
456  if (ptuManager->nextPose())
457  {
458  slotEnabled_PTU = true;
459  ROS_INFO("PTU: Moving to next pose..");
460  }
461  else
462  {
463  ROS_INFO("PTU: Finished");
464  btnStartStopPTUSearch->setText("Start");
465  stopSignal = true;
466  disconnect(this, SLOT(ptu_moved(double, double)));
467  disconnect(this, SLOT(markerFound(std::string, Eigen::Matrix4d)));
468  }
469 }
470 
472 {
473  //Calculate average camera frame
474  if (tempTransformationData.size() > 0)
475  {
476  Transformation_Data dataSet;
477  dataSet.pan = tempTransformationData.at(0).pan;
478  dataSet.tilt = tempTransformationData.at(0).tilt;
479  std::vector<Eigen::Matrix4d , Eigen::aligned_allocator<Eigen::Matrix4d > > tempFrames;
480  for (unsigned int i = 0; i < tempTransformationData.size(); i++)
481  {
482  tempFrames.push_back(tempTransformationData.at(i).PTU_Frame);
483  }
484  dataSet.PTU_Frame = calculateAverageDataFrame(tempFrames);
486  }
487  //Calculate marker frames of left and right marker
488  if (this->tempMarkerLeftPoses.size() > 0)
489  {
490  Eigen::Matrix4d averageLeftFrame = calculateAverageDataFrame(this->tempMarkerLeftPoses);
491  markerLeftPoses.push_back(averageLeftFrame);
492  }
493  if (this->tempMarkerRightPoses.size() > 0)
494  {
495  Eigen::Matrix4d averageRightFrame = calculateAverageDataFrame(this->tempMarkerRightPoses);
496  markerRightPoses.push_back(averageRightFrame);
497  }
498  tempTransformationData.clear();
499  tempMarkerLeftPoses.clear();
500  tempMarkerRightPoses.clear();
501 }
502 
503 Eigen::Matrix4d PTUWindow::calculateAverageDataFrame(std::vector<Eigen::Matrix4d , Eigen::aligned_allocator<Eigen::Matrix4d > > frames)
504 {
505  Eigen::Affine3d averageFrame;
506  if (frames.size() > 0)
507  {
508  Eigen::Vector3d averageTranslation(frames.at(0)(0,3), frames.at(0)(1,3),frames.at(0)(2,3));
509  Eigen::Affine3d transformation(frames.at(0));
510  Eigen::Quaterniond averageRotation((transformation.rotation().matrix()));
511 
512  for (unsigned int i = 1; i < frames.size(); i++)
513  {
514  Eigen::Affine3d tempTransformation(frames.at(i));
515  Eigen::Quaterniond tempRotation((tempTransformation.rotation().matrix()));
516  Eigen::Vector3d tempTranslation(tempTransformation(0,3), tempTransformation(1,3), tempTransformation(2,3));
517  averageTranslation = averageTranslation + tempTranslation;
518  averageRotation = averageRotation.slerp((double)i/(i+1.0), tempRotation);
519  }
520  averageTranslation = averageTranslation * 1.0/(double)frames.size();
521 
522  averageFrame = Eigen::Affine3d(Eigen::Translation3d(averageTranslation));
523  averageFrame = averageFrame * averageRotation;
524  }
525  return averageFrame.matrix();
526 }
527 
528 bool PTUWindow::markerPoseWithinBounds(const Eigen::Matrix4d& transform)
529 {
530  Eigen::Vector3d vec3(transform(0,3), transform(1,3), transform(2,3));
531 
532  double length = vec3.norm();
533  if (length < marker_min_distance)
534  {
535  ROS_ERROR_STREAM("Length (" << length << ") was smaller than min distance");
536  return false;
537  }
538  if (length > marker_max_distance)
539  {
540  ROS_ERROR_STREAM("Length (" << length << ") was greater than max distance");
541  return false;
542  }
543  if (vec3(1) > 0.0)
544  {
545  //ROS_ERROR_STREAM("Vector is going upwards");
546  //return false;
547  }
548  return true;
549 }
550 
551 void PTUWindow::ptu_moved(double pan, double tilt)
552 {
553  if (slotEnabled_PTU && !stopSignal)
554  {
555  slotEnabled_PTU = false;
556  ROS_DEBUG_STREAM("PTU: Moved to " << pan << ", " << tilt);
557  markerManager->start();
558  btnSkipFramePTUSearch->setEnabled(true);
559  slotEnabled_Marker = true;
560  }
561 }
std::vector< Eigen::Matrix4d, Eigen::aligned_allocator< Eigen::Matrix4d > > markerRightPoses
Definition: ptuwindow.h:108
double getTilt()
std::vector< Eigen::Matrix4d, Eigen::aligned_allocator< Eigen::Matrix4d > > tempMarkerLeftPoses
Definition: ptuwindow.h:112
void setUI_Elements()
Definition: ptuwindow.cpp:142
double pan_min_angle
Definition: ptuwindow.h:90
CameraWidget * cameraRight
Definition: ptuwindow.h:74
std::vector< Eigen::Matrix4d, Eigen::aligned_allocator< Eigen::Matrix4d > > markerLeftPoses
Definition: ptuwindow.h:109
QPushButton * btnExportCameraOffset
Definition: ptuwindow.h:68
std::vector< Transformation_Data > tempTransformationData
Definition: ptuwindow.h:105
double marker_max_distance
Definition: ptuwindow.h:87
bool stopSignal
Definition: ptuwindow.h:78
double marker_min_distance
Definition: ptuwindow.h:86
bool markerPoseWithinBounds(const Eigen::Matrix4d &transform)
Definition: ptuwindow.cpp:528
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Matrix4d pose
void resizeEvent(QResizeEvent *event)
Definition: ptuwindow.cpp:171
bool slotEnabled_Marker
Definition: ptuwindow.h:77
void btnSkipFramePTUSearch_clicked()
Definition: ptuwindow.cpp:187
ROSCPP_DECL const std::string & getName()
boost::shared_ptr< MarkerPublisher > markerPublisher
Definition: ptuwindow.h:84
std::vector< colouredCameraFrame, Eigen::aligned_allocator< colouredCameraFrame > > colouredCameraFrames
Definition: ptuwindow.h:102
std_msgs::ColorRGBA color
boost::shared_ptr< Transformation_Publisher > transformationPublisher
Definition: ptuwindow.h:96
void stopMarkerCapturing()
Definition: ptuwindow.cpp:432
tf::TransformListener * mTFlistener
Definition: ptuwindow.h:93
void btnExportRelativeMarkerPoses_clicked()
Definition: ptuwindow.cpp:242
QLabel * lblRelativeMarkerFrameCount
Definition: ptuwindow.h:71
Marker_Manager * markerManager
Definition: ptuwindow.h:62
PTUWindow(QWidget *parent=0)
Definition: ptuwindow.cpp:24
QPushButton * btnSkipFramePTUSearch
Definition: ptuwindow.h:65
void markerFound(std::string markerNumber, const Eigen::Matrix4d &transformation)
Definition: ptuwindow.cpp:307
bool writeTransformationToFile(const std::vector< Eigen::Matrix4d, Eigen::aligned_allocator< Eigen::Matrix4d >> transformation)
std::vector< Eigen::Matrix4d, Eigen::aligned_allocator< Eigen::Matrix4d > > relativeMarkerPoses
Definition: ptuwindow.h:107
double pan_max_angle
Definition: ptuwindow.h:91
PanTiltOffsetTupleList cameraOffsetParameters
Definition: ptuwindow.h:114
void newTransform_Camera(const Eigen::Matrix4d &transform, Markertype markertype)
QPushButton * btnExportCameraPoses
Definition: ptuwindow.h:66
void btnExportCameraPoses_clicked()
Definition: ptuwindow.cpp:228
#define ROS_INFO(...)
void handleNewTransformationData(Transformation_Data &data)
Definition: ptuwindow.cpp:290
std::vector< Transformation_Data > transformationData
Definition: ptuwindow.h:103
CameraWidget * cameraLeft
Definition: ptuwindow.h:73
Eigen::Matrix4d calculateAverageDataFrame(std::vector< Eigen::Matrix4d, Eigen::aligned_allocator< Eigen::Matrix4d > > frames)
Definition: ptuwindow.cpp:503
bool setStartPose()
Definition: ptu_manager.cpp:51
std::vector< Eigen::Matrix4d, Eigen::aligned_allocator< Eigen::Matrix4d > > tempMarkerRightPoses
Definition: ptuwindow.h:111
void btnStartStopPTUSearch_clicked()
Definition: ptuwindow.cpp:195
void ptu_moved(double pan, double tilt)
Definition: ptuwindow.cpp:551
bool nextPose()
Definition: ptu_manager.cpp:65
#define ROS_DEBUG_STREAM(args)
double getPan()
Definition: ptu_manager.cpp:99
QPushButton * btnExportRelativeMarkerPoses
Definition: ptuwindow.h:67
QPushButton * btnStartStopPTUSearch
Definition: ptuwindow.h:64
Eigen::Matrix4d PTU_Frame
QLabel * lblCameraFrameCount
Definition: ptuwindow.h:70
void init(boost::shared_ptr< MarkerPublisher > markerManager, boost::shared_ptr< Calibration_Object > calibrationObject, boost::shared_ptr< Transformation_Publisher > transformationPublisher, const Eigen::Matrix4d calObjTransformation)
Definition: ptuwindow.cpp:39
#define ROS_INFO_STREAM(args)
boost::shared_ptr< Calibration_Object > calibrationObject
Definition: ptuwindow.h:99
void calculateAllAverageDataFrames()
Definition: ptuwindow.cpp:471
bool getParam(const std::string &key, std::string &s) const
bool useAveragedMarkerData
Definition: ptuwindow.h:81
void startCapture()
Definition: ptuwindow.cpp:256
void btnExportCameraOffset_clicked()
Definition: ptuwindow.cpp:213
Eigen::Matrix4d transformation_LaserScanner
Definition: ptuwindow.h:101
PTU_Manager * ptuManager
Definition: ptuwindow.h:61
#define ROS_ERROR_STREAM(args)
#define ROS_ERROR(...)
bool writeCameraOffsetToFile(const PanTiltOffsetTupleList &offsetData)
Eigen::Matrix4d LaserScan_Frame
bool slotEnabled_PTU
Definition: ptuwindow.h:76
std::tuple< double, double, Eigen::Matrix4d, Eigen::Matrix4d > PanTiltOffsetTuple
double tilt_min_angle
Definition: ptuwindow.h:88
double tilt_max_angle
Definition: ptuwindow.h:89
bool setNeutralPose()
Definition: ptu_manager.cpp:59


asr_mild_calibration_tool
Author(s): Aumann Florian, Heller Florian, Meißner Pascal
autogenerated on Mon Dec 2 2019 03:11:43