手眼标定完善
This commit is contained in:
parent
11c615d0c9
commit
ce4bd9348a
46
GrabBagPrj/CalibView.iss
Normal file
46
GrabBagPrj/CalibView.iss
Normal file
@ -0,0 +1,46 @@
|
||||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "手眼标定工具"
|
||||
#define MyAppVersion "1.0.0"
|
||||
#define MyAppPublisher ""
|
||||
#define MyAppURL ""
|
||||
#define MyAppExeName "CalibView.exe"
|
||||
#define MyProgramPath ".\buildwin\CalibView"
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{F8A7B6C5-D4E3-4F2A-9B1C-0D8E7F6A5B4C}}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
AppVerName={#MyAppName}_V{#MyAppVersion}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={pf}\{#MyAppName}
|
||||
DisableProgramGroupPage=yes
|
||||
OutputBaseFilename={#MyAppName}V{#MyAppVersion}
|
||||
OutputDir=..\Publish
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
|
||||
[Languages]
|
||||
Name: "default"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "{#MyProgramPath}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
|
||||
|
||||
[Icons]
|
||||
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runascurrentuser
|
||||
|
||||
[Code]
|
||||
34
GrabBagPrj/pkg_calibview.bat
Normal file
34
GrabBagPrj/pkg_calibview.bat
Normal file
@ -0,0 +1,34 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set PRJ_PATH=c:\project\QT\GrabBag\GrabBagPrj
|
||||
|
||||
if not exist "%PRJ_PATH%\buildwin\CalibView" mkdir "%PRJ_PATH%\buildwin\CalibView"
|
||||
|
||||
cd /d "%PRJ_PATH%\buildwin\CalibView"
|
||||
|
||||
powershell -Command "Remove-Item * -Recurse -Force"
|
||||
|
||||
copy "..\..\build\Tools\CalibView\release\CalibView.exe" .\
|
||||
|
||||
:: VzNLSDK DLL
|
||||
copy "..\..\SDK\Device\VzNLSDK\Windows\x64\Release\VzKernel.dll" .\
|
||||
copy "..\..\SDK\Device\VzNLSDK\Windows\x64\Release\VzNLDetect.dll" .\
|
||||
copy "..\..\SDK\Device\VzNLSDK\Windows\x64\Release\VzNLGraphics.dll" .\
|
||||
copy "..\..\SDK\Device\VzNLSDK\Windows\x64\Release\VzLog.dll" .\
|
||||
copy "..\..\SDK\Device\VzNLSDK\Windows\x64\Release\libViEyeApi.dll" .\
|
||||
|
||||
:: OpenCV DLL
|
||||
copy "..\..\SDK\OpenCV320\Windows\vc14\Release\opencv_world320.dll" .\
|
||||
|
||||
"C:\tools\Qt\5.15.2\msvc2019_64\bin\windeployqt.exe" "CalibView.exe"
|
||||
|
||||
cd ..\..
|
||||
|
||||
set ISCC_PATH=C:\Program Files (x86)\Inno Setup 6\ISCC.exe
|
||||
|
||||
"%ISCC_PATH%" "CalibView.iss"
|
||||
|
||||
echo "finish"
|
||||
|
||||
endlocal
|
||||
@ -9,7 +9,7 @@ cd /d "%PRJ_PATH%\buildwin\CloudView"
|
||||
|
||||
powershell -Command "Remove-Item * -Recurse -Force"
|
||||
|
||||
copy "..\..\build\Tools\CloudView\release\CloudView.exe" .\
|
||||
copy "..\..\build\Utils\CloudView\release\CloudView.exe" .\
|
||||
|
||||
"C:\tools\Qt\5.15.2\msvc2019_64\bin\windeployqt.exe" "CloudView.exe"
|
||||
|
||||
|
||||
@ -1,200 +1,215 @@
|
||||
#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 标定数据输入控件
|
||||
* 支持 Eye-To-Hand、Eye-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;
|
||||
|
||||
/**
|
||||
* @brief 清除所有数据
|
||||
*/
|
||||
void clearAll();
|
||||
|
||||
/**
|
||||
* @brief 供外部设置机械臂数据到输入框(根据当前模式自动填充)
|
||||
*/
|
||||
void setRobotInput(double x, double y, double z, double rx, double ry, double rz);
|
||||
|
||||
/**
|
||||
* @brief 供外部设置相机数据到输入框(Eye-To-Hand 模式)
|
||||
*/
|
||||
void setCameraInput(double x, double y, double z, double rx, double ry, double rz);
|
||||
|
||||
/**
|
||||
* @brief 获取 TCP 标定输入数据
|
||||
*/
|
||||
HECTCPCalibData getTCPCalibData() const;
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief 标定模式改变信号
|
||||
*/
|
||||
void calibTypeChanged(HECCalibrationType type);
|
||||
|
||||
/**
|
||||
* @brief 请求 Eye-To-Hand 标定
|
||||
*/
|
||||
void requestEyeToHandCalib();
|
||||
|
||||
/**
|
||||
* @brief 请求 Eye-In-Hand 标定
|
||||
*/
|
||||
void requestEyeInHandCalib();
|
||||
|
||||
/**
|
||||
* @brief 请求 TCP 标定
|
||||
*/
|
||||
void requestTCPCalib();
|
||||
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* @brief 标定模式切换
|
||||
*/
|
||||
void onCalibTypeChanged(int index);
|
||||
|
||||
/**
|
||||
* @brief TCP 模式切换(3-DOF / 6-DOF)
|
||||
*/
|
||||
void onTCPModeChanged(int index);
|
||||
|
||||
/**
|
||||
* @brief TCP 添加行
|
||||
*/
|
||||
void onTCPAddRow();
|
||||
|
||||
/**
|
||||
* @brief TCP 删除行
|
||||
*/
|
||||
void onTCPRemoveRow();
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief 初始化界面
|
||||
*/
|
||||
void setupUI();
|
||||
|
||||
/**
|
||||
* @brief 创建 Eye-To-Hand 数据表格
|
||||
*/
|
||||
QWidget* createEyeToHandGroup();
|
||||
|
||||
/**
|
||||
* @brief 创建 Eye-In-Hand 数据表格
|
||||
*/
|
||||
QWidget* createEyeInHandGroup();
|
||||
|
||||
/**
|
||||
* @brief 创建 TCP 标定数据组
|
||||
*/
|
||||
QWidget* createTCPCalibGroup();
|
||||
|
||||
|
||||
/**
|
||||
* @brief 更新表格显示
|
||||
*/
|
||||
void updateTableVisibility();
|
||||
|
||||
// 标定模式选择
|
||||
QComboBox* m_cbCalibType;
|
||||
|
||||
// Eye-To-Hand 数据表格
|
||||
QTableWidget* m_tableEyeToHand;
|
||||
QWidget* m_groupEyeToHand;
|
||||
|
||||
// Eye-In-Hand 数据表格
|
||||
QTableWidget* m_tableEyeInHand;
|
||||
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
|
||||
#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 标定数据输入控件
|
||||
* 支持 Eye-To-Hand、Eye-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;
|
||||
|
||||
/**
|
||||
* @brief 获取当前标定模式索引 (0=EyeToHand, 1=EyeInHand, 2=TCP)
|
||||
*/
|
||||
int getCalibTypeIndex() const;
|
||||
|
||||
/**
|
||||
* @brief 清除所有数据
|
||||
*/
|
||||
void clearAll();
|
||||
|
||||
/**
|
||||
* @brief 供外部设置机械臂数据到输入框(根据当前模式自动填充)
|
||||
*/
|
||||
void setRobotInput(double x, double y, double z, double rx, double ry, double rz);
|
||||
|
||||
/**
|
||||
* @brief 供外部设置相机数据到输入框(Eye-To-Hand 模式)
|
||||
*/
|
||||
void setCameraInput(double x, double y, double z, double rx, double ry, double rz);
|
||||
|
||||
/**
|
||||
* @brief 获取 TCP 标定输入数据
|
||||
*/
|
||||
HECTCPCalibData getTCPCalibData() const;
|
||||
|
||||
/**
|
||||
* @brief 将当前模式的标定数据保存到 INI 文件
|
||||
*/
|
||||
void saveCalibData(const QString& filePath) const;
|
||||
|
||||
/**
|
||||
* @brief 从 INI 文件加载标定数据到表格
|
||||
*/
|
||||
void loadCalibData(const QString& filePath);
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief 标定模式改变信号
|
||||
*/
|
||||
void calibTypeChanged(HECCalibrationType type);
|
||||
|
||||
/**
|
||||
* @brief 请求 Eye-To-Hand 标定
|
||||
*/
|
||||
void requestEyeToHandCalib();
|
||||
|
||||
/**
|
||||
* @brief 请求 Eye-In-Hand 标定
|
||||
*/
|
||||
void requestEyeInHandCalib();
|
||||
|
||||
/**
|
||||
* @brief 请求 TCP 标定
|
||||
*/
|
||||
void requestTCPCalib();
|
||||
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* @brief 标定模式切换
|
||||
*/
|
||||
void onCalibTypeChanged(int index);
|
||||
|
||||
/**
|
||||
* @brief TCP 模式切换(3-DOF / 6-DOF)
|
||||
*/
|
||||
void onTCPModeChanged(int index);
|
||||
|
||||
/**
|
||||
* @brief TCP 添加行
|
||||
*/
|
||||
void onTCPAddRow();
|
||||
|
||||
/**
|
||||
* @brief TCP 删除行
|
||||
*/
|
||||
void onTCPRemoveRow();
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief 初始化界面
|
||||
*/
|
||||
void setupUI();
|
||||
|
||||
/**
|
||||
* @brief 创建 Eye-To-Hand 数据表格
|
||||
*/
|
||||
QWidget* createEyeToHandGroup();
|
||||
|
||||
/**
|
||||
* @brief 创建 Eye-In-Hand 数据表格
|
||||
*/
|
||||
QWidget* createEyeInHandGroup();
|
||||
|
||||
/**
|
||||
* @brief 创建 TCP 标定数据组
|
||||
*/
|
||||
QWidget* createTCPCalibGroup();
|
||||
|
||||
|
||||
/**
|
||||
* @brief 更新表格显示
|
||||
*/
|
||||
void updateTableVisibility();
|
||||
|
||||
// 标定模式选择
|
||||
QComboBox* m_cbCalibType;
|
||||
|
||||
// Eye-To-Hand 数据表格
|
||||
QTableWidget* m_tableEyeToHand;
|
||||
QWidget* m_groupEyeToHand;
|
||||
|
||||
// Eye-In-Hand 数据表格
|
||||
QTableWidget* m_tableEyeInHand;
|
||||
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
|
||||
|
||||
@ -1,162 +1,172 @@
|
||||
#ifndef CALIBVIEWMAINWINDOW_H
|
||||
#define CALIBVIEWMAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QStatusBar>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QComboBox>
|
||||
#include <QPushButton>
|
||||
#include <QTextEdit>
|
||||
#include <memory>
|
||||
|
||||
#include "IHandEyeCalib.h"
|
||||
|
||||
class CalibDataWidget;
|
||||
class CalibResultWidget;
|
||||
class MainWindow; // RobotView::MainWindow
|
||||
class VrEyeViewWidget;
|
||||
|
||||
/**
|
||||
* @brief 手眼标定测试工具主窗口
|
||||
* 用于测试 HandEyeCalib 模块的各项功能
|
||||
*/
|
||||
class CalibViewMainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CalibViewMainWindow(QWidget* parent = nullptr);
|
||||
~CalibViewMainWindow() override;
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief 标定完成信号
|
||||
*/
|
||||
void calibrationCompleted(const HECCalibResult& result);
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* @brief 执行 Eye-To-Hand 标定
|
||||
*/
|
||||
void onEyeToHandCalib();
|
||||
|
||||
/**
|
||||
* @brief 执行 Eye-In-Hand 标定
|
||||
*/
|
||||
void onEyeInHandCalib();
|
||||
|
||||
/**
|
||||
* @brief 执行坐标变换测试
|
||||
*/
|
||||
void onTransformTest();
|
||||
|
||||
/**
|
||||
* @brief 执行欧拉角转换测试
|
||||
*/
|
||||
void onEulerTest();
|
||||
|
||||
/**
|
||||
* @brief 执行 TCP 标定
|
||||
*/
|
||||
void onTCPCalib();
|
||||
|
||||
/**
|
||||
* @brief 清除所有数据
|
||||
*/
|
||||
void onClearAll();
|
||||
|
||||
/**
|
||||
* @brief 保存标定结果
|
||||
*/
|
||||
void onSaveResult();
|
||||
|
||||
/**
|
||||
* @brief 加载标定结果
|
||||
*/
|
||||
void onLoadResult();
|
||||
|
||||
/**
|
||||
* @brief 打开 RobotView 窗口
|
||||
*/
|
||||
void onOpenRobotView();
|
||||
|
||||
/**
|
||||
* @brief 接收 RobotView 的 TCP 位姿
|
||||
*/
|
||||
void onRobotTcpPoseReceived(double x, double y, double z,
|
||||
double rx, double ry, double rz);
|
||||
|
||||
/**
|
||||
* @brief 打开 VrEyeView 窗口
|
||||
*/
|
||||
void onOpenVrEyeView();
|
||||
|
||||
/**
|
||||
* @brief 接收 VrEyeView 的标定板检测结果
|
||||
*/
|
||||
void onChessboardDetected(double x, double y, double z,
|
||||
double rx, double ry, double rz);
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief 初始化界面
|
||||
*/
|
||||
void setupUI();
|
||||
|
||||
/**
|
||||
* @brief 创建菜单栏
|
||||
*/
|
||||
void createMenuBar();
|
||||
|
||||
/**
|
||||
* @brief 创建右侧面板
|
||||
*/
|
||||
QWidget* createRightPanel();
|
||||
|
||||
/**
|
||||
* @brief 更新状态栏
|
||||
*/
|
||||
void updateStatusBar(const QString& message);
|
||||
|
||||
/**
|
||||
* @brief 追加日志
|
||||
*/
|
||||
void appendLog(const QString& message);
|
||||
|
||||
// 标定实例
|
||||
IHandEyeCalib* m_calib;
|
||||
|
||||
// 数据输入控件
|
||||
CalibDataWidget* m_dataWidget;
|
||||
|
||||
// 结果显示控件
|
||||
CalibResultWidget* m_resultWidget;
|
||||
|
||||
// 右侧面板 - 坐标变换测试
|
||||
QDoubleSpinBox* m_sbTransformX;
|
||||
QDoubleSpinBox* m_sbTransformY;
|
||||
QDoubleSpinBox* m_sbTransformZ;
|
||||
QPushButton* m_btnTransform;
|
||||
|
||||
// 右侧面板 - 欧拉角转换测试
|
||||
QDoubleSpinBox* m_sbRoll;
|
||||
QDoubleSpinBox* m_sbPitch;
|
||||
QDoubleSpinBox* m_sbYaw;
|
||||
QComboBox* m_cbEulerOrder;
|
||||
QPushButton* m_btnEulerConvert;
|
||||
|
||||
// 右侧面板 - 日志
|
||||
QTextEdit* m_logEdit;
|
||||
|
||||
// 当前标定结果
|
||||
HECCalibResult m_currentResult;
|
||||
bool m_hasResult;
|
||||
|
||||
// RobotView 窗口实例
|
||||
MainWindow* m_robotView;
|
||||
|
||||
// VrEyeView 窗口实例
|
||||
VrEyeViewWidget* m_vrEyeView;
|
||||
};
|
||||
|
||||
#endif // CALIBVIEWMAINWINDOW_H
|
||||
#ifndef CALIBVIEWMAINWINDOW_H
|
||||
#define CALIBVIEWMAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QStatusBar>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QComboBox>
|
||||
#include <QPushButton>
|
||||
#include <QTextEdit>
|
||||
#include <memory>
|
||||
|
||||
#include "IHandEyeCalib.h"
|
||||
|
||||
class CalibDataWidget;
|
||||
class CalibResultWidget;
|
||||
class MainWindow; // RobotView::MainWindow
|
||||
class VrEyeViewWidget;
|
||||
|
||||
/**
|
||||
* @brief 手眼标定测试工具主窗口
|
||||
* 用于测试 HandEyeCalib 模块的各项功能
|
||||
*/
|
||||
class CalibViewMainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CalibViewMainWindow(QWidget* parent = nullptr);
|
||||
~CalibViewMainWindow() override;
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief 标定完成信号
|
||||
*/
|
||||
void calibrationCompleted(const HECCalibResult& result);
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* @brief 执行 Eye-To-Hand 标定
|
||||
*/
|
||||
void onEyeToHandCalib();
|
||||
|
||||
/**
|
||||
* @brief 执行 Eye-In-Hand 标定
|
||||
*/
|
||||
void onEyeInHandCalib();
|
||||
|
||||
/**
|
||||
* @brief 执行坐标变换测试
|
||||
*/
|
||||
void onTransformTest();
|
||||
|
||||
/**
|
||||
* @brief 执行欧拉角转换测试
|
||||
*/
|
||||
void onEulerTest();
|
||||
|
||||
/**
|
||||
* @brief 执行 TCP 标定
|
||||
*/
|
||||
void onTCPCalib();
|
||||
|
||||
/**
|
||||
* @brief 清除所有数据
|
||||
*/
|
||||
void onClearAll();
|
||||
|
||||
/**
|
||||
* @brief 保存标定结果
|
||||
*/
|
||||
void onSaveResult();
|
||||
|
||||
/**
|
||||
* @brief 加载标定结果
|
||||
*/
|
||||
void onLoadResult();
|
||||
|
||||
/**
|
||||
* @brief 保存标定数据(表格中的坐标数据)
|
||||
*/
|
||||
void onSaveCalibData();
|
||||
|
||||
/**
|
||||
* @brief 加载标定数据(表格中的坐标数据)
|
||||
*/
|
||||
void onLoadCalibData();
|
||||
|
||||
/**
|
||||
* @brief 打开 RobotView 窗口
|
||||
*/
|
||||
void onOpenRobotView();
|
||||
|
||||
/**
|
||||
* @brief 接收 RobotView 的 TCP 位姿
|
||||
*/
|
||||
void onRobotTcpPoseReceived(double x, double y, double z,
|
||||
double rx, double ry, double rz);
|
||||
|
||||
/**
|
||||
* @brief 打开 VrEyeView 窗口
|
||||
*/
|
||||
void onOpenVrEyeView();
|
||||
|
||||
/**
|
||||
* @brief 接收 VrEyeView 的标定板检测结果
|
||||
*/
|
||||
void onChessboardDetected(double x, double y, double z,
|
||||
double rx, double ry, double rz);
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief 初始化界面
|
||||
*/
|
||||
void setupUI();
|
||||
|
||||
/**
|
||||
* @brief 创建菜单栏
|
||||
*/
|
||||
void createMenuBar();
|
||||
|
||||
/**
|
||||
* @brief 创建右侧面板
|
||||
*/
|
||||
QWidget* createRightPanel();
|
||||
|
||||
/**
|
||||
* @brief 更新状态栏
|
||||
*/
|
||||
void updateStatusBar(const QString& message);
|
||||
|
||||
/**
|
||||
* @brief 追加日志
|
||||
*/
|
||||
void appendLog(const QString& message);
|
||||
|
||||
// 标定实例
|
||||
IHandEyeCalib* m_calib;
|
||||
|
||||
// 数据输入控件
|
||||
CalibDataWidget* m_dataWidget;
|
||||
|
||||
// 结果显示控件
|
||||
CalibResultWidget* m_resultWidget;
|
||||
|
||||
// 右侧面板 - 坐标变换测试
|
||||
QDoubleSpinBox* m_sbTransformX;
|
||||
QDoubleSpinBox* m_sbTransformY;
|
||||
QDoubleSpinBox* m_sbTransformZ;
|
||||
QPushButton* m_btnTransform;
|
||||
|
||||
// 右侧面板 - 欧拉角转换测试
|
||||
QDoubleSpinBox* m_sbRoll;
|
||||
QDoubleSpinBox* m_sbPitch;
|
||||
QDoubleSpinBox* m_sbYaw;
|
||||
QComboBox* m_cbEulerOrder;
|
||||
QPushButton* m_btnEulerConvert;
|
||||
|
||||
// 右侧面板 - 日志
|
||||
QTextEdit* m_logEdit;
|
||||
|
||||
// 当前标定结果
|
||||
HECCalibResult m_currentResult;
|
||||
bool m_hasResult;
|
||||
|
||||
// RobotView 窗口实例
|
||||
MainWindow* m_robotView;
|
||||
|
||||
// VrEyeView 窗口实例
|
||||
VrEyeViewWidget* m_vrEyeView;
|
||||
};
|
||||
|
||||
#endif // CALIBVIEWMAINWINDOW_H
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2
Utils
2
Utils
@ -1 +1 @@
|
||||
Subproject commit 7071da62403ea703981ffe77fff948266b66fdf3
|
||||
Subproject commit 8c8dd5a5a26a316dbcd523eddfb8bd56727c62d2
|
||||
Loading…
x
Reference in New Issue
Block a user