Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
2430ec45
Commit
2430ec45
authored
Aug 26, 2020
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Plain Diff
merged with phil
parents
0e34b591
1081ec45
Changes
69
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
69 changed files
with
3488 additions
and
2989 deletions
+3488
-2989
AppImageCommitHash
deploy/AppImageCommitHash
+0
-1
QGroundControl.AppImage
deploy/QGroundControl.AppImage
+0
-0
appImageCommand.txt
deploy/appImageCommand.txt
+1
-1
create_linux_appimage.sh
deploy/create_linux_appimage.sh
+6
-6
qgroundcontrol.pro
qgroundcontrol.pro
+37
-21
Wima.SettingsGroup.json
src/Settings/Wima.SettingsGroup.json
+6
-0
WimaSettings.cc
src/Settings/WimaSettings.cc
+1
-0
WimaSettings.h
src/Settings/WimaSettings.h
+1
-0
GeoPoint3D.cpp
src/Wima/Geometry/GeoPoint3D.cpp
+7
-12
GeoPoint3D.h
src/Wima/Geometry/GeoPoint3D.h
+11
-17
Polygon2D.h
src/Wima/Geometry/Polygon2D.h
+8
-19
PolygonArray.h
src/Wima/Geometry/PolygonArray.h
+3
-6
WimaPolygonArray.h
src/Wima/Geometry/WimaPolygonArray.h
+7
-15
PolygonArray.h
src/Wima/Snake/PolygonArray.h
+1
-3
QNemoHeartbeat.h
src/Wima/Snake/QNemoHeartbeat.h
+2
-2
QNemoProgress.h
src/Wima/Snake/QNemoProgress.h
+4
-6
QtROSJsonFactory.h
src/Wima/Snake/QtROSJsonFactory.h
+0
-5
QtROSTypeFactory.h
src/Wima/Snake/QtROSTypeFactory.h
+0
-5
WimaController.cc
src/Wima/WimaController.cc
+283
-126
WimaController.h
src/Wima/WimaController.h
+11
-13
CasePacker.h
src/comm/ros_bridge/include/CasePacker.h
+0
-54
ComPrivateInclude.cpp
src/comm/ros_bridge/include/ComPrivateInclude.cpp
+0
-13
GenericMessages.h
src/comm/ros_bridge/include/GenericMessages.h
+0
-371
JsonFactory.h
src/comm/ros_bridge/include/JsonFactory.h
+0
-238
JsonMethodes.h
src/comm/ros_bridge/include/JsonMethodes.h
+0
-695
MessageBaseClass.h
src/comm/ros_bridge/include/MessageBaseClass.h
+0
-30
MessageGroups.h
src/comm/ros_bridge/include/MessageGroups.h
+0
-158
MessageTag.cpp
src/comm/ros_bridge/include/MessageTag.cpp
+0
-43
MessageTag.h
src/comm/ros_bridge/include/MessageTag.h
+0
-24
RosBridgeClient.cpp
src/comm/ros_bridge/include/RosBridgeClient.cpp
+970
-0
RosBridgeClient.h
src/comm/ros_bridge/include/RosBridgeClient.h
+150
-467
ThreadSafeQueue.h
src/comm/ros_bridge/include/ThreadSafeQueue.h
+0
-79
TopicPublisher.cpp
src/comm/ros_bridge/include/TopicPublisher.cpp
+0
-109
TopicSubscriber.cpp
src/comm/ros_bridge/include/TopicSubscriber.cpp
+0
-136
TypeFactory.h
src/comm/ros_bridge/include/TypeFactory.h
+0
-137
com_private.cpp
src/comm/ros_bridge/include/com_private.cpp
+53
-0
com_private.h
src/comm/ros_bridge/include/com_private.h
+9
-5
message_traits.h
src/comm/ros_bridge/include/message_traits.h
+15
-1
geopoint.cpp
.../ros_bridge/include/messages/geographic_msgs/geopoint.cpp
+5
-0
geopoint.h
...mm/ros_bridge/include/messages/geographic_msgs/geopoint.h
+149
-0
point32.cpp
...omm/ros_bridge/include/messages/geometry_msgs/point32.cpp
+6
-0
point32.h
src/comm/ros_bridge/include/messages/geometry_msgs/point32.h
+139
-0
polygon.cpp
...omm/ros_bridge/include/messages/geometry_msgs/polygon.cpp
+6
-0
polygon.h
src/comm/ros_bridge/include/messages/geometry_msgs/polygon.h
+91
-0
polygon_stamped.cpp
...bridge/include/messages/geometry_msgs/polygon_stamped.cpp
+6
-0
polygon_stamped.h
...s_bridge/include/messages/geometry_msgs/polygon_stamped.h
+172
-0
polygon_array.cpp
...e/include/messages/jsk_recognition_msgs/polygon_array.cpp
+6
-0
polygon_array.h
...dge/include/messages/jsk_recognition_msgs/polygon_array.h
+328
-0
heartbeat.cpp
src/comm/ros_bridge/include/messages/nemo_msgs/heartbeat.cpp
+6
-0
heartbeat.h
src/comm/ros_bridge/include/messages/nemo_msgs/heartbeat.h
+53
-0
progress.cpp
src/comm/ros_bridge/include/messages/nemo_msgs/progress.cpp
+6
-0
progress.h
src/comm/ros_bridge/include/messages/nemo_msgs/progress.h
+67
-0
header.cpp
src/comm/ros_bridge/include/messages/std_msgs/header.cpp
+69
-0
header.h
src/comm/ros_bridge/include/messages/std_msgs/header.h
+102
-0
time.cpp
src/comm/ros_bridge/include/messages/std_msgs/time.cpp
+5
-0
time.h
src/comm/ros_bridge/include/messages/std_msgs/time.h
+65
-0
ros_bridge.h
src/comm/ros_bridge/include/ros_bridge.h
+49
-0
server.cpp
src/comm/ros_bridge/include/server.cpp
+99
-0
server.h
src/comm/ros_bridge/include/server.h
+39
-0
topic_publisher.cpp
src/comm/ros_bridge/include/topic_publisher.cpp
+147
-0
topic_publisher.h
src/comm/ros_bridge/include/topic_publisher.h
+49
-0
topic_subscriber.cpp
src/comm/ros_bridge/include/topic_subscriber.cpp
+99
-0
topic_subscriber.h
src/comm/ros_bridge/include/topic_subscriber.h
+41
-0
CasePacker.cpp
src/comm/ros_bridge/src/CasePacker.cpp
+0
-69
PackageBuffer.h
src/comm/ros_bridge/src/PackageBuffer.h
+0
-45
ROSBridge.cpp
src/comm/ros_bridge/src/ROSBridge.cpp
+0
-43
ros_bridge.cpp
src/comm/ros_bridge/src/ros_bridge.cpp
+81
-0
utilities.h
src/comm/utilities.h
+0
-11
GeneralSettings.qml
src/ui/preferences/GeneralSettings.qml
+17
-3
No files found.
deploy/AppImageCommitHash
deleted
100644 → 0
View file @
0e34b591
bd79747292138b2ea0
deploy/QGroundControl.AppImage
0 → 100755
View file @
2430ec45
File added
deploy/appImageCommand.txt
View file @
2430ec45
./create_linux_appimage.sh
/home/valentin/Desktop/drones/qgroundcontrol/ /home/valentin/Desktop/drones/build-qgroundcontrol-Desktop_Qt_5_11_3_GCC_64bit-Release/release/
./create_linux_appimage.sh
~/Desktop/drones/qgroundcontrol ~/Desktop/drones/build-qgroundcontrol-Desktop_Qt_5_11_3_GCC_64bit-Release/release
deploy/create_linux_appimage.sh
View file @
2430ec45
...
...
@@ -66,19 +66,19 @@ dpkg -x libts-0.0-0_1.0-11_amd64.deb libts
cp
-L
libts/usr/lib/x86_64-linux-gnu/libts-0.0.so.0
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
# copy libortools.so, etc...
cp
-L
${
QGC_SRC
}
/libs/or-tools-src-ubuntu/lib/
*
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
cp
-L
${
QGC_SRC
}
/libs/or-tools-src-ubuntu/lib/
*
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
||
{
echo
"libortools.so not found"
;
exit
1
;
}
# copy libGeographic.so
cp
-L
/usr/lib/x86_64-linux-gnu/libGeographic.so
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
# copy libGeographic.so
.17
cp
-L
/usr/lib/x86_64-linux-gnu/libGeographic.so
.17
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
||
{
echo
"libGeographic.so.17 not found"
;
exit
1
;
}
# copy boost
cp
-L
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
cp
-L
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
||
{
echo
"libboost_system.so.1.65.1 not found"
;
exit
1
;
}
# copy libcrypto
cp
-L
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
cp
-L
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
||
{
echo
"libcrypto.so.1.1 not found"
;
exit
1
;
}
# copy libSDL2
cp
-L
/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
cp
-L
/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
${
APPDIR
}
/usr/lib/x86_64-linux-gnu/
||
{
echo
"libSDL2-2.0.so.0 not found"
;
exit
1
;
}
# copy QGroundControl release into appimage
...
...
qgroundcontrol.pro
View file @
2430ec45
...
...
@@ -27,11 +27,12 @@ QGCROOT = $$PWD
DebugBuild
{
DESTDIR
=
$$
{
OUT_PWD
}
/
debug
#
DEFINES
+=
DEBUG
#
DEFINES
+=
ROS_BRIDGE_
CLIENT_
DEBUG
DEFINES
+=
DEBUG
#
DEFINES
+=
ROS_BRIDGE_DEBUG
}
else
{
DESTDIR
=
$$
{
OUT_PWD
}
/
release
#
DEFINES
+=
ROS_BRIDGE_DEBUG
DEFINES
+=
NDEBUG
}
...
...
@@ -438,13 +439,15 @@ HEADERS += \
src
/
Wima
/
Snake
/
PolygonArray
.
h
\
src
/
Wima
/
Snake
/
QNemoHeartbeat
.
h
\
src
/
Wima
/
Snake
/
QNemoProgress
.
h
\
src
/
Wima
/
Snake
/
QtROSJsonFactory
.
h
\
src
/
Wima
/
Snake
/
QtROSTypeFactory
.
h
\
src
/
Wima
/
Snake
/
QNemoProgress
.
h
\
src
/
Wima
/
Snake
/
SnakeTiles
.
h
\
src
/
Wima
/
Snake
/
SnakeTilesLocal
.
h
\
src
/
Wima
/
Snake
/
SnakeWorker
.
h
\
src
/
Wima
/
WaypointManager
/
AreaInterface
.
h
\
src
/
Wima
/
WaypointManager
/
DefaultManager
.
h
\
src
/
Wima
/
WaypointManager
/
GenericWaypointManager
.
h
\
src
/
Wima
/
Geometry
/
WimaPolygonArray
.
h
\
src
/
Wima
/
Snake
/
snaketile
.
h
\
src
/
Wima
/
WaypointManager
/
RTLManager
.
h
\
src
/
Wima
/
WaypointManager
/
Settings
.
h
\
src
/
Wima
/
WaypointManager
/
Slicer
.
h
\
...
...
@@ -481,18 +484,21 @@ HEADERS += \
src
/
Wima
/
Geometry
/
testplanimetrycalculus
.
h
\
src
/
Settings
/
WimaSettings
.
h
\
src
/
QmlControls
/
QmlObjectVectorModel
.
h
\
src
/
comm
/
ros_bridge
/
include
/
CasePacker
.
h
\
src
/
comm
/
ros_bridge
/
include
/
ComPrivateInclude
.
h
\
src
/
comm
/
ros_bridge
/
include
/
GenericMessages
.
h
\
src
/
comm
/
ros_bridge
/
include
/
JsonMethodes
.
h
\
src
/
comm
/
ros_bridge
/
include
/
MessageTag
.
h
\
src
/
comm
/
ros_bridge
/
include
/
MessageTraits
.
h
\
src
/
comm
/
ros_bridge
/
include
/
RosBridgeClient
.
h
\
src
/
comm
/
ros_bridge
/
include
/
ThreadSafeQueue
.
h
\
src
/
comm
/
ros_bridge
/
include
/
TopicPublisher
.
h
\
src
/
comm
/
ros_bridge
/
include
/
TopicSubscriber
.
h
\
src
/
comm
/
ros_bridge
/
include
/
TypeFactory
.
h
\
src
/
comm
/
ros_bridge
/
src
/
PackageBuffer
.
h
\
src
/
comm
/
ros_bridge
/
include
/
com_private
.
h
\
src
/
comm
/
ros_bridge
/
include
/
message_traits
.
h
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
geographic_msgs
/
geopoint
.
h
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
geometry_msgs
/
point32
.
h
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
geometry_msgs
/
polygon
.
h
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
geometry_msgs
/
polygon_stamped
.
h
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
jsk_recognition_msgs
/
polygon_array
.
h
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
nemo_msgs
/
heartbeat
.
h
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
nemo_msgs
/
progress
.
h
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
std_msgs
/
header
.
h
\
src
/
comm
/
ros_bridge
/
include
/
server
.
h
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
std_msgs
/
time
.
h
\
src
/
comm
/
ros_bridge
/
include
/
topic_publisher
.
h
\
src
/
comm
/
ros_bridge
/
include
/
topic_subscriber
.
h
\
src
/
comm
/
utilities
.
h
SOURCES
+=
\
src
/
Snake
/
clipper
/
clipper
.
cpp
\
...
...
@@ -510,11 +516,21 @@ SOURCES += \
src
/
Wima
/
WaypointManager
/
Slicer
.
cpp
\
src
/
Wima
/
WaypointManager
/
Utils
.
cpp
\
src
/
Wima
/
WimaBridge
.
cc
\
src
/
comm
/
ros_bridge
/
include
/
ComPrivateInclude
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
MessageTag
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
TopicPublisher
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
TopicSubscriber
.
cpp
\
src
/
comm
/
ros_bridge
/
src
/
CasePacker
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
RosBridgeClient
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
com_private
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
geographic_msgs
/
geopoint
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
geometry_msgs
/
point32
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
geometry_msgs
/
polygon
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
geometry_msgs
/
polygon_stamped
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
jsk_recognition_msgs
/
polygon_array
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
nemo_msgs
/
heartbeat
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
nemo_msgs
/
progress
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
std_msgs
/
header
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
messages
/
std_msgs
/
time
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
server
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
topic_publisher
.
cpp
\
src
/
comm
/
ros_bridge
/
include
/
topic_subscriber
.
cpp
\
src
/
Wima
/
Snake
/
snaketile
.
cpp
\
src
/
api
/
QGCCorePlugin
.
cc
\
src
/
api
/
QGCOptions
.
cc
\
src
/
api
/
QGCSettings
.
cc
\
...
...
@@ -545,7 +561,7 @@ SOURCES += \
src
/
Wima
/
Geometry
/
testplanimetrycalculus
.
cpp
\
src
/
Settings
/
WimaSettings
.
cc
\
src
/
QmlControls
/
QmlObjectVectorModel
.
cc
\
src
/
comm
/
ros_bridge
/
src
/
ROSB
ridge
.
cpp
src
/
comm
/
ros_bridge
/
src
/
ros_b
ridge
.
cpp
#
#
Unit
Test
specific
configuration
goes
here
(
requires
full
debug
build
with
all
plugins
)
...
...
src/Settings/Wima.SettingsGroup.json
View file @
2430ec45
...
...
@@ -18,5 +18,11 @@
"type"
:
"uint64"
,
"units"
:
"s"
,
"defaultValue"
:
15
},
{
"name"
:
"rosbridgeConnectionString"
,
"shortDescription"
:
"Ros Bridge Connection String (host:port)."
,
"type"
:
"string"
,
"defaultValue"
:
"localhost:9090"
}
]
src/Settings/WimaSettings.cc
View file @
2430ec45
...
...
@@ -11,3 +11,4 @@ DECLARE_SETTINGGROUP(Wima, "Wima")
DECLARE_SETTINGSFACT
(
WimaSettings
,
lowBatteryThreshold
)
DECLARE_SETTINGSFACT
(
WimaSettings
,
enableLowBatteryHandling
)
DECLARE_SETTINGSFACT
(
WimaSettings
,
minimalRemainingMissionTime
)
DECLARE_SETTINGSFACT
(
WimaSettings
,
rosbridgeConnectionString
)
src/Settings/WimaSettings.h
View file @
2430ec45
...
...
@@ -13,4 +13,5 @@ public:
DEFINE_SETTINGFACT
(
lowBatteryThreshold
)
DEFINE_SETTINGFACT
(
enableLowBatteryHandling
)
DEFINE_SETTINGFACT
(
minimalRemainingMissionTime
)
DEFINE_SETTINGFACT
(
rosbridgeConnectionString
)
};
src/Wima/Geometry/GeoPoint3D.cpp
View file @
2430ec45
#include "GeoPoint3D.h"
GeoPoint
::
GeoPoint
(
QObject
*
parent
)
GeoPoint
3D
::
GeoPoint3D
(
QObject
*
parent
)
:
QObject
(
parent
),
ROSGeoPoint
()
{}
GeoPoint
::
GeoPoint
(
double
latitude
,
double
longitude
,
double
altitude
,
QObject
*
parent
)
GeoPoint
3D
::
GeoPoint3D
(
double
latitude
,
double
longitude
,
double
altitude
,
QObject
*
parent
)
:
QObject
(
parent
),
ROSGeoPoint
(
latitude
,
longitude
,
altitude
)
{}
GeoPoint
::
GeoPoint
(
const
GeoPoint
&
p
,
QObject
*
parent
)
GeoPoint
3D
::
GeoPoint3D
(
const
GeoPoint3D
&
p
,
QObject
*
parent
)
:
QObject
(
parent
),
ROSGeoPoint
(
p
.
latitude
(),
p
.
longitude
(),
p
.
altitude
())
{}
GeoPoint
::
GeoPoint
(
const
ROSGeoPoint
&
p
,
QObject
*
parent
)
GeoPoint
3D
::
GeoPoint3D
(
const
ROSGeoPoint
&
p
,
QObject
*
parent
)
:
QObject
(
parent
),
ROSGeoPoint
(
p
.
latitude
(),
p
.
longitude
(),
p
.
altitude
())
{}
GeoPoint
::
GeoPoint
(
const
QGeoCoordinate
&
p
,
QObject
*
parent
)
GeoPoint
3D
::
GeoPoint3D
(
const
QGeoCoordinate
&
p
,
QObject
*
parent
)
:
QObject
(
parent
),
ROSGeoPoint
(
p
.
latitude
(),
p
.
longitude
(),
p
.
altitude
())
{}
GeoPoint
*
GeoPoint
::
Clone
()
const
{
return
new
GeoPoint
(
*
this
);
}
GeoPoint
&
GeoPoint
::
operator
=
(
const
GeoPoint
&
p
)
GeoPoint3D
&
GeoPoint3D
::
operator
=
(
const
GeoPoint3D
&
p
)
{
this
->
setLatitude
(
p
.
latitude
());
this
->
setLongitude
(
p
.
longitude
());
...
...
@@ -32,7 +27,7 @@ GeoPoint &GeoPoint::operator=(const GeoPoint &p)
return
*
this
;
}
GeoPoint
&
GeoPoint
::
operator
=
(
const
QGeoCoordinate
&
p
)
GeoPoint
3D
&
GeoPoint3D
::
operator
=
(
const
QGeoCoordinate
&
p
)
{
this
->
setLatitude
(
p
.
latitude
());
this
->
setLongitude
(
p
.
longitude
());
...
...
src/Wima/Geometry/GeoPoint3D.h
View file @
2430ec45
#pragma once
#include "ros_bridge/include/JsonMethodes.h"
#include "ros_bridge/include/MessageBaseClass.h"
#include "ros_bridge/include/GenericMessages.h"
#include <QGeoCoordinate>
#include <QObject>
#include "ros_bridge/include/messages/geographic_msgs/geopoint.h"
typedef
ROSBridge
::
MessageBaseClass
ROSMsg
;
typedef
ROSBridge
::
GenericMessages
::
GeographicMsgs
::
GeoPoint
ROSGeoPoint
;
namespace
MsgGroups
=
ROSBridge
::
MessageGroups
;
class
GeoPoint
:
public
QObject
,
public
ROSGeoPoint
typedef
ros_bridge
::
messages
::
geographic_msgs
::
geo_point
::
GeoPoint
ROSGeoPoint
;
class
GeoPoint3D
:
public
QObject
,
public
ROSGeoPoint
{
Q_OBJECT
public:
typedef
MsgGroups
::
GeoPointGroup
Group
;
GeoPoint
(
QObject
*
parent
=
nullptr
);
GeoPoint
(
double
latitude
,
GeoPoint
3D
(
QObject
*
parent
=
nullptr
);
GeoPoint
3D
(
double
latitude
,
double
longitude
,
double
altitude
,
QObject
*
parent
=
nullptr
);
GeoPoint
(
const
GeoPoint
&
p
,
GeoPoint
3D
(
const
GeoPoint3D
&
p
,
QObject
*
parent
=
nullptr
);
GeoPoint
(
const
ROSGeoPoint
&
p
,
GeoPoint
3D
(
const
ROSGeoPoint
&
p
,
QObject
*
parent
=
nullptr
);
GeoPoint
(
const
QGeoCoordinate
&
p
,
GeoPoint
3D
(
const
QGeoCoordinate
&
p
,
QObject
*
parent
=
nullptr
);
virtual
GeoPoint
*
Clone
()
const
override
;
GeoPoint
&
operator
=
(
const
GeoPoint
&
p
);
GeoPoint
&
operator
=
(
const
QGeoCoordinate
&
p
);
GeoPoint3D
&
operator
=
(
const
GeoPoint3D
&
p
);
GeoPoint3D
&
operator
=
(
const
QGeoCoordinate
&
p
);
};
...
...
src/Wima/Geometry/Polygon2D.h
View file @
2430ec45
...
...
@@ -3,41 +3,30 @@
#include <QPolygonF>
#include <QPointF>
#include "ros_bridge/include/MessageGroups.h"
#include "ros_bridge/include/GenericMessages.h"
#include "ros_bridge/include/MessageBaseClass.h"
#include "ros_bridge/include/JsonMethodes.h"
#include "ros_bridge/include/messages/geometry_msgs/polygon_stamped.h"
namespace
MsgGroupsNS
=
ROSBridge
::
MessageGroups
;
namespace
PolyStampedNS
=
ROSBridge
::
JsonMethodes
::
GeometryMsgs
::
PolygonStamped
;
typedef
ROSBridge
::
MessageBaseClass
ROSMsg
;
namespace
polygon_stamped
=
ros_bridge
::
messages
::
geometry_msgs
::
polygon_stamped
;
template
<
class
PointType
=
QPointF
,
template
<
class
,
class
...
>
class
ContainerType
=
QVector
>
class
Polygon2DTemplate
:
public
ROSMsg
{
//
typedef
ROSBridge
::
GenericMessages
::
GeometryMsgs
::
GenericPolygon
<
PointType
,
ContainerType
>
Poly
;
class
Polygon2DTemplate
{
//
typedef
ros_bridge
::
messages
::
geometry_msgs
::
polygon
::
GenericPolygon
<
PointType
,
ContainerType
>
Polygon
;
public:
typedef
MsgGroupsNS
::
PolygonStampedGroup
Group
;
// has no header
Polygon2DTemplate
(){}
Polygon2DTemplate
(
const
Polygon2DTemplate
&
other
)
:
ROSMsg
(),
_polygon
(
other
.
_polygon
){}
Polygon2DTemplate
(
const
Polygon2DTemplate
&
other
)
:
_polygon
(
other
.
_polygon
){}
Polygon2DTemplate
&
operator
=
(
const
Polygon2DTemplate
&
other
)
{
this
->
_polygon
=
other
.
_polygon
;
return
*
this
;
}
const
Poly
&
polygon
()
const
{
return
_polygon
;}
Poly
&
polygon
()
{
return
_polygon
;}
const
Poly
gon
&
polygon
()
const
{
return
_polygon
;}
Poly
gon
&
polygon
()
{
return
_polygon
;}
const
ContainerType
<
PointType
>
&
path
()
const
{
return
_polygon
.
points
();}
ContainerType
<
PointType
>
&
path
()
{
return
_polygon
.
points
();}
virtual
Polygon2DTemplate
*
Clone
()
const
{
// ROSMsg
return
new
Polygon2DTemplate
(
*
this
);
}
private:
Poly
_polygon
;
Poly
gon
_polygon
;
};
...
...
src/Wima/Geometry/PolygonArray.h
View file @
2430ec45
#pragma once
#include <Q
Object
>
#include <Q
String
>
#include "ros_bridge/include/MessageBaseClass.h"
typedef
ROSBridge
::
MessageBaseClass
ROSMsgBase
;
template
<
class
PolygonType
,
template
<
class
,
class
...
>
class
ContainerType
>
class
PolygonArray
:
public
ROSMsgBase
,
public
ContainerType
<
PolygonType
>
{
class
PolygonArray
:
public
ContainerType
<
PolygonType
>
{
public:
explicit
PolygonArray
()
:
ROSMsgBase
(),
ContainerType
<
PolygonType
>
()
{}
explicit
PolygonArray
()
:
ContainerType
<
PolygonType
>
()
{}
PolygonArray
(
const
PolygonArray
&
other
)
:
ContainerType
<
PolygonType
>
(
other
)
{}
QString
type
()
const
override
{
return
"PolygonArray"
;}
...
...
src/Wima/Geometry/WimaPolygonArray.h
View file @
2430ec45
#pragma once
#include "ros_bridge/include/MessageBaseClass.h"
#include "ros_bridge/include/MessageGroups.h"
#include "QmlObjectListModel.h"
#include <QVector>
#include <QString>
typedef
ROSBridge
::
MessageBaseClass
ROSMsg
;
namespace
MsgGroups
=
ROSBridge
::
MessageGroups
;
typedef
MsgGroups
::
EmptyGroup
EmptyGroup
;
template
<
class
PolygonType
,
template
<
class
,
class
...
>
class
ContainerType
=
QVector
,
typename
GroupType
=
EmptyGroup
>
class
WimaPolygonArray
:
public
ROSMsg
template
<
class
PolygonType
,
template
<
class
,
class
...
>
class
ContainerType
=
QVector
>
class
WimaPolygonArray
{
public:
typedef
GroupType
Group
;
WimaPolygonArray
()
{}
WimaPolygonArray
(
const
WimaPolygonArray
&
other
)
:
ROSMsg
()
,
_polygons
(
other
.
_polygons
),
_dirty
(
true
)
_polygons
(
other
.
_polygons
),
_dirty
(
true
)
{}
virtual
WimaPolygonArray
*
Clone
()
const
override
{
return
new
WimaPolygonArray
(
*
this
);
~
WimaPolygonArray
(){
_objs
.
clearAndDeleteContents
();
}
class
QmlObjectListModel
*
QmlObjectListModel
(){
...
...
@@ -51,9 +43,9 @@ public:
private:
void
_updateObjects
(
void
){
_objs
.
clear
();
_objs
.
clear
AndDeleteContents
();
for
(
long
i
=
0
;
i
<
_polygons
.
size
();
++
i
){
_objs
.
append
(
&
_polygons
[
i
]
);
_objs
.
append
(
new
PolygonType
(
_polygons
[
i
])
);
}
}
...
...
src/Wima/Snake/PolygonArray.h
View file @
2430ec45
#pragma once
#include "ros_bridge/include/MessageGroups.h"
#include "Wima/Geometry/Polygon2D.h"
#include "Wima/Geometry/WimaPolygonArray.h"
namespace
MsgGroups
=
ROSBridge
::
MessageGroups
;
typedef
WimaPolygonArray
<
Polygon2D
,
QVector
,
MsgGroups
::
PolygonArrayGroup
>
PolygonArray
;
typedef
WimaPolygonArray
<
Polygon2D
,
QVector
>
SnakeTilesLocal
;
src/Wima/Snake/QNemoHeartbeat.h
View file @
2430ec45
#pragma once
#include "ros_bridge/include/
GenericMessages
.h"
#include "ros_bridge/include/
messages/nemo_msgs/heartbeat
.h"
using
QNemoHeartbeat
=
ROSBridge
::
GenericMessages
::
NemoMsgs
::
Heartbeat
;
using
QNemoHeartbeat
=
ros_bridge
::
messages
::
nemo_msgs
::
heartbeat
::
Heartbeat
;
src/Wima/Snake/QNemoProgress.h
View file @
2430ec45
#pragma once
#include <QVector>
#include <QObject>
#include "ros_bridge/include/GenericMessages.h"
namespace
NemoMsgs
=
ROSBridge
::
GenericMessages
::
NemoMsgs
;
typedef
NemoMsgs
::
GenericProgress
<
int
,
QVector
>
QNemoProgress
;
#include <QVector>
#include "ros_bridge/include/messages/nemo_msgs/progress.h"
namespace
nemo
=
ros_bridge
::
messages
::
nemo_msgs
;
typedef
nemo
::
progress
::
GenericProgress
<
int
,
QVector
>
QNemoProgress
;
src/Wima/Snake/QtROSJsonFactory.h
deleted
100644 → 0
View file @
0e34b591
#pragma once
#include "ros_bridge/include/JsonFactory.h"
#include <QString>
typedef
ROSBridge
::
GenericJsonFactory
<>
QtROSJsonFactory
;
src/Wima/Snake/QtROSTypeFactory.h
deleted
100644 → 0
View file @
0e34b591
#pragma once
#include "ros_bridge/include/TypeFactory.h"
#include <QString>
typedef
ROSBridge
::
TypeFactory
QtROSTypeFactory
;
src/Wima/WimaController.cc
View file @
2430ec45
This diff is collapsed.
Click to expand it.
src/Wima/WimaController.h
View file @
2430ec45
...
...
@@ -35,18 +35,14 @@
#include "Snake/QNemoProgress.h"
#include "Snake/QNemoHeartbeat.h"
#include "ros_bridge/include/
ROSB
ridge.h"
#include "ros_bridge/include/
ros_b
ridge.h"
#include "WaypointManager/DefaultManager.h"
#include "WaypointManager/RTLManager.h"
#include
<map>
#include
"utilities.h"
#define CHECK_BATTERY_INTERVAL 1000 // ms
#define SMART_RTL_MAX_ATTEMPTS 3 // times
#define SMART_RTL_ATTEMPT_INTERVAL 200 // ms
#define EVENT_TIMER_INTERVAL 50 // ms
#define SNAKE_EVENT_LOOP_INTERVAL 1000 // ms
#include <map>
using
namespace
snake
;
...
...
@@ -59,7 +55,7 @@ class WimaController : public QObject
enum
FileType
{
WimaFile
,
PlanFile
};
typedef
QScopedPointer
<
ROSB
ridge
::
ROSBridge
>
ROSBridgePtr
;
typedef
QScopedPointer
<
ros_b
ridge
::
ROSBridge
>
ROSBridgePtr
;
public:
...
...
@@ -338,9 +334,10 @@ private slots:
void
_smartRTLCleanUp
(
bool
flying
);
// Snake.
void
_setSnakeCalcInProgress
(
bool
inProgress
);
void
_
updateSnakeData
();
void
_
snakeStoreWorkerResults
();
void
_initStartSnakeWorker
();
void
_switchSnakeManager
(
QVariant
variant
);
bool
_doTopicServiceSetup
();
// Periodic tasks.
void
_eventTimerHandler
(
void
);
// Waypoint manager handling.
...
...
@@ -396,8 +393,6 @@ private:
// Waypoint statistics.
double
_measurementPathLength
;
// the lenght of the phase in meters
// double _phaseDistance; // the lenth in meters of the current phase
// double _phaseDuration; // the phase duration in seconds
// Snake
bool
_snakeCalcInProgress
;
...
...
@@ -410,11 +405,14 @@ private:
QNemoHeartbeat
_nemoHeartbeat
;
// measurement progress
int
_fallbackStatus
;
ROSBridgePtr
_pRosBridge
;
bool
_bridgeSetupDone
;
static
StatusMap
_nemoStatusMap
;
bool
_topicServiceSetupDone
;
// Periodic tasks.
QTimer
_eventTimer
;
QTimer
_eventTimer
;
EventTicker
_batteryLevelTicker
;
EventTicker
_snakeTicker
;
EventTicker
_nemoTimeoutTicker
;
};
...
...
src/comm/ros_bridge/include/CasePacker.h
deleted
100644 → 0
View file @
0e34b591
#pragma once
#include "ros_bridge/include/MessageBaseClass.h"
#include "ros_bridge/include/MessageTag.h"
#include "ros_bridge/include/TypeFactory.h"
#include "ros_bridge/include/JsonFactory.h"
#include <memory>
#include "rapidjson/include/rapidjson/document.h"
namespace
ROSBridge
{
class
CasePacker
{
typedef
MessageTag
Tag
;
typedef
rapidjson
::
Document
JsonDoc
;
typedef
std
::
unique_ptr
<
JsonDoc
>
JsonDocUPtr
;
public:
CasePacker
()
=
delete
;
CasePacker
(
TypeFactory
*
typeFactory
,
JsonFactory
*
jsonFactory
);
template
<
class
T
>
JsonDocUPtr
pack
(
const
T
&
msg
,
const
std
::
string
&
topic
)
const
{
JsonDocUPtr
docPt
(
_jsonFactory
->
create
(
msg
));
std
::
string
messageType
=
T
::
Group
::
messageType
();
addTag
(
docPt
,
topic
,
messageType
.
c_str
());
return
docPt
;
}
template
<
class
T
>
bool
unpack
(
JsonDocUPtr
&
pDoc
,
T
&
msg
)
const
{
removeTag
(
pDoc
);
return
_typeFactory
->
create
(
*
pDoc
.
get
(),
msg
);
}
bool
getTag
(
const
JsonDocUPtr
&
pDoc
,
Tag
&
tag
)
const
;
void
addTag
(
JsonDocUPtr
&
doc
,
const
std
::
string
&
topic
,
const
std
::
string
&
messageType
)
const
;
void
addTag
(
JsonDocUPtr
&
doc
,
const
Tag
&
tag
)
const
;
void
removeTag
(
JsonDocUPtr
&
pDoc
)
const
;
bool
getTopic
(
const
JsonDocUPtr
&
pDoc
,
std
::
string
&
topic
)
const
;
bool
getMessageType
(
const
JsonDocUPtr
&
pDoc
,
std
::
string
&
messageType
)
const
;
static
const
char
*
topicKey
;
static
const
char
*
messageTypeKey
;
private:
TypeFactory
*
_typeFactory
;
JsonFactory
*
_jsonFactory
;
};
}
src/comm/ros_bridge/include/ComPrivateInclude.cpp
deleted
100644 → 0
View file @
0e34b591
#include "ros_bridge/include/ComPrivateInclude.h"
#include <functional>
std
::
size_t
ROSBridge
::
ComPrivate
::
getHash
(
const
std
::
string
&
str
)
{
std
::
hash
<
std
::
string
>
hash
;
return
hash
(
str
);
}
std
::
size_t
ROSBridge
::
ComPrivate
::
getHash
(
const
char
*
str
)
{
return
ROSBridge
::
ComPrivate
::
getHash
(
std
::
string
(
str
));
}
src/comm/ros_bridge/include/GenericMessages.h
deleted
100644 → 0
View file @
0e34b591
This diff is collapsed.
Click to expand it.
src/comm/ros_bridge/include/JsonFactory.h
deleted
100644 → 0
View file @
0e34b591
#pragma once
#include "ros_bridge/rapidjson/include/rapidjson/document.h"
#include "ros_bridge/include/JsonMethodes.h"
#include "MessageBaseClass.h"
#include "utilities.h"
#include "ros_bridge/include/MessageTraits.h"
#include "ros_bridge/include/MessageGroups.h"
#include "ros_bridge/include/GenericMessages.h"
#include "boost/type_traits.hpp"
#include "boost/type_traits/is_base_of.hpp"
namespace
ROSBridge
{
class
StdHeaderPolicy
;
//!
//! \brief The JsonFactory class is used to create ROS messages.
//!
//! The JsonFactory class is used to create \class rapidjson::Document documents containing ROS messages
//! from classes derived from \class MessageBaseClass. Each class has a group mark (typedef ... Group) which allows the
//! JsonFactory to determine the ROS message type it will create.
template
<
class
HeaderPolicy
=
StdHeaderPolicy
>
class
GenericJsonFactory
:
public
HeaderPolicy
{
typedef
MessageBaseClass
ROSMsg
;
public:
GenericJsonFactory
()
:
HeaderPolicy
()
{}
//!
//! \brief Creates a \class rapidjson::Document document containing a ROS mesage from \p msg.
//!
//! Creates a \class rapidjson::Document document containing a ROS message from \p msg.
//! A compile-time error will occur, if \p msg belongs to the \struct EmptyGroup or is
//! not derived from \class MessageBaseClass.
//! \param msg Instance of a \class MessageBaseClass subclass belonging to a ROSMessageGroup.
//! \return rapidjson::Document document containing a ROS message.
template
<
class
T
>
rapidjson
::
Document
*
create
(
const
T
&
msg
){
static_assert
(
boost
::
is_base_of
<
ROSMsg
,
T
>::
value
,
"Type of msg must be derived from MessageBaseClass."
);
static_assert
(
!::
boost
::
is_same
<
typename
T
::
Group
,
MessageGroups
::
EmptyGroup
>::
value
,
"msg belongs to group EmptyGroup (not allowed). Please specify Group (typedef MessageGroup Group)"
);
//cout << T::Group::label() << endl;
return
_create
(
msg
,
Type2Type
<
typename
T
::
Group
>
());
}
private:
// ===========================================================================
// EmptyGroup and not implemented Groups
// ===========================================================================
template
<
class
U
,
class
V
>
rapidjson
::
Document
*
_create
(
const
U
&
msg
,
Type2Type
<
V
>
){
(
void
)
msg
;
assert
(
false
);
// Implementation missing for group U::Group!
return
nullptr
;
}
// ===========================================================================
// Point32Group
// ===========================================================================
template
<
class
U
>
rapidjson
::
Document
*
_create
(
const
U
&
msg
,
Type2Type
<
MessageGroups
::
Point32Group
>
){
using
namespace
ROSBridge
;
rapidjson
::
Document
*
doc
=
new
rapidjson
::
Document
(
rapidjson
::
kObjectType
);
bool
ret
=
JsonMethodes
::
GeometryMsgs
::
Point32
::
toJson
<
_Float32
>
(
msg
,
*
doc
,
doc
->
GetAllocator
());
assert
(
ret
);
(
void
)
ret
;
return
doc
;
}
// ===========================================================================
// GeoPointGroup
// ===========================================================================
template
<
class
U
>
rapidjson
::
Document
*
_create
(
const
U
&
msg
,
Type2Type
<
MessageGroups
::
GeoPointGroup
>
){
using
namespace
ROSBridge
;
rapidjson
::
Document
*
doc
=
new
rapidjson
::
Document
(
rapidjson
::
kObjectType
);
bool
ret
=
JsonMethodes
::
GeographicMsgs
::
GeoPoint
::
toJson
(
msg
,
*
doc
,
doc
->
GetAllocator
());
assert
(
ret
);
(
void
)
ret
;
return
doc
;
}
// ===========================================================================
// PolygonGroup
// ===========================================================================
template
<
class
U
>
rapidjson
::
Document
*
_create
(
const
U
&
msg
,
Type2Type
<
MessageGroups
::
PolygonGroup
>
){
using
namespace
ROSBridge
;
rapidjson
::
Document
*
doc
=
new
rapidjson
::
Document
(
rapidjson
::
kObjectType
);
bool
ret
=
JsonMethodes
::
GeometryMsgs
::
Polygon
::
toJson
(
msg
,
*
doc
,
doc
->
GetAllocator
());
assert
(
ret
);
(
void
)
ret
;
return
doc
;
}
// ===========================================================================
// PolygonStampedGroup
// ===========================================================================
template
<
class
U
>
rapidjson
::
Document
*
_create
(
const
U
&
msg
,
Type2Type
<
MessageGroups
::
PolygonStampedGroup
>
){
using
namespace
ROSBridge
;
using
namespace
ROSBridge
::
traits
;
typedef
HasMemberHeader
<
U
>
HasHeader
;
return
_createPolygonStamped
(
msg
,
Int2Type
<
HasHeader
::
value
>
());
}
template
<
class
U
,
int
k
>
rapidjson
::
Document
*
_createPolygonStamped
(
const
U
&
msg
,
Int2Type
<
k
>
){
// U has member header(), use integraded header.
using
namespace
ROSBridge
;
rapidjson
::
Document
*
doc
=
new
rapidjson
::
Document
(
rapidjson
::
kObjectType
);
bool
ret
=
JsonMethodes
::
GeometryMsgs
::
PolygonStamped
::
toJson
(
msg
,
*
doc
,
doc
->
GetAllocator
());
assert
(
ret
);
(
void
)
ret
;
return
doc
;