Commit ec603647 authored by LM's avatar LM

Merge branch 'master' of github.com:mavlink/qgroundcontrol

parents 8547fa05 998e753c
...@@ -78,52 +78,25 @@ Done. ...@@ -78,52 +78,25 @@ Done.
Windows Windows
======= =======
DETAILED STEPS BELOW THE VISUAL STUDIO 2010 NOTES.
GNU GCC / MINGW IS UNTESTED, COULD WORK GNU GCC / MINGW IS UNTESTED, COULD WORK
VISUAL STUDIO 2008 / 2010 EXPRESS EDITION IS FREE! VISUAL STUDIO 2008 / 2010 EXPRESS EDITION IS FREE!
------------------------------------------------------------------------------------- Steps for Visual Studio 2008 / 2010:
VISUAL STUDIO 2010 NOTES (VS 2008 runs out-of-the-box, just follow the steps below):
For use of Qt 4x with Visual Studio 2010 Add-in.
Visual studio adds automatically certain defines that are wrong and cause errors.
To resolve this, execute these steps:
In the projects properties -> C/C++ ->preprocessor change:
in DEBUG:
delete QT_NO_DEBUG
in both (DEBUG / RELEASE):
delete QT_NO_DYNAMIC_CAST
-------------------------------------------------------------------------------------
Steps for Visual Studio 2008 / 2010. (VS 2008 is easier, VS 2010 only recommended for
expert developers)
Windows XP/7: Windows XP/7:
1) Download and install the Qt SDK for Windows from http://qt.nokia.com/downloads/ (Visual Studio 2008 version) OR download Qt source and compile with VS 2010 1) Download and install the Qt libraries for Windows from https://qt.nokia.com/downloads/ (the Visual Studio 2008 or 2010 version as appropriate)
2) Download and install Visual Studio 2008 Express Edition (free) OR VS 2010 Express Edition
3) Go to the QGroundControl folder and then to thirdParty -> libxbee
4) Build the library. See win32.README 2) Download and install Visual Studio 2008 or 2010 Express Edition (free) from https://www.microsoft.com/visualstudio
5) Go to the source folder of QGroundControl with the Qt 4.7.x Command Prompt tool (from the applications menu) 3) Go to the QGroundControl folder and then to thirdParty/libxbee and build it following the instructions in win32.README
6) Create the Visual Studio project by typing: 4) Open the Qt Command Prompt program (should be in the Start Menu), navigate to the source folder of QGroundControl and create the Visual Studio project by typing:
qmake -tp vc qgroundcontrol.pro `qmake -tp vc qgroundcontrol.pro`
7) Now start Visual Studio and load the qgroundcontrol.vcproj file 5) Now start Visual Studio and load the qgroundcontrol.vcproj if using Visual Studio 2008 or qgroundcontrol.vcxproj if using Visual Studio 2010
8) Compile and edit in Visual Studio. If you need to add new files, add them to qgroundcontrol.pro and re-run "quake -tp vc qgroundcontrol.pro" 6) Compile and edit in Visual Studio. If you need to add new files, add them to qgroundcontrol.pro and re-run `qmake -tp vc qgroundcontrol.pro`
For use of qt 4x and visual studio2010 and add in.
The Visual studio adds automatically certain defines
In the projects properties -> C/C++ ->preprocessor change:
in DEBUG:
delete QT_NO_DEBUG
Both:
delete QT_NO_DYNAMIC_CAST
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
# #
#------------------------------------------------- #-------------------------------------------------
QT += network \ QT += network \
phonon \ phonon \
testlib \ testlib \
svg svg
TEMPLATE = app TEMPLATE = app
...@@ -99,49 +99,46 @@ INCLUDEPATH += . \ ...@@ -99,49 +99,46 @@ INCLUDEPATH += . \
$$BASEDIR/src/ui/ \ $$BASEDIR/src/ui/ \
SOURCES += src/uas/UAS.cc \ SOURCES += src/uas/UAS.cc \
src/comm/MAVLinkProtocol.cc \ src/comm/MAVLinkProtocol.cc \
src/uas/UASWaypointManager.cc \ src/uas/UASWaypointManager.cc \
src/Waypoint.cc \ src/Waypoint.cc \
src/ui/RadioCalibration/RadioCalibrationData.cc \ src/ui/RadioCalibration/RadioCalibrationData.cc \
src/uas/SlugsMAV.cc \ src/uas/SlugsMAV.cc \
src/uas/PxQuadMAV.cc \ src/uas/PxQuadMAV.cc \
src/uas/ArduPilotMegaMAV.cc \ src/uas/ArduPilotMegaMAV.cc \
src/GAudioOutput.cc \ src/GAudioOutput.cc \
src/uas/UASManager.cc \ src/uas/UASManager.cc \
src/comm/LinkManager.cc \ src/comm/LinkManager.cc \
src/QGC.cc \ src/QGC.cc \
src/comm/SerialLink.cc \ src/comm/SerialLink.cc \
$$TESTDIR/SlugsMavUnitTest.cc \ $$TESTDIR/SlugsMavUnitTest.cc \
$$TESTDIR/testSuite.cc \ $$TESTDIR/testSuite.cc \
$$TESTDIR/UASUnitTest.cc \ $$TESTDIR/UASUnitTest.cc \
src/uas/QGCMAVLinkUASFactory.cc src/uas/QGCMAVLinkUASFactory.cc
HEADERS += src/uas/UASInterface.h \ HEADERS += src/uas/UASInterface.h \
src/uas/UAS.h \ src/uas/UAS.h \
src/comm/MAVLinkProtocol.h \ src/comm/MAVLinkProtocol.h \
src/comm/ProtocolInterface.h \ src/comm/ProtocolInterface.h \
src/uas/UASWaypointManager.h \ src/uas/UASWaypointManager.h \
src/Waypoint.h \ src/Waypoint.h \
src/ui/RadioCalibration/RadioCalibrationData.h \ src/ui/RadioCalibration/RadioCalibrationData.h \
src/uas/SlugsMAV.h \ src/uas/SlugsMAV.h \
src/uas/PxQuadMAV.h \ src/uas/PxQuadMAV.h \
src/uas/ArduPilotMegaMAV.h \ src/uas/ArduPilotMegaMAV.h \
src/GAudioOutput.h \ src/GAudioOutput.h \
src/uas/UASManager.h \ src/uas/UASManager.h \
src/comm/LinkManager.h \ src/comm/LinkManager.h \
src/comm/LinkInterface.h \ src/comm/LinkInterface.h \
src/QGC.h \ src/QGC.h \
src/comm/SerialLinkInterface.h \ src/comm/SerialLinkInterface.h \
src/comm/SerialLink.h \ src/comm/SerialLink.h \
$$TESTDIR//SlugsMavUnitTest.h \ $$TESTDIR//SlugsMavUnitTest.h \
$$TESTDIR/AutoTest.h \ $$TESTDIR/AutoTest.h \
$$TESTDIR/UASUnitTest.h \ $$TESTDIR/UASUnitTest.h \
src/uas/QGCMAVLinkUASFactory.h src/uas/QGCMAVLinkUASFactory.h
DEFINES += SRCDIR=\\\"$$PWD/\\\" DEFINES += SRCDIR=\\\"$$PWD/\\\"
This diff is collapsed.
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
# Qt configuration # Qt configuration
CONFIG += qt \ CONFIG += qt \
thread thread
QT += network \ QT += network \
opengl \ opengl \
svg \ svg \
...@@ -33,14 +33,14 @@ TEMPLATE = app ...@@ -33,14 +33,14 @@ TEMPLATE = app
TARGET = qgroundcontrol TARGET = qgroundcontrol
BASEDIR = $${IN_PWD} BASEDIR = $${IN_PWD}
linux-g++|linux-g++-64{ linux-g++|linux-g++-64{
debug { debug {
TARGETDIR = $${OUT_PWD}/debug TARGETDIR = $${OUT_PWD}/debug
BUILDDIR = $${OUT_PWD}/build-debug BUILDDIR = $${OUT_PWD}/build-debug
} }
release { release {
TARGETDIR = $${OUT_PWD}/release TARGETDIR = $${OUT_PWD}/release
BUILDDIR = $${OUT_PWD}/build-release BUILDDIR = $${OUT_PWD}/build-release
} }
} else { } else {
TARGETDIR = $${OUT_PWD} TARGETDIR = $${OUT_PWD}
BUILDDIR = $${OUT_PWD}/build BUILDDIR = $${OUT_PWD}/build
...@@ -55,12 +55,12 @@ MAVLINKPATH = $$BASEDIR/thirdParty/mavlink/include ...@@ -55,12 +55,12 @@ MAVLINKPATH = $$BASEDIR/thirdParty/mavlink/include
DEFINES += MAVLINK_NO_DATA DEFINES += MAVLINK_NO_DATA
win32 { win32 {
QMAKE_INCDIR_QT = $$(QTDIR)/include QMAKE_INCDIR_QT = $$(QTDIR)/include
QMAKE_LIBDIR_QT = $$(QTDIR)/lib QMAKE_LIBDIR_QT = $$(QTDIR)/lib
QMAKE_UIC = "$$(QTDIR)/bin/uic.exe" QMAKE_UIC = "$$(QTDIR)/bin/uic.exe"
QMAKE_MOC = "$$(QTDIR)/bin/moc.exe" QMAKE_MOC = "$$(QTDIR)/bin/moc.exe"
QMAKE_RCC = "$$(QTDIR)/bin/rcc.exe" QMAKE_RCC = "$$(QTDIR)/bin/rcc.exe"
QMAKE_QMAKE = "$$(QTDIR)/bin/qmake.exe" QMAKE_QMAKE = "$$(QTDIR)/bin/qmake.exe"
} }
...@@ -391,14 +391,15 @@ contains(DEPENDENCIES_PRESENT, osg) { ...@@ -391,14 +391,15 @@ contains(DEPENDENCIES_PRESENT, osg) {
src/ui/map3D/Imagery.h \ src/ui/map3D/Imagery.h \
src/ui/map3D/HUDScaleGeode.h \ src/ui/map3D/HUDScaleGeode.h \
src/ui/map3D/WaypointGroupNode.h \ src/ui/map3D/WaypointGroupNode.h \
src/ui/map3D/TerrainParamDialog.h src/ui/map3D/TerrainParamDialog.h
} }
contains(DEPENDENCIES_PRESENT, protobuf):contains(MAVLINK_CONF, pixhawk) { contains(DEPENDENCIES_PRESENT, protobuf):contains(MAVLINK_CONF, pixhawk) {
message("Including headers for Protocol Buffers") message("Including headers for Protocol Buffers")
# Enable only if protobuf is available # Enable only if protobuf is available
HEADERS += thirdParty/mavlink/include/pixhawk/pixhawk.pb.h \ HEADERS += thirdParty/mavlink/include/pixhawk/pixhawk.pb.h \
src/ui/map3D/ObstacleGroupNode.h src/ui/map3D/ObstacleGroupNode.h \
src/ui/map3D/GLOverlayGeode.h
} }
contains(DEPENDENCIES_PRESENT, libfreenect) { contains(DEPENDENCIES_PRESENT, libfreenect) {
message("Including headers for libfreenect") message("Including headers for libfreenect")
...@@ -534,7 +535,8 @@ contains(DEPENDENCIES_PRESENT, osg) { ...@@ -534,7 +535,8 @@ contains(DEPENDENCIES_PRESENT, osg) {
src/ui/map3D/Imagery.cc \ src/ui/map3D/Imagery.cc \
src/ui/map3D/HUDScaleGeode.cc \ src/ui/map3D/HUDScaleGeode.cc \
src/ui/map3D/WaypointGroupNode.cc \ src/ui/map3D/WaypointGroupNode.cc \
src/ui/map3D/TerrainParamDialog.cc src/ui/map3D/TerrainParamDialog.cc
contains(DEPENDENCIES_PRESENT, osgearth) { contains(DEPENDENCIES_PRESENT, osgearth) {
message("Including sources for osgEarth") message("Including sources for osgEarth")
...@@ -547,7 +549,8 @@ contains(DEPENDENCIES_PRESENT, protobuf):contains(MAVLINK_CONF, pixhawk) { ...@@ -547,7 +549,8 @@ contains(DEPENDENCIES_PRESENT, protobuf):contains(MAVLINK_CONF, pixhawk) {
# Enable only if protobuf is available # Enable only if protobuf is available
SOURCES += thirdParty/mavlink/src/pixhawk/pixhawk.pb.cc \ SOURCES += thirdParty/mavlink/src/pixhawk/pixhawk.pb.cc \
src/ui/map3D/ObstacleGroupNode.cc src/ui/map3D/ObstacleGroupNode.cc \
src/ui/map3D/GLOverlayGeode.cc
} }
contains(DEPENDENCIES_PRESENT, libfreenect) { contains(DEPENDENCIES_PRESENT, libfreenect) {
message("Including sources for libfreenect") message("Including sources for libfreenect")
...@@ -585,19 +588,18 @@ TRANSLATIONS += es-MX.ts \ ...@@ -585,19 +588,18 @@ TRANSLATIONS += es-MX.ts \
# xbee support # xbee support
# libxbee only supported by linux and windows systems # libxbee only supported by linux and windows systems
win32-msvc2008|win32-msvc2010|linux{ win32-msvc2008|win32-msvc2010|linux {
HEADERS += src/comm/XbeeLinkInterface.h \ HEADERS += src/comm/XbeeLinkInterface.h \
src/comm/XbeeLink.h \ src/comm/XbeeLink.h \
src/comm/HexSpinBox.h \ src/comm/HexSpinBox.h \
src/ui/XbeeConfigurationWindow.h \ src/ui/XbeeConfigurationWindow.h \
src/comm/CallConv.h src/comm/CallConv.h
SOURCES += src/comm/XbeeLink.cpp \ SOURCES += src/comm/XbeeLink.cpp \
src/comm/HexSpinBox.cpp \ src/comm/HexSpinBox.cpp \
src/ui/XbeeConfigurationWindow.cpp src/ui/XbeeConfigurationWindow.cpp
DEFINES += XBEELINK DEFINES += XBEELINK
INCLUDEPATH += thirdParty/libxbee INCLUDEPATH += thirdParty/libxbee
# TO DO: build library when it does not exists already # TO DO: build library when it does not exist already
LIBS += -LthirdParty/libxbee/lib \ LIBS += -LthirdParty/libxbee/lib \
-llibxbee -llibxbee
}
} \ No newline at end of file
...@@ -79,10 +79,11 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(), ...@@ -79,10 +79,11 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
yaw(0.0), yaw(0.0),
statusTimeout(new QTimer(this)), statusTimeout(new QTimer(this)),
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES) #if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
receivedPointCloudTimestamp(0.0), receivedOverlayTimestamp(0.0),
receivedRGBDImageTimestamp(0.0),
receivedObstacleListTimestamp(0.0), receivedObstacleListTimestamp(0.0),
receivedPathTimestamp(0.0), receivedPathTimestamp(0.0),
receivedPointCloudTimestamp(0.0),
receivedRGBDImageTimestamp(0.0),
#endif #endif
paramsOnceRequested(false), paramsOnceRequested(false),
airframe(QGC_AIRFRAME_EASYSTAR), airframe(QGC_AIRFRAME_EASYSTAR),
...@@ -1146,21 +1147,13 @@ void UAS::receiveExtendedMessage(LinkInterface* link, std::tr1::shared_ptr<googl ...@@ -1146,21 +1147,13 @@ void UAS::receiveExtendedMessage(LinkInterface* link, std::tr1::shared_ptr<googl
} }
#ifdef QGC_USE_PIXHAWK_MESSAGES #ifdef QGC_USE_PIXHAWK_MESSAGES
if (message->GetTypeName() == pointCloud.GetTypeName()) if (message->GetTypeName() == overlay.GetTypeName())
{ {
receivedPointCloudTimestamp = QGC::groundTimeSeconds(); receivedOverlayTimestamp = QGC::groundTimeSeconds();
pointCloudMutex.lock(); overlayMutex.lock();
pointCloud.CopyFrom(*message); overlay.CopyFrom(*message);
pointCloudMutex.unlock(); overlayMutex.unlock();
emit pointCloudChanged(this); emit overlayChanged(this);
}
else if (message->GetTypeName() == rgbdImage.GetTypeName())
{
receivedRGBDImageTimestamp = QGC::groundTimeSeconds();
rgbdImageMutex.lock();
rgbdImage.CopyFrom(*message);
rgbdImageMutex.unlock();
emit rgbdImageChanged(this);
} }
else if (message->GetTypeName() == obstacleList.GetTypeName()) else if (message->GetTypeName() == obstacleList.GetTypeName())
{ {
...@@ -1178,6 +1171,22 @@ void UAS::receiveExtendedMessage(LinkInterface* link, std::tr1::shared_ptr<googl ...@@ -1178,6 +1171,22 @@ void UAS::receiveExtendedMessage(LinkInterface* link, std::tr1::shared_ptr<googl
pathMutex.unlock(); pathMutex.unlock();
emit pathChanged(this); emit pathChanged(this);
} }
else if (message->GetTypeName() == pointCloud.GetTypeName())
{
receivedPointCloudTimestamp = QGC::groundTimeSeconds();
pointCloudMutex.lock();
pointCloud.CopyFrom(*message);
pointCloudMutex.unlock();
emit pointCloudChanged(this);
}
else if (message->GetTypeName() == rgbdImage.GetTypeName())
{
receivedRGBDImageTimestamp = QGC::groundTimeSeconds();
rgbdImageMutex.lock();
rgbdImage.CopyFrom(*message);
rgbdImageMutex.unlock();
emit rgbdImageChanged(this);
}
#endif #endif
} }
...@@ -2350,9 +2359,7 @@ void UAS::shutdown() ...@@ -2350,9 +2359,7 @@ void UAS::shutdown()
void UAS::setTargetPosition(float x, float y, float z, float yaw) void UAS::setTargetPosition(float x, float y, float z, float yaw)
{ {
mavlink_message_t msg; mavlink_message_t msg;
mavlink_msg_command_long_pack(mavlink->getSystemId(), mavlink->getComponentId(), &msg, uasId, MAV_COMP_ID_ALL, MAV_CMD_NAV_PATHPLANNING, 1, 1, 0, 0, yaw, x, y, z); mavlink_msg_command_long_pack(mavlink->getSystemId(), mavlink->getComponentId(), &msg, uasId, MAV_COMP_ID_ALL, MAV_CMD_NAV_PATHPLANNING, 1, 1, 1, 0, yaw, x, y, z);
sendMessage(msg);
mavlink_msg_command_long_pack(mavlink->getSystemId(), mavlink->getComponentId(), &msg, uasId, MAV_COMP_ID_ALL, MAV_CMD_NAV_PATHPLANNING, 1, 0, 1, 0, yaw, x, y, z);
sendMessage(msg); sendMessage(msg);
} }
......
...@@ -137,26 +137,15 @@ public: ...@@ -137,26 +137,15 @@ public:
bool getSelected() const; bool getSelected() const;
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES) #if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
px::PointCloudXYZRGB getPointCloud() { px::GLOverlay getOverlay() {
QMutexLocker locker(&pointCloudMutex); QMutexLocker locker(&overlayMutex);
return pointCloud; return overlay;
} }
px::PointCloudXYZRGB getPointCloud(qreal& receivedTimestamp) { px::GLOverlay getOverlay(qreal& receivedTimestamp) {
receivedTimestamp = receivedPointCloudTimestamp; receivedTimestamp = receivedOverlayTimestamp;
QMutexLocker locker(&pointCloudMutex); QMutexLocker locker(&overlayMutex);
return pointCloud; return overlay;
}
px::RGBDImage getRGBDImage() {
QMutexLocker locker(&rgbdImageMutex);
return rgbdImage;
}
px::RGBDImage getRGBDImage(qreal& receivedTimestamp) {
receivedTimestamp = receivedRGBDImageTimestamp;
QMutexLocker locker(&rgbdImageMutex);
return rgbdImage;
} }
px::ObstacleList getObstacleList() { px::ObstacleList getObstacleList() {
...@@ -180,6 +169,28 @@ public: ...@@ -180,6 +169,28 @@ public:
QMutexLocker locker(&pathMutex); QMutexLocker locker(&pathMutex);
return path; return path;
} }
px::PointCloudXYZRGB getPointCloud() {
QMutexLocker locker(&pointCloudMutex);
return pointCloud;
}
px::PointCloudXYZRGB getPointCloud(qreal& receivedTimestamp) {
receivedTimestamp = receivedPointCloudTimestamp;
QMutexLocker locker(&pointCloudMutex);
return pointCloud;
}
px::RGBDImage getRGBDImage() {
QMutexLocker locker(&rgbdImageMutex);
return rgbdImage;
}
px::RGBDImage getRGBDImage(qreal& receivedTimestamp) {
receivedTimestamp = receivedRGBDImageTimestamp;
QMutexLocker locker(&rgbdImageMutex);
return rgbdImage;
}
#endif #endif
friend class UASWaypointManager; friend class UASWaypointManager;
...@@ -270,13 +281,9 @@ protected: //COMMENTS FOR TEST UNIT ...@@ -270,13 +281,9 @@ protected: //COMMENTS FOR TEST UNIT
quint64 imageStart; quint64 imageStart;
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES) #if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
px::PointCloudXYZRGB pointCloud; px::GLOverlay overlay;
QMutex pointCloudMutex; QMutex overlayMutex;
qreal receivedPointCloudTimestamp; qreal receivedOverlayTimestamp;
px::RGBDImage rgbdImage;
QMutex rgbdImageMutex;
qreal receivedRGBDImageTimestamp;
px::ObstacleList obstacleList; px::ObstacleList obstacleList;
QMutex obstacleListMutex; QMutex obstacleListMutex;
...@@ -285,6 +292,14 @@ protected: //COMMENTS FOR TEST UNIT ...@@ -285,6 +292,14 @@ protected: //COMMENTS FOR TEST UNIT
px::Path path; px::Path path;
QMutex pathMutex; QMutex pathMutex;
qreal receivedPathTimestamp; qreal receivedPathTimestamp;
px::PointCloudXYZRGB pointCloud;
QMutex pointCloudMutex;
qreal receivedPointCloudTimestamp;
px::RGBDImage rgbdImage;
QMutex rgbdImageMutex;
qreal receivedRGBDImageTimestamp;
#endif #endif
QMap<int, QMap<QString, QVariant>* > parameters; ///< All parameters QMap<int, QMap<QString, QVariant>* > parameters; ///< All parameters
...@@ -616,16 +631,6 @@ signals: ...@@ -616,16 +631,6 @@ signals:
void imageStarted(quint64 timestamp); void imageStarted(quint64 timestamp);
/** @brief A new camera image has arrived */ /** @brief A new camera image has arrived */
void imageReady(UASInterface* uas); void imageReady(UASInterface* uas);
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
/** @brief Point cloud data has been changed */
void pointCloudChanged(UASInterface* uas);
/** @brief RGBD image data has been changed */
void rgbdImageChanged(UASInterface* uas);
/** @brief Obstacle list data has been changed */
void obstacleListChanged(UASInterface* uas);
/** @brief Path data has been changed */
void pathChanged(UASInterface* uas);
#endif
/** @brief HIL controls have changed */ /** @brief HIL controls have changed */
void hilControlsChanged(uint64_t time, float rollAilerons, float pitchElevator, float yawRudder, float throttle, uint8_t systemMode, uint8_t navMode); void hilControlsChanged(uint64_t time, float rollAilerons, float pitchElevator, float yawRudder, float throttle, uint8_t systemMode, uint8_t navMode);
......
...@@ -97,14 +97,16 @@ public: ...@@ -97,14 +97,16 @@ public:
virtual bool getSelected() const = 0; virtual bool getSelected() const = 0;
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES) #if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
virtual px::PointCloudXYZRGB getPointCloud() = 0; virtual px::GLOverlay getOverlay() = 0;
virtual px::PointCloudXYZRGB getPointCloud(qreal& receivedTimestamp) = 0; virtual px::GLOverlay getOverlay(qreal& receivedTimestamp) = 0;
virtual px::RGBDImage getRGBDImage() = 0;
virtual px::RGBDImage getRGBDImage(qreal& receivedTimestamp) = 0;
virtual px::ObstacleList getObstacleList() = 0; virtual px::ObstacleList getObstacleList() = 0;
virtual px::ObstacleList getObstacleList(qreal& receivedTimestamp) = 0; virtual px::ObstacleList getObstacleList(qreal& receivedTimestamp) = 0;
virtual px::Path getPath() = 0; virtual px::Path getPath() = 0;
virtual px::Path getPath(qreal& receivedTimestamp) = 0; virtual px::Path getPath(qreal& receivedTimestamp) = 0;
virtual px::PointCloudXYZRGB getPointCloud() = 0;
virtual px::PointCloudXYZRGB getPointCloud(qreal& receivedTimestamp) = 0;
virtual px::RGBDImage getRGBDImage() = 0;
virtual px::RGBDImage getRGBDImage(qreal& receivedTimestamp) = 0;
#endif #endif
virtual bool isArmed() const = 0; virtual bool isArmed() const = 0;
...@@ -489,6 +491,19 @@ signals: ...@@ -489,6 +491,19 @@ signals:
/** @brief Radio Calibration Data has been received from the MAV*/ /** @brief Radio Calibration Data has been received from the MAV*/
void radioCalibrationReceived(const QPointer<RadioCalibrationData>&); void radioCalibrationReceived(const QPointer<RadioCalibrationData>&);
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
/** @brief Overlay data has been changed */
void overlayChanged(UASInterface* uas);
/** @brief Obstacle list data has been changed */
void obstacleListChanged(UASInterface* uas);
/** @brief Path data has been changed */
void pathChanged(UASInterface* uas);
/** @brief Point cloud data has been changed */
void pointCloudChanged(UASInterface* uas);
/** @brief RGBD image data has been changed */
void rgbdImageChanged(UASInterface* uas);
#endif
/** /**
* @brief Localization quality changed * @brief Localization quality changed
* @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization * @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization
......
This diff is collapsed.
#ifndef GLOVERLAYGEODE_H
#define GLOVERLAYGEODE_H
#include <mavlink_protobuf_manager.hpp>
#include <osg/Geode>
#include <QtGlobal>
class GLOverlayGeode : public osg::Geode
{
public:
GLOverlayGeode();
void setOverlay(px::GLOverlay& overlay);
px::GLOverlay::CoordinateFrameType coordinateFrameType(void) const;
void setMessageTimestamp(qreal timestamp);
qreal messageTimestamp(void) const;
private:
class GLOverlayDrawable : public osg::Drawable
{
public:
GLOverlayDrawable();
GLOverlayDrawable(const GLOverlayDrawable& drawable,
const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
void setOverlay(px::GLOverlay& overlay);
META_Object(GLOverlayDrawableApp, GLOverlayDrawable)
virtual void drawImplementation(osg::RenderInfo&) const;
virtual osg::BoundingBox computeBound() const;
private:
float getFloatValue(const std::string& data, size_t& mark) const;
px::GLOverlay mOverlay;
osg::BoundingBox mBBox;
};
osg::ref_ptr<GLOverlayDrawable> mDrawable;
px::GLOverlay::CoordinateFrameType mCoordinateFrameType;
qreal mMessageTimestamp;
};
#endif // GLOVERLAYGEODE_H
...@@ -139,6 +139,10 @@ Pixhawk3DWidget::systemCreated(UASInterface *uas) ...@@ -139,6 +139,10 @@ Pixhawk3DWidget::systemCreated(UASInterface *uas)
this, SLOT(attitudeChanged(UASInterface*,double,double,double,quint64))); this, SLOT(attitudeChanged(UASInterface*,double,double,double,quint64)));
connect(uas, SIGNAL(userPositionSetPointsChanged(int,float,float,float,float)), connect(uas, SIGNAL(userPositionSetPointsChanged(int,float,float,float,float)),
this, SLOT(setpointChanged(int,float,float,float,float))); this, SLOT(setpointChanged(int,float,float,float,float)));
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
connect(uas, SIGNAL(overlayChanged(UASInterface*)),
this, SLOT(addOverlay(UASInterface*)));
#endif
initializeSystem(systemId, uas->getColor()); initializeSystem(systemId, uas->getColor());
...@@ -546,6 +550,43 @@ Pixhawk3DWidget::loadTerrainModel(void) ...@@ -546,6 +550,43 @@ Pixhawk3DWidget::loadTerrainModel(void)
} }
} }
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
void
Pixhawk3DWidget::addOverlay(UASInterface *uas)
{
int systemId = uas->getUASID();
if (!mSystemContainerMap.contains(systemId))
{
return;
}
SystemContainer& systemData = mSystemContainerMap[systemId];
qreal receivedTimestamp;
px::GLOverlay overlay = uas->getOverlay(receivedTimestamp);
QString overlayName = QString::fromStdString(overlay.name());
osg::ref_ptr<SystemGroupNode>& systemNode = m3DWidget->systemGroup(systemId);
if (!systemData.overlayNodeMap().contains(overlayName))
{
osg::ref_ptr<GLOverlayGeode> overlayNode = new GLOverlayGeode;
systemData.overlayNodeMap().insert(overlayName, overlayNode);
systemNode->allocentricMap()->addChild(overlayNode, false);
systemNode->rollingMap()->addChild(overlayNode, false);
emit overlayCreatedSignal(systemId, overlayName);
}
osg::ref_ptr<GLOverlayGeode>& overlayNode = systemData.overlayNodeMap()[overlayName];
overlayNode->setOverlay(overlay);
overlayNode->setMessageTimestamp(receivedTimestamp);
}
#endif
void void
Pixhawk3DWidget::selectTargetHeading(void) Pixhawk3DWidget::selectTargetHeading(void)
{ {
...@@ -904,6 +945,30 @@ Pixhawk3DWidget::update(void) ...@@ -904,6 +945,30 @@ Pixhawk3DWidget::update(void)
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES) #if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
rollingMap->setChildValue(systemData.obstacleGroupNode(), rollingMap->setChildValue(systemData.obstacleGroupNode(),
systemViewParams->displayObstacleList()); systemViewParams->displayObstacleList());
QMutableMapIterator<QString, osg::ref_ptr<GLOverlayGeode> > itOverlay(systemData.overlayNodeMap());
while (itOverlay.hasNext())
{
itOverlay.next();
osg::ref_ptr<GLOverlayGeode>& overlayNode = itOverlay.value();
bool displayOverlay = systemViewParams->displayOverlay().value(itOverlay.key());
bool visible;
visible = (overlayNode->coordinateFrameType() == px::GLOverlay::GLOBAL) &&
displayOverlay &&
(QGC::groundTimeSeconds() - overlayNode->messageTimestamp() < kMessageTimeout);
allocentricMap->setChildValue(overlayNode, visible);
visible = (overlayNode->coordinateFrameType() == px::GLOverlay::LOCAL) &&
displayOverlay &&
(QGC::groundTimeSeconds() - overlayNode->messageTimestamp() < kMessageTimeout);;
rollingMap->setChildValue(overlayNode, visible);
}
rollingMap->setChildValue(systemData.plannedPathNode(), rollingMap->setChildValue(systemData.plannedPathNode(),
systemViewParams->displayPlannedPath()); systemViewParams->displayPlannedPath());
......
...@@ -64,6 +64,7 @@ public slots: ...@@ -64,6 +64,7 @@ public slots:
signals: signals:
void systemCreatedSignal(UASInterface* uas); void systemCreatedSignal(UASInterface* uas);
void overlayCreatedSignal(int systemId, const QString& name);
private slots: private slots:
void clearData(void); void clearData(void);
...@@ -75,6 +76,10 @@ private slots: ...@@ -75,6 +76,10 @@ private slots:
void setBirdEyeView(void); void setBirdEyeView(void);
void loadTerrainModel(void); void loadTerrainModel(void);
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
void addOverlay(UASInterface* uas);
#endif
void selectTargetHeading(void); void selectTargetHeading(void);
void selectTarget(void); void selectTarget(void);
void setTarget(void); void setTarget(void);
......
...@@ -99,6 +99,12 @@ SystemContainer::obstacleGroupNode(void) ...@@ -99,6 +99,12 @@ SystemContainer::obstacleGroupNode(void)
return mObstacleGroupNode; return mObstacleGroupNode;
} }
QMap<QString,osg::ref_ptr<GLOverlayGeode> >&
SystemContainer::overlayNodeMap(void)
{
return mOverlayNodeMap;
}
osg::ref_ptr<osg::Geode>& osg::ref_ptr<osg::Geode>&
SystemContainer::plannedPathNode(void) SystemContainer::plannedPathNode(void)
{ {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "WaypointGroupNode.h" #include "WaypointGroupNode.h"
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES) #if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
#include "GLOverlayGeode.h"
#include "ObstacleGroupNode.h" #include "ObstacleGroupNode.h"
#endif #endif
...@@ -37,6 +38,7 @@ public: ...@@ -37,6 +38,7 @@ public:
osg::ref_ptr<WaypointGroupNode>& waypointGroupNode(void); osg::ref_ptr<WaypointGroupNode>& waypointGroupNode(void);
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES) #if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
osg::ref_ptr<ObstacleGroupNode>& obstacleGroupNode(void); osg::ref_ptr<ObstacleGroupNode>& obstacleGroupNode(void);
QMap<QString,osg::ref_ptr<GLOverlayGeode> >& overlayNodeMap(void);
osg::ref_ptr<osg::Geode>& plannedPathNode(void); osg::ref_ptr<osg::Geode>& plannedPathNode(void);
#endif #endif
...@@ -62,6 +64,7 @@ private: ...@@ -62,6 +64,7 @@ private:
osg::ref_ptr<WaypointGroupNode> mWaypointGroupNode; osg::ref_ptr<WaypointGroupNode> mWaypointGroupNode;
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES) #if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
osg::ref_ptr<ObstacleGroupNode> mObstacleGroupNode; osg::ref_ptr<ObstacleGroupNode> mObstacleGroupNode;
QMap<QString,osg::ref_ptr<GLOverlayGeode> > mOverlayNodeMap;
osg::ref_ptr<osg::Geode> mPlannedPathNode; osg::ref_ptr<osg::Geode> mPlannedPathNode;
#endif #endif
}; };
......
...@@ -54,6 +54,18 @@ SystemViewParams::displayObstacleList(void) const ...@@ -54,6 +54,18 @@ SystemViewParams::displayObstacleList(void) const
return mDisplayObstacleList; return mDisplayObstacleList;
} }
QMap<QString,bool>&
SystemViewParams::displayOverlay(void)
{
return mDisplayOverlay;
}
QMap<QString,bool>
SystemViewParams::displayOverlay(void) const
{
return mDisplayOverlay;
}
bool& bool&
SystemViewParams::displayPlannedPath(void) SystemViewParams::displayPlannedPath(void)
{ {
...@@ -227,6 +239,17 @@ SystemViewParams::toggleObstacleList(int state) ...@@ -227,6 +239,17 @@ SystemViewParams::toggleObstacleList(int state)
} }
} }
void
SystemViewParams::toggleOverlay(const QString& name)
{
if (!mDisplayOverlay.contains(name))
{
return;
}
mDisplayOverlay[name] = !mDisplayOverlay[name];
}
void void
SystemViewParams::togglePlannedPath(int state) SystemViewParams::togglePlannedPath(int state)
{ {
......
#ifndef SYSTEMVIEWPARAMS_H #ifndef SYSTEMVIEWPARAMS_H
#define SYSTEMVIEWPARAMS_H #define SYSTEMVIEWPARAMS_H
#include <QMap>
#include <QObject> #include <QObject>
#include <QSharedPointer> #include <QSharedPointer>
#include <QVector> #include <QVector>
...@@ -21,6 +22,9 @@ public: ...@@ -21,6 +22,9 @@ public:
bool& displayObstacleList(void); bool& displayObstacleList(void);
bool displayObstacleList(void) const; bool displayObstacleList(void) const;
QMap<QString,bool>& displayOverlay(void);
QMap<QString,bool> displayOverlay(void) const;
bool& displayPlannedPath(void); bool& displayPlannedPath(void);
bool displayPlannedPath(void) const; bool displayPlannedPath(void) const;
...@@ -57,6 +61,7 @@ public slots: ...@@ -57,6 +61,7 @@ public slots:
void toggleColorPointCloud(int state); void toggleColorPointCloud(int state);
void toggleLocalGrid(int state); void toggleLocalGrid(int state);
void toggleObstacleList(int state); void toggleObstacleList(int state);
void toggleOverlay(const QString& name);
void togglePlannedPath(int state); void togglePlannedPath(int state);
void togglePointCloud(int state); void togglePointCloud(int state);
void toggleRGBD(int state); void toggleRGBD(int state);
...@@ -74,6 +79,7 @@ private: ...@@ -74,6 +79,7 @@ private:
bool mColorPointCloudByDistance; bool mColorPointCloudByDistance;
bool mDisplayLocalGrid; bool mDisplayLocalGrid;
bool mDisplayObstacleList; bool mDisplayObstacleList;
QMap<QString,bool> mDisplayOverlay;
bool mDisplayPlannedPath; bool mDisplayPlannedPath;
bool mDisplayPointCloud; bool mDisplayPointCloud;
bool mDisplayRGBD; bool mDisplayRGBD;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include <osg/LineWidth> #include <osg/LineWidth>
#include <QCheckBox> #include <QCheckBox>
#include <QFormLayout> #include <QGroupBox>
#include <QLabel> #include <QLabel>
#include <QPushButton> #include <QPushButton>
...@@ -28,8 +28,13 @@ ViewParamWidget::ViewParamWidget(GlobalViewParamsPtr& globalViewParams, ...@@ -28,8 +28,13 @@ ViewParamWidget::ViewParamWidget(GlobalViewParamsPtr& globalViewParams,
mTabWidget->setFocusPolicy(Qt::NoFocus); mTabWidget->setFocusPolicy(Qt::NoFocus);
mOverlaySignalMapper = new QSignalMapper(this);
connect(parent, SIGNAL(systemCreatedSignal(UASInterface*)), connect(parent, SIGNAL(systemCreatedSignal(UASInterface*)),
this, SLOT(systemCreated(UASInterface*))); this, SLOT(systemCreated(UASInterface*)));
connect(parent, SIGNAL(overlayCreatedSignal(int,QString)),
this, SLOT(overlayCreated(int,QString)));
} }
void void
...@@ -47,6 +52,28 @@ ViewParamWidget::setFollowCameraId(int id) ...@@ -47,6 +52,28 @@ ViewParamWidget::setFollowCameraId(int id)
mFollowCameraComboBox->setCurrentIndex(0); mFollowCameraComboBox->setCurrentIndex(0);
} }
void
ViewParamWidget::overlayCreated(int systemId, const QString& name)
{
if (!mOverlayLayout.contains(systemId))
{
return;
}
SystemViewParamsPtr systemViewParams = mSystemViewParamMap[systemId];
systemViewParams->displayOverlay().insert(name, true);
QCheckBox* checkbox = new QCheckBox(this);
checkbox->setChecked(systemViewParams->displayOverlay().value(name));
mOverlayLayout[systemId]->addRow(name, checkbox);
mOverlaySignalMapper->setMapping(checkbox, name);
connect(checkbox, SIGNAL(clicked()),
mOverlaySignalMapper, SLOT(map()));
connect(mOverlaySignalMapper, SIGNAL(mapped(QString)),
systemViewParams.data(), SLOT(toggleOverlay(QString)));
}
void void
ViewParamWidget::systemCreated(UASInterface *uas) ViewParamWidget::systemCreated(UASInterface *uas)
{ {
...@@ -173,6 +200,10 @@ ViewParamWidget::addTab(int systemId) ...@@ -173,6 +200,10 @@ ViewParamWidget::addTab(int systemId)
QCheckBox* waypointsCheckBox = new QCheckBox(this); QCheckBox* waypointsCheckBox = new QCheckBox(this);
waypointsCheckBox->setChecked(systemViewParams->displayWaypoints()); waypointsCheckBox->setChecked(systemViewParams->displayWaypoints());
QGroupBox* overlayGroupBox = new QGroupBox(tr("Overlays"), this);
mOverlayLayout[systemId] = new QFormLayout;
overlayGroupBox->setLayout(mOverlayLayout[systemId]);
QFormLayout* formLayout = new QFormLayout; QFormLayout* formLayout = new QFormLayout;
page->setLayout(formLayout); page->setLayout(formLayout);
...@@ -188,6 +219,7 @@ ViewParamWidget::addTab(int systemId) ...@@ -188,6 +219,7 @@ ViewParamWidget::addTab(int systemId)
formLayout->addRow(tr("Target"), targetCheckBox); formLayout->addRow(tr("Target"), targetCheckBox);
formLayout->addRow(tr("Trails"), trailsCheckBox); formLayout->addRow(tr("Trails"), trailsCheckBox);
formLayout->addRow(tr("Waypoints"), waypointsCheckBox); formLayout->addRow(tr("Waypoints"), waypointsCheckBox);
formLayout->addRow(overlayGroupBox);
QString label("MAV "); QString label("MAV ");
label += QString::number(systemId); label += QString::number(systemId);
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
#include <QComboBox> #include <QComboBox>
#include <QDockWidget> #include <QDockWidget>
#include <QFormLayout>
#include <QSignalMapper>
#include <QSpinBox> #include <QSpinBox>
#include <QTabWidget> #include <QTabWidget>
#include <QVBoxLayout> #include <QVBoxLayout>
...@@ -26,6 +28,7 @@ public: ...@@ -26,6 +28,7 @@ public:
signals: signals:
private slots: private slots:
void overlayCreated(int systemId, const QString& name);
void systemCreated(UASInterface* uas); void systemCreated(UASInterface* uas);
void setpointsCheckBoxToggled(int state); void setpointsCheckBoxToggled(int state);
...@@ -43,7 +46,10 @@ private: ...@@ -43,7 +46,10 @@ private:
// child widgets // child widgets
QComboBox* mFollowCameraComboBox; QComboBox* mFollowCameraComboBox;
QSpinBox* mSetpointHistoryLengthSpinBox; QSpinBox* mSetpointHistoryLengthSpinBox;
QMap<int, QFormLayout*> mOverlayLayout;
QTabWidget* mTabWidget; QTabWidget* mTabWidget;
QSignalMapper* mOverlaySignalMapper;
}; };
#endif // VIEWPARAMWIDGET_H #endif // VIEWPARAMWIDGET_H
...@@ -24,40 +24,46 @@ public: ...@@ -24,40 +24,46 @@ public:
, kExtendedHeaderSize(MAVLINK_EXTENDED_HEADER_LEN) , kExtendedHeaderSize(MAVLINK_EXTENDED_HEADER_LEN)
, kExtendedPayloadMaxSize(MAVLINK_MAX_EXTENDED_PAYLOAD_LEN) , kExtendedPayloadMaxSize(MAVLINK_MAX_EXTENDED_PAYLOAD_LEN)
{ {
// register PointCloudXYZI // register GLOverlay
{ {
std::tr1::shared_ptr<px::PointCloudXYZI> msg(new px::PointCloudXYZI); std::tr1::shared_ptr<px::GLOverlay> msg(new px::GLOverlay);
registerType(msg); registerType(msg);
} }
// register PointCloudXYZRGB // register ObstacleList
{ {
std::tr1::shared_ptr<px::PointCloudXYZRGB> msg(new px::PointCloudXYZRGB); std::tr1::shared_ptr<px::ObstacleList> msg(new px::ObstacleList);
registerType(msg); registerType(msg);
} }
// register RGBDImage // register ObstacleMap
{ {
std::tr1::shared_ptr<px::RGBDImage> msg(new px::RGBDImage); std::tr1::shared_ptr<px::ObstacleMap> msg(new px::ObstacleMap);
registerType(msg); registerType(msg);
} }
// register ObstacleList // register Path
{ {
std::tr1::shared_ptr<px::ObstacleList> msg(new px::ObstacleList); std::tr1::shared_ptr<px::Path> msg(new px::Path);
registerType(msg);
}
// register PointCloudXYZI
{
std::tr1::shared_ptr<px::PointCloudXYZI> msg(new px::PointCloudXYZI);
registerType(msg); registerType(msg);
} }
// register ObstacleMap // register PointCloudXYZRGB
{ {
std::tr1::shared_ptr<px::ObstacleMap> msg(new px::ObstacleMap); std::tr1::shared_ptr<px::PointCloudXYZRGB> msg(new px::PointCloudXYZRGB);
registerType(msg); registerType(msg);
} }
// register Path // register RGBDImage
{ {
std::tr1::shared_ptr<px::Path> msg(new px::Path); std::tr1::shared_ptr<px::RGBDImage> msg(new px::RGBDImage);
registerType(msg); registerType(msg);
} }
srand(time(NULL)); srand(time(NULL));
......
package px; package px;
message HeaderInfo { message HeaderInfo
{
required int32 source_sysid = 1; required int32 source_sysid = 1;
required int32 source_compid = 2; required int32 source_compid = 2;
required double timestamp = 3; // in seconds required double timestamp = 3; // in seconds
} }
message GLOverlay
{
required HeaderInfo header = 1;
optional string name = 2;
enum CoordinateFrameType
{
GLOBAL = 0;
LOCAL = 1;
}
optional CoordinateFrameType coordinateFrameType = 3;
optional double origin_x = 4;
optional double origin_y = 5;
optional double origin_z = 6;
optional bytes data = 7;
enum Mode
{
POINTS = 0;
LINES = 1;
LINE_STRIP = 2;
LINE_LOOP = 3;
TRIANGLES = 4;
TRIANGLE_STRIP = 5;
TRIANGLE_FAN = 6;
QUADS = 7;
QUAD_STRIP = 8;
POLYGON = 9;
SOLID_CIRCLE = 10;
WIRE_CIRCLE = 11;
SOLID_CUBE = 12;
WIRE_CUBE = 13;
}
enum Identifier
{
END = 14;
VERTEX2F = 15;
VERTEX3F = 16;
ROTATEF = 17;
TRANSLATEF = 18;
SCALEF = 19;
PUSH_MATRIX = 20;
POP_MATRIX = 21;
COLOR3F = 22;
COLOR4F = 23;
POINTSIZE = 24;
LINEWIDTH = 25;
}
}
message Obstacle
{
optional float x = 1;
optional float y = 2;
optional float z = 3;
optional float length = 4;
optional float width = 5;
optional float height = 6;
}
message ObstacleList
{
required HeaderInfo header = 1;
repeated Obstacle obstacles = 2;
}
message ObstacleMap
{
required HeaderInfo header = 1;
required int32 type = 2;
optional float resolution = 3;
optional int32 rows = 4;
optional int32 cols = 5;
optional int32 mapR0 = 6;
optional int32 mapC0 = 7;
optional int32 arrayR0 = 8;
optional int32 arrayC0 = 9;
optional bytes data = 10;
}
message Path
{
required HeaderInfo header = 1;
repeated Waypoint waypoints = 2;
}
message PointCloudXYZI { message PointCloudXYZI {
message PointXYZI { message PointXYZI {
required float x = 1; required float x = 1;
...@@ -34,16 +130,16 @@ message RGBDImage ...@@ -34,16 +130,16 @@ message RGBDImage
{ {
required HeaderInfo header = 1; required HeaderInfo header = 1;
required uint32 cols = 2; ///< Number of columns in image(s) required uint32 cols = 2; ///< Number of columns in image(s)
required uint32 rows = 3; ///< Number of rows in image(s) required uint32 rows = 3; ///< Number of rows in image(s)
required uint32 step1 = 4; ///< Step (stride) of image 1 required uint32 step1 = 4; ///< Step (stride) of image 1
required uint32 type1 = 5; ///< Type of image 1 required uint32 type1 = 5; ///< Type of image 1
required bytes imageData1 = 6; required bytes imageData1 = 6;
required uint32 step2 = 7; ///< Step (stride) of image 2 required uint32 step2 = 7; ///< Step (stride) of image 2
required uint32 type2 = 8; ///< Type of image 2 required uint32 type2 = 8; ///< Type of image 2
required bytes imageData2 = 9; required bytes imageData2 = 9;
optional uint32 camera_config = 10; ///< PxSHM::Camera enumeration optional uint32 camera_config = 10; ///< PxSHM::Camera enumeration
optional uint32 camera_type = 11; ///< PxSHM::CameraType enumeration optional uint32 camera_type = 11; ///< PxSHM::CameraType enumeration
optional float roll = 12; optional float roll = 12;
optional float pitch = 13; optional float pitch = 13;
optional float yaw = 14; optional float yaw = 14;
...@@ -56,40 +152,6 @@ message RGBDImage ...@@ -56,40 +152,6 @@ message RGBDImage
repeated float camera_matrix = 21; repeated float camera_matrix = 21;
} }
message Obstacle
{
optional float x = 1;
optional float y = 2;
optional float z = 3;
optional float length = 4;
optional float width = 5;
optional float height = 6;
}
message ObstacleList
{
required HeaderInfo header = 1;
repeated Obstacle obstacles = 2;
}
message ObstacleMap
{
required HeaderInfo header = 1;
required int32 type = 2;
optional float resolution = 3;
optional int32 rows = 4;
optional int32 cols = 5;
optional int32 mapR0 = 6;
optional int32 mapC0 = 7;
optional int32 arrayR0 = 8;
optional int32 arrayC0 = 9;
optional bytes data = 10;
}
message Waypoint message Waypoint
{ {
required double x = 1; required double x = 1;
...@@ -99,10 +161,3 @@ message Waypoint ...@@ -99,10 +161,3 @@ message Waypoint
optional double pitch = 5; optional double pitch = 5;
optional double yaw = 6; optional double yaw = 6;
} }
message Path
{
required HeaderInfo header = 1;
repeated Waypoint waypoints = 2;
}
<?xml version='1.0'?>
<mavlink>
<include>common.xml</include>
<enums>
<enum name="SENSESOAR_MODE">
<description> Different flight modes </description>
<entry name="SENSESOAR_MODE_GLIDING"> Gliding mode with motors off</entry>
<entry name="SENSESOAR_MODE_AUTONOMOUS"> Autonomous flight</entry>
<entry name="SENSESOAR_MODE_MANUAL"> RC controlled</entry>
</enum>
</enums>
<messages>
<message id="170" name="OBS_POSITION">
Position estimate of the observer in global frame
<field type="int32_t" name="lon">Longitude expressed in 1E7</field>
<field type="int32_t" name="lat">Latitude expressed in 1E7</field>
<field type="int32_t" name="alt">Altitude expressed in milimeters</field>
</message>
<message id="172" name="OBS_VELOCITY">
velocity estimate of the observer in NED inertial frame
<field type="float[3]" name="vel">Velocity</field>
</message>
<message id="174" name="OBS_ATTITUDE">
attitude estimate of the observer
<field type="double[4]" name="quat">Quaternion re;im</field>
</message>
<message id="176" name="OBS_WIND">
Wind estimate in NED inertial frame
<field type="float[3]" name="wind">Wind</field>
</message>
<message id="178" name="OBS_AIR_VELOCITY">
Estimate of the air velocity
<field type="float" name="magnitude">Air speed</field>
<field type="float" name="aoa">angle of attack</field>
<field type="float" name="slip">slip angle</field>
</message>
<message id="180" name="OBS_BIAS">
IMU biases
<field type="float[3]" name="accBias">accelerometer bias</field>
<field type="float[3]" name="gyroBias">gyroscope bias</field>
</message>
<message id="182" name="OBS_QFF">
estimate of the pressure at sea level
<field type="float" name="qff">Wind</field>
</message>
<message id="183" name="OBS_AIR_TEMP">
ambient air temperature
<field type="float" name="airT">Air Temperatur</field>
</message>
<message id="184" name="FILT_ROT_VEL">
filtered rotational velocity
<field type="float[3]" name="rotVel">rotational velocity</field>
</message>
<message id="186" name="LLC_OUT">
low level control output
<field type="int16_t[4]" name="servoOut">Servo signal</field>
<field type="int16_t[2]" name="MotorOut">motor signal</field>
</message>
<message id="188" name="PM_ELEC">
Power managment
<field type="float" name="PwCons">current power consumption</field>
<field type="float" name="BatStat">battery status</field>
<field type="float[3]" name="PwGen">Power generation from each module</field>
</message>
<message id="190" name="SYS_Stat">
system status
<field type="uint8_t" name="gps">gps status</field>
<field type="uint8_t" name="act">actuator status</field>
<field type="uint8_t" name="mod">module status</field>
<field type="uint8_t" name="commRssi">module status</field>
</message>
<message id="192" name="CMD_AIRSPEED_CHNG">
change commanded air speed
<field type="uint8_t" name="target">Target ID</field>
<field type="float" name="spCmd">commanded airspeed</field>
</message>
<message id="194" name="CMD_AIRSPEED_ACK">
accept change of airspeed
<field type="float" name="spCmd">commanded airspeed</field>
<field type="uint8_t" name="ack">0:ack, 1:nack</field>
</message>
</messages>
</mavlink>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment