2013-12-11 00:12:44 +00:00
|
|
|
/*
|
2014-08-11 17:00:55 +00:00
|
|
|
Copyright (c) 2010-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
|
* Redistributions of source code must retain the above copyright
|
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
|
* Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
documentation and/or other materials provided with the distribution.
|
|
|
|
|
* Neither the name of the Universite de Sherbrooke nor the
|
|
|
|
|
names of its contributors may be used to endorse or promote products
|
|
|
|
|
derived from this software without specific prior written permission.
|
|
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
|
|
|
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
*/
|
2013-12-11 00:12:44 +00:00
|
|
|
|
|
|
|
|
#ifndef ODOMETRYVIEWER_H_
|
|
|
|
|
#define ODOMETRYVIEWER_H_
|
|
|
|
|
|
|
|
|
|
#include "rtabmap/gui/RtabmapGuiExp.h" // DLL export/import defines
|
|
|
|
|
|
2015-05-29 14:46:48 -04:00
|
|
|
#include "rtabmap/core/OdometryEvent.h"
|
2016-05-31 19:09:49 -04:00
|
|
|
#include "rtabmap/core/Parameters.h"
|
2015-04-06 13:35:44 -04:00
|
|
|
#include <QDialog>
|
2013-12-11 00:12:44 +00:00
|
|
|
#include "rtabmap/utilite/UEventsHandler.h"
|
2015-04-06 13:35:44 -04:00
|
|
|
|
|
|
|
|
class QSpinBox;
|
|
|
|
|
class QDoubleSpinBox;
|
2015-04-23 22:01:41 -04:00
|
|
|
class QLabel;
|
2016-03-11 16:54:54 -05:00
|
|
|
class QCheckBox;
|
2013-12-11 00:12:44 +00:00
|
|
|
|
|
|
|
|
namespace rtabmap {
|
|
|
|
|
|
2015-04-06 13:35:44 -04:00
|
|
|
class ImageView;
|
|
|
|
|
class CloudViewer;
|
|
|
|
|
|
|
|
|
|
class RTABMAPGUI_EXP OdometryViewer : public QDialog, public UEventsHandler
|
2013-12-11 00:12:44 +00:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2016-05-31 19:09:49 -04:00
|
|
|
OdometryViewer(
|
|
|
|
|
int maxClouds = 10,
|
|
|
|
|
int decimation = 2,
|
|
|
|
|
float voxelSize = 0.0f,
|
|
|
|
|
float maxDepth = 0,
|
|
|
|
|
int qualityWarningThr=0,
|
|
|
|
|
QWidget * parent = 0,
|
|
|
|
|
const ParametersMap & parameters = ParametersMap());
|
2015-04-06 13:35:44 -04:00
|
|
|
virtual ~OdometryViewer();
|
2013-12-11 00:12:44 +00:00
|
|
|
|
2014-10-02 19:33:51 +00:00
|
|
|
public slots:
|
|
|
|
|
virtual void clear();
|
|
|
|
|
|
2013-12-11 00:12:44 +00:00
|
|
|
protected:
|
|
|
|
|
virtual void handleEvent(UEvent * event);
|
|
|
|
|
|
|
|
|
|
private slots:
|
2015-06-26 18:21:32 -04:00
|
|
|
void reset();
|
2015-05-29 14:46:48 -04:00
|
|
|
void processData(const rtabmap::OdometryEvent & odom);
|
2013-12-11 00:12:44 +00:00
|
|
|
|
|
|
|
|
private:
|
2015-04-06 13:35:44 -04:00
|
|
|
ImageView* imageView_;
|
|
|
|
|
CloudViewer* cloudView_;
|
|
|
|
|
bool processingData_;
|
|
|
|
|
bool odomImageShow_;
|
|
|
|
|
bool odomImageDepthShow_;
|
|
|
|
|
|
2014-06-22 03:33:56 +00:00
|
|
|
Transform lastOdomPose_;
|
2014-06-06 18:06:49 +00:00
|
|
|
int qualityWarningThr_;
|
2013-12-11 00:12:44 +00:00
|
|
|
int id_;
|
2015-04-06 14:32:32 -04:00
|
|
|
QList<std::string> addedClouds_;
|
2015-04-06 13:35:44 -04:00
|
|
|
|
|
|
|
|
QSpinBox * maxCloudsSpin_;
|
|
|
|
|
QDoubleSpinBox * voxelSpin_;
|
|
|
|
|
QSpinBox * decimationSpin_;
|
2015-06-11 16:57:16 -04:00
|
|
|
QDoubleSpinBox * maxDepthSpin_;
|
2016-03-11 16:54:54 -05:00
|
|
|
QCheckBox * cloudShown_;
|
|
|
|
|
QCheckBox * scanShown_;
|
|
|
|
|
QCheckBox * featuresShown_;
|
2015-04-23 22:01:41 -04:00
|
|
|
QLabel * timeLabel_;
|
2015-04-06 13:35:44 -04:00
|
|
|
int validDecimationValue_;
|
2016-05-31 19:09:49 -04:00
|
|
|
ParametersMap parameters_;
|
2013-12-11 00:12:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} /* namespace rtabmap */
|
|
|
|
|
#endif /* ODOMETRYVIEWER_H_ */
|