Skip to content

Commit

Permalink
feature/data_rate_checker_plugin (autowarefoundation#1491)
Browse files Browse the repository at this point in the history
* Initial commit

* Cleanup text labels and change data averaging window.

* Text label correction.

* Increased frequency display size.

* Changed statistics buffer timing and clear the buffer when no new messages received.

* Implemented persistent configuration storage. Sort topics alphabetically.

* Edited for Qt4 (indigo) compatibility.
  • Loading branch information
drwnz authored and amc-nu committed Sep 7, 2018
1 parent e81ac5f commit ee4dd4a
Show file tree
Hide file tree
Showing 5 changed files with 529 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ if (rviz_QT_VERSION VERSION_LESS "5")
qt4_wrap_ui(UI_HEADERS
node/traffic_light_plugin/form.ui
node/image_viewer_plugin/image_viewer_form.ui
node/data_rate_checker_plugin/data_rate_checker_form.ui
)

# Here we specify which header files need to be run through "moc",
# Qt's meta-object compiler.
qt4_wrap_cpp(MOC_FILES
node/traffic_light_plugin/traffic_light_plugin.h
node/image_viewer_plugin/image_viewer_plugin.h
node/data_rate_checker_plugin/data_rate_checker_plugin.h
)
else ()
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets Quick)
Expand All @@ -42,13 +44,15 @@ else ()
qt5_wrap_ui(UI_HEADERS
node/traffic_light_plugin/form.ui
node/image_viewer_plugin/image_viewer_form.ui
node/data_rate_checker_plugin/data_rate_checker_form.ui
)

# Here we specify which header files need to be run through "moc",
# Qt's meta-object compiler.
qt5_wrap_cpp(MOC_FILES
node/traffic_light_plugin/traffic_light_plugin.h
node/image_viewer_plugin/image_viewer_plugin.h
node/data_rate_checker_plugin/data_rate_checker_plugin.h
)
endif ()

Expand Down Expand Up @@ -76,6 +80,7 @@ set(SOURCE_FILES
node/image_viewer_plugin/draw_rects.cpp
node/image_viewer_plugin/draw_points.cpp
node/image_viewer_plugin/draw_lane.cpp
node/data_rate_checker_plugin/data_rate_checker_plugin.cpp
${MOC_FILES}
${UI_HEADERS})

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>data_rate_checker_form</class>
<widget class="QWidget" name="data_rate_checker_form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>646</width>
<height>527</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="topic_label_">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Topic: </string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QComboBox" name="topic_combo_box_"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="topic_frequency_label_">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Topic frequency:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="status_icon_label_">
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Status:</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="status_text_">
<property name="text">
<string>No topic selected</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLCDNumber" name="topic_frequency_lcd_">
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="smallDecimalPoint">
<bool>true</bool>
</property>
<property name="digitCount">
<number>6</number>
</property>
<property name="segmentStyle">
<enum>QLCDNumber::Flat</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="min_frequency_label_">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Min. Hz: </string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QSpinBox" name="min_frequency_spin_box_">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Minimum frequency&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="status_icon_">
<property name="font">
<font>
<pointsize>70</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>◉</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Loading

0 comments on commit ee4dd4a

Please sign in to comment.