GrabBag/Tools/CalibView/Inc/CalibDataWidget.h

201 lines
4.7 KiB
C
Raw Permalink Normal View History

#ifndef CALIBDATAWIDGET_H
#define CALIBDATAWIDGET_H
#include <QWidget>
#include <QTableWidget>
#include <QPushButton>
#include <QComboBox>
#include <QGroupBox>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <QLabel>
#include <vector>
#include "HandEyeCalibTypes.h"
/**
* @brief
2026-02-18 15:11:41 +08:00
* Eye-To-HandEye-In-Hand TCP
*/
class CalibDataWidget : public QWidget
{
Q_OBJECT
public:
explicit CalibDataWidget(QWidget* parent = nullptr);
~CalibDataWidget() override;
/**
* @brief Eye-To-Hand
*/
void getEyeToHandData(std::vector<HECPoint3D>& eyePoints,
std::vector<HECPoint3D>& robotPoints) const;
/**
* @brief Eye-In-Hand
*/
void getEyeInHandData(std::vector<HECEyeInHandData>& calibData) const;
/**
* @brief
*/
HECCalibrationType getCalibType() const;
/**
2026-02-18 15:11:41 +08:00
* @brief
*/
2026-02-18 15:11:41 +08:00
void clearAll();
/**
2026-02-18 15:11:41 +08:00
* @brief
*/
2026-02-18 15:11:41 +08:00
void setRobotInput(double x, double y, double z, double rx, double ry, double rz);
/**
2026-02-18 15:11:41 +08:00
* @brief Eye-To-Hand
*/
2026-02-18 15:11:41 +08:00
void setCameraInput(double x, double y, double z, double rx, double ry, double rz);
/**
2026-02-18 15:11:41 +08:00
* @brief TCP
*/
2026-02-18 15:11:41 +08:00
HECTCPCalibData getTCPCalibData() const;
2026-02-18 15:11:41 +08:00
signals:
/**
2026-02-18 15:11:41 +08:00
* @brief
*/
2026-02-18 15:11:41 +08:00
void calibTypeChanged(HECCalibrationType type);
/**
2026-02-18 15:11:41 +08:00
* @brief Eye-To-Hand
*/
2026-02-18 15:11:41 +08:00
void requestEyeToHandCalib();
/**
2026-02-18 15:11:41 +08:00
* @brief Eye-In-Hand
*/
2026-02-18 15:11:41 +08:00
void requestEyeInHandCalib();
/**
2026-02-18 15:11:41 +08:00
* @brief TCP
*/
2026-02-18 15:11:41 +08:00
void requestTCPCalib();
private slots:
/**
2026-02-18 15:11:41 +08:00
* @brief
*/
2026-02-18 15:11:41 +08:00
void onCalibTypeChanged(int index);
/**
2026-02-18 15:11:41 +08:00
* @brief TCP 3-DOF / 6-DOF
*/
2026-02-18 15:11:41 +08:00
void onTCPModeChanged(int index);
/**
2026-02-18 15:11:41 +08:00
* @brief TCP
*/
2026-02-18 15:11:41 +08:00
void onTCPAddRow();
/**
* @brief TCP
*/
void onTCPRemoveRow();
private:
/**
* @brief
*/
void setupUI();
/**
* @brief Eye-To-Hand
*/
2026-02-18 15:11:41 +08:00
QWidget* createEyeToHandGroup();
/**
* @brief Eye-In-Hand
*/
2026-02-18 15:11:41 +08:00
QWidget* createEyeInHandGroup();
/**
2026-02-18 15:11:41 +08:00
* @brief TCP
*/
2026-02-18 15:11:41 +08:00
QWidget* createTCPCalibGroup();
/**
* @brief
*/
void updateTableVisibility();
// 标定模式选择
QComboBox* m_cbCalibType;
// Eye-To-Hand 数据表格
QTableWidget* m_tableEyeToHand;
2026-02-18 15:11:41 +08:00
QWidget* m_groupEyeToHand;
// Eye-In-Hand 数据表格
QTableWidget* m_tableEyeInHand;
2026-02-18 15:11:41 +08:00
QWidget* m_groupEyeInHand;
// Eye-To-Hand 内联按钮
QPushButton* m_btnEyeToHandAddRow;
QPushButton* m_btnEyeToHandDeleteRow;
QPushButton* m_btnEyeToHandCalib;
// Eye-In-Hand 内联按钮
QPushButton* m_btnEyeInHandAddRow;
QPushButton* m_btnEyeInHandDeleteRow;
QPushButton* m_btnEyeInHandCalib;
// TCP 标定相关
QWidget* m_groupTCPCalib;
QTableWidget* m_tableTCP;
QComboBox* m_tcpModeCombo;
QComboBox* m_tcpEulerOrderCombo;
QSpinBox* m_tcpRefPoseIndex;
QDoubleSpinBox* m_tcpWorldRx;
QDoubleSpinBox* m_tcpWorldRy;
QDoubleSpinBox* m_tcpWorldRz;
QGroupBox* m_tcpOrientationGroup;
QPushButton* m_tcpAddRowBtn;
QPushButton* m_tcpRemoveRowBtn;
QPushButton* m_btnTCPCalib;
// Eye-To-Hand 输入框
QDoubleSpinBox* m_inputEyeX;
QDoubleSpinBox* m_inputEyeY;
QDoubleSpinBox* m_inputEyeZ;
QDoubleSpinBox* m_inputRobotX;
QDoubleSpinBox* m_inputRobotY;
QDoubleSpinBox* m_inputRobotZ;
QPushButton* m_btnEyeToHandAddInput;
// Eye-In-Hand 输入框
QDoubleSpinBox* m_inputEndX;
QDoubleSpinBox* m_inputEndY;
QDoubleSpinBox* m_inputEndZ;
QDoubleSpinBox* m_inputEndRoll;
QDoubleSpinBox* m_inputEndPitch;
QDoubleSpinBox* m_inputEndYaw;
QDoubleSpinBox* m_inputCamX;
QDoubleSpinBox* m_inputCamY;
QDoubleSpinBox* m_inputCamZ;
QPushButton* m_btnEyeInHandAddInput;
// TCP 输入框
QDoubleSpinBox* m_inputTcpX;
QDoubleSpinBox* m_inputTcpY;
QDoubleSpinBox* m_inputTcpZ;
QDoubleSpinBox* m_inputTcpRx;
QDoubleSpinBox* m_inputTcpRy;
QDoubleSpinBox* m_inputTcpRz;
QPushButton* m_btnTcpAddInput;
};
#endif // CALIBDATAWIDGET_H