24 #include <RobotComponents/gui-plugins/HandEyeCalibration/ui_HandEyeCalibrationWidget.h>
25 #include <Inventor/sensors/SoTimerSensor.h>
33 #include <RobotAPI/interface/core/RobotState.h>
39 #include <VisionX/interface/core/PointCloudProviderInterface.h>
43 #include <QColorDialog>
90 void loadSettings(QSettings* settings)
override;
95 void saveSettings(QSettings* settings)
override;
103 return "RobotControl.HandEyeCalibrationGUI";
105 QPointer<QDialog> getConfigDialog(QWidget* parent = 0)
override;
106 void configured()
override;
109 void onInitPointCloudProcessor()
override;
110 void onConnectPointCloudProcessor()
override;
111 void onDisconnectPointCloudProcessor()
override;
112 void onExitPointCloudProcessor()
override;
113 void process()
override;
119 std::string getProviderFrame()
const;
120 void cropOriginalPointCloud(
const pcl::PointCloud<PointT>& cloud,
const VirtualRobot::EndEffectorPtr eef)
const;
121 std::string formatTransformationMatrix(
Eigen::Matrix4f mat,
int decimalPlacesOrientation = 6,
int decimalPlacesPosition = 2)
const;
122 void enableGuiElements();
123 void disableGuiElements();
124 void updateManipulatorVisualization();
125 bool findStringIC(
const std::string& strHaystack,
const std::string& strNeedle)
const;
128 void processPointCloud();
129 void activeEndEffectorChanged(QString endEffectorName);
131 void slider_croppingRange_changed(
int value);
132 void cb_croppingActive_changed(
int state);
133 void cb_inverted_changed(
bool checked);
134 void btn_copyToClipboard_pressed();
135 void btn_resetToModel_pressed();
136 void btn_backgroundColor_pressed();
137 void btn_pointCloudColor_pressed();
138 void sB_pointSize_changed(
int value);
140 void cameraNodeTransformationChanged(
double value);
145 void saveDatapoint();
149 void pointCloudUpdated();
152 QPointer<QWidget> m_widget;
157 Ui::HandEyeCalibrationWidget widget;
158 QPointer<SimpleConfigDialog> dialog;
160 std::string providerName;
162 std::string referenceFrame;
163 pcl::PointCloud<PointT>::Ptr providerBuffer;
171 std::string robotStateComponentName;
176 VirtualRobot::EndEffectorPtr activeEndEffector;
177 std::map<std::string, std::pair<VirtualRobot::RobotPtr, Eigen::Matrix4f>> robotEEFMap;
179 Eigen::Matrix4f getOffsetMatrixForEEF(
const VirtualRobot::EndEffectorPtr eef)
const;
180 void setOffsetMatrixForEEF(
const VirtualRobot::EndEffectorPtr eef,
const Eigen::Matrix4f& offset);
182 bool croppingActive =
true;
185 void taskEEFManipulationCB();
187 void taskLocalRobotUpdateCB();
190 QColorDialog colorDialog;
192 VirtualRobot::RobotNodePtr cameraNode;