25 #include <RobotComponents/gui-plugins/LaserScannerSelfLocalisation/ui_LaserScannerSelfLocalisationWidget.h>
27 #include <RobotComponents/interface/components/LaserScannerSelfLocalisation.h>
33 #include <ArmarXCore/interface/core/ArmarXManagerInterface.h>
37 #include <Eigen/Eigen>
59 public armarx::LaserScannerSelfLocalisationListener
77 void loadSettings(QSettings* settings)
override;
82 void saveSettings(QSettings* settings)
override;
90 return "RobotControl.LaserScannerSelfLocalisation";
96 void onInitComponent()
override;
101 void onConnectComponent()
override;
103 QPointer<QDialog> getConfigDialog(QWidget* parent)
override;
105 void configured()
override;
107 void onPaintCanvas(QPainter& painter, QSize size);
114 void reportLaserScanPoints(
const Vector2fSeq& globalPoints,
const Ice::Current&)
override;
115 void reportExtractedEdges(
const LineSegment2DSeq&,
const Ice::Current&)
override;
118 void onSpinBoxChanged(
int value);
119 void onSpinBoxChanged(
double value);
120 void onNewDataReported();
121 void onSetPoseClick();
122 void onCanvasClick(QPoint p);
126 void newDataReported();
129 void updateProperties();
130 void readProperties();
132 enum class SetPoseState
142 void timerEvent(QTimerEvent* event)
override;
145 Ui::LaserScannerSelfLocalisationWidget widget;
146 QPointer<SimpleConfigDialog> dialog;
147 QPainterWidget* painterWidget;
150 std::string localisationName;
151 LaserScannerSelfLocalisationInterfacePrx localisation;
152 ArmarXManagerInterfacePrx localisationManager;
153 Ice::PropertiesAdminPrx localisationAdmin;
154 LineSegment2DSeq map;
156 std::atomic<float> poseX;
157 std::atomic<float> poseY;
158 std::atomic<float> poseTheta;
160 std::atomic<float> poseUncertaintyX;
161 std::atomic<float> poseUncertaintyY;
162 std::atomic<float> poseUncertaintyTheta;
167 LineSegment2DSeq edges;
169 std::vector<QLine> lines;
170 std::vector<QPoint> qpoints;
171 std::vector<QLine> qedges;
173 SetPoseState setPoseState;
175 QPoint setOrientation;