Skip to content

Commit

Permalink
Mon: Added Monitor plugin for 2D plots of arbitrary scalar values (#607)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Reimold <[email protected]>
Co-authored-by: Adriana Chirila <[email protected]>
Co-authored-by: Mihai Muraru <[email protected]>
  • Loading branch information
3 people authored Apr 20, 2022
1 parent 1e1bf4f commit 90bd985
Show file tree
Hide file tree
Showing 43 changed files with 5,765 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
-DECAL_THIRDPARTY_BUILD_HDF5=OFF \
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=14
sudo mkdir /etc/ecal
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-ubuntu-18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install cmake doxygen graphviz build-essential zlib1g-dev qt5-default libhdf5-dev libprotobuf-dev libprotoc-dev protobuf-compiler libcurl4-openssl-dev python3-setuptools
sudo apt-get -y install cmake doxygen graphviz build-essential zlib1g-dev qt5-default libhdf5-dev libprotobuf-dev libprotoc-dev protobuf-compiler libcurl4-openssl-dev python3-setuptools libqwt-qt5-dev
shell: bash

- name: Install Cap’n Proto
Expand Down Expand Up @@ -98,6 +98,7 @@ jobs:
-DECAL_THIRDPARTY_BUILD_HDF5=OFF \
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_PREFIX=/usr \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-ubuntu-20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt update
sudo apt-get install ninja-build doxygen graphviz libcurl4-openssl-dev libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev qt5-default
sudo apt-get install ninja-build doxygen graphviz libcurl4-openssl-dev libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev qt5-default libqwt-qt5-dev
- name: Install Cap’n Proto
run: |
Expand Down Expand Up @@ -72,6 +72,7 @@ jobs:
-DECAL_THIRDPARTY_BUILD_HDF5=OFF \
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_PREFIX=/usr \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-ubuntu-iceoryx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt update
sudo apt-get install ninja-build doxygen graphviz libcurl4-openssl-dev libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev qt5-default
sudo apt-get install ninja-build doxygen graphviz libcurl4-openssl-dev libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev qt5-default libqwt-qt5-dev
- name: Install Cap’n Proto
run: |
Expand Down Expand Up @@ -84,6 +84,7 @@ jobs:
-DECAL_THIRDPARTY_BUILD_HDF5=OFF \
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=OFF \
-DCMAKE_PREFIX_PATH="${{ runner.workspace }}/iceoryx/iceoryx/build/install/prefix/lib/cmake/iceoryx_posh;${{ runner.workspace }}/iceoryx/iceoryx/build/install/prefix/lib/cmake/iceoryx_utils" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
-DECAL_THIRDPARTY_BUILD_HDF5=ON ^
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON ^
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON ^
-DECAL_THIRDPARTY_BUILD_QWT=OFF ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_PREFIX_PATH="%ProgramFiles%/Cap'n Proto/lib/cmake/CapnProto" ^
-DCMAKE_BUILD_TYPE=Debug ^
Expand Down Expand Up @@ -145,6 +146,7 @@ jobs:
-DECAL_THIRDPARTY_BUILD_HDF5=ON ^
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON ^
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON ^
-DECAL_THIRDPARTY_BUILD_QWT=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_PREFIX_PATH="%ProgramFiles%/Cap'n Proto/lib/cmake/CapnProto" ^
-DCMAKE_BUILD_TYPE=Release ^
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
-DECAL_THIRDPARTY_BUILD_HDF5=OFF \
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_PREFIX=/usr \
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@
[submodule "thirdparty/tcp_pubsub"]
path = thirdparty/tcp_pubsub
url = https://github.com/continental/tcp_pubsub.git
[submodule "thirdparty/qwt/qwt"]
path = thirdparty/qwt/qwt
url = https://git.code.sf.net/p/qwt/git
29 changes: 16 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ option(ECAL_THIRDPARTY_BUILD_FINEFTP "Build fineFTP with eCAL"
option(ECAL_THIRDPARTY_BUILD_TERMCOLOR "Build termcolor with eCAL" ON)
option(ECAL_THIRDPARTY_BUILD_TCP_PUBSUB "Build tcp_pubsub library with eCAL" ON)
option(ECAL_THIRDPARTY_BUILD_RECYCLE "Build steinwurf::recylce with eCAL" ON)
option(ECAL_THIRDPARTY_BUILD_QWT "Build qwt::qwt with eCAL" ON)
# option(ECAL_THIRDPARTY_BUILD_ZLIB "Build zlib with eCAL" ON)
# option(ECAL_THIRDPARTY_BUILD_LIBSSH2 "Build libssh2 with eCAL" ON)
option(ECAL_THIRDPARTY_BUILD_GTEST "Build gtest with eCAL" OFF)
Expand All @@ -71,10 +72,12 @@ if(WIN32)
option(ECAL_THIRDPARTY_BUILD_PROTOBUF "Build protobuf with eCAL" ON)
option(ECAL_THIRDPARTY_BUILD_CURL "Build CURL with eCAL" ON)
option(ECAL_THIRDPARTY_BUILD_HDF5 "Build HDF5 with eCAL" ON)
option(ECAL_THIRDPARTY_BUILD_QWT "Build qwt::qwt with eCAL" ON)
else()
option(ECAL_THIRDPARTY_BUILD_PROTOBUF "Build protobuf with eCAL" OFF)
option(ECAL_THIRDPARTY_BUILD_CURL "Build CURL with eCAL" OFF)
option(ECAL_THIRDPARTY_BUILD_HDF5 "Build HDF5 with eCAL" OFF)
option(ECAL_THIRDPARTY_BUILD_QWT "Build qwt::qwt with eCAL" OFF)
endif()

# This should be ON, unless build ecal hdf5 for Matlab usage
Expand Down Expand Up @@ -113,6 +116,18 @@ if(MSVC)
endif()
endif()

# --------------------------------------------------------
# detect qt library
# --------------------------------------------------------
if(MSVC)
if (HAS_QT5)
find_package(Qt5 COMPONENTS Core QUIET)
if (NOT "${Qt5_FOUND}")
autodetect_qt5_msvc_dir()
endif()
endif()
endif()

# This is a list of subprojects, that might be build with eCAL
# according to how options ECAL_BUILD_<SUBPROJECT> are set
set(possible_subprojects
Expand All @@ -129,6 +144,7 @@ set(possible_subprojects
GTest
HDF5
CMakeFunctions
qwt
)

# We should rename the option, but don't know how to do in in a
Expand Down Expand Up @@ -182,19 +198,6 @@ if(MSVC)
set(eCAL_PLATFORM_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET})
endif()

# --------------------------------------------------------
# detect qt library
# --------------------------------------------------------
if(MSVC)
if (HAS_QT5)
find_package(Qt5 COMPONENTS Core QUIET)
if (NOT "${Qt5_FOUND}")
autodetect_qt5_msvc_dir()
endif()
endif()
endif()


# --------------------------------------------------------
# set msvc specific options
# --------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ This project has dependencies - list with dependency name and license follows.
- Copyright 2013-2019 Freepik Company S.L. All rights reserved.
- URL: https://www.flaticon.com/
- License: Creative Commons 3.0 - https://creativecommons.org/licenses/by/3.0

2.4.3 Qwt
- Uwe Rathmann, Josef Wilgen ( <= Qwt 0.2 )
- URL: https://sourceforge.net/p/qwt/git/ci/develop/tree
- License: Qwt License Version 1.0, January 1, 2003

2.5 Testing

Expand Down
1 change: 1 addition & 0 deletions app/mon/mon_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
add_subdirectory(plugin_template)
add_subdirectory(monitor_tree_view)
add_subdirectory(protobuf_reflection)
add_subdirectory(signals_plotting)
if (HAS_CAPNPROTO)
add_subdirectory(capnproto_reflection)
endif (HAS_CAPNPROTO)
Expand Down
86 changes: 86 additions & 0 deletions app/mon/mon_plugins/signals_plotting/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# ========================= eCAL LICENSE =================================
#
# Copyright (C) 2016 - 2019 Continental Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ========================= eCAL LICENSE =================================

project(mon_plugin_signals_plotting VERSION 1.0.0)

find_package(Qt5 COMPONENTS
Core
Widgets
REQUIRED)

find_package(Protobuf REQUIRED)
find_package(qwt REQUIRED)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC OFF) # Reason for being turned off: AutoUIC will prevent VS from detecting changes in .ui files
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(${PROJECT_NAME}_src
src/plugin_widget.cpp
src/plugin.cpp
src/protobuf_tree_builder.cpp
src/signal_tree_item.cpp
src/signal_tree_model.cpp
src/tabwidget_container.cpp
src/chart_widget.cpp
src/chart_settings.cpp
)

set(${PROJECT_NAME}_header
src/plugin_widget.h
src/plugin.h
src/protobuf_tree_builder.h
src/signal_tree_item.h
src/signal_tree_model.h
src/tabwidget_container.h
src/util.h
src/chart_widget.h
src/chart_settings.h
)

set(${PROJECT_NAME}_ui
src/plugin_widget.ui
src/chart_settings.ui
)

qt5_wrap_ui(autogen_ui ${${PROJECT_NAME}_ui})

ecal_add_mon_plugin(${PROJECT_NAME}
SOURCES ${${PROJECT_NAME}_src} ${${PROJECT_NAME}_header} ${${PROJECT_NAME}_ui} ${autogen_ui}
METADATA src/metadata.json
)

create_targets_protobuf()

target_link_libraries (${PROJECT_NAME} Qt5::Widgets Qt5::Core eCAL::core eCAL::pb protobuf::libprotobuf eCAL::mon_plugin_lib qwt::qwt CustomQt)

if(MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4127 /wd4714" )
endif(MSVC)


target_include_directories(${PROJECT_NAME} PRIVATE src)
target_include_directories(${PROJECT_NAME} PRIVATE $<TARGET_PROPERTY:eCAL::core,INCLUDE_DIRECTORIES>)
target_compile_definitions(${PROJECT_NAME} PRIVATE QWT_DLL)

ecal_install_mon_plugin(${PROJECT_NAME})

set_target_properties(${PROJECT_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIGURATION>/${ECAL_MON_PLUGIN_DIR}
FOLDER app/mon/plugins
)
Loading

0 comments on commit 90bd985

Please sign in to comment.