30 #include <RobotAPI/interface/units/KinematicUnitInterface.h>
34 #include <VisionX/gui-plugins/LookAtClick/ui_LookAtClickWidget.h>
80 void loadSettings(QSettings* settings)
override;
85 void saveSettings(QSettings* settings)
override;
93 return "RobotControl.LookAtClick";
99 void onInitImageProcessor()
override;
104 void onConnectImageProcessor()
override;
107 QPointer<QDialog> getConfigDialog(QWidget* parent)
override;
108 void configured()
override;
111 void timerEvent(QTimerEvent*);
115 void clickedAt(
const QPoint& point);
122 void autoDetectRobotSpecificVariables();
123 void refreshWidgetData(
float* factorPitch,
float* factorYaw);
124 void determineNewAngles(
const QPoint& offset,
NameValueMap&
jointAngles, NameControlModeMap& jointModes,
float factorPitch,
float factorYaw);
129 Ui::LookAtClickWidget widget;
135 std::string _pitchJointName;
136 std::string _yawJointName;
138 QPointer<SimpleConfigDialog> _dialog;
140 KinematicUnitInterfacePrx kinematicUnitInterfacePrx;
141 std::string _robotStateUnitComponentName;
142 std::string _kinematicUnitInterfaceName;
143 visionx::ImageProviderInterfacePrx _imageProvider;
144 std::string _imageProviderName;
146 std::atomic_int _imageIndex{0};
147 std::atomic_int _numberOfImages{1};
149 std::vector<visionx::CByteImageUPtr> _providerImagesOwner;
150 std::vector<void*> _providerImages;
152 QImage _currentImage;
153 std::mutex _currentImageMutex;
154 std::atomic_bool _currentImageDirty{
false};