Add Cyber Recorder Gui Simple#15795
Open
1012327963 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new standalone module modules/cyber_recorder_gui_simple, providing a lightweight Qt-based GUI for loading Apollo Cyber .record files (single file or directory) and controlling playback (play/pause/resume/stop and progress navigation).
Changes:
- Added a Qt GUI (mainwindow + UI widgets) to select record files/dirs, display metadata, and control playback.
- Added an embedded record playback implementation (producer/consumer/task buffer) that republishes record messages to Cyber channels.
- Added Bazel build + launch + module metadata/docs for the new tool.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/cyber_recorder_gui_simple/BUILD | Bazel targets for the GUI binary and Qt library. |
| modules/cyber_recorder_gui_simple/CMakeLists.txt | CMake build definition for non-Bazel workflows. |
| modules/cyber_recorder_gui_simple/cyberfile.xml | Module/package metadata and dependencies. |
| modules/cyber_recorder_gui_simple/README.md | User documentation for building and running the GUI tool. |
| modules/cyber_recorder_gui_simple/main.cpp | Qt application entrypoint + Cyber init/clear. |
| modules/cyber_recorder_gui_simple/mainwindow.ui | Qt Designer UI layout for the main window. |
| modules/cyber_recorder_gui_simple/mainwindow.h | MainWindow class declaration and UI helper methods. |
| modules/cyber_recorder_gui_simple/mainwindow.cpp | GUI logic for file/dir selection, playback control, and progress updates. |
| modules/cyber_recorder_gui_simple/record_playbar.h | Custom QSlider subclass for click-to-jump behavior. |
| modules/cyber_recorder_gui_simple/record_playbar.cpp | Implementation of click-to-jump slider behavior. |
| modules/cyber_recorder_gui_simple/doubleslider.h | Custom dual-handle range slider widget interface. |
| modules/cyber_recorder_gui_simple/doubleslider.cc | Dual-handle range slider widget implementation. |
| modules/cyber_recorder_gui_simple/info.h | Record info reader interface for displaying metadata. |
| modules/cyber_recorder_gui_simple/info.cc | Record metadata extraction + formatting implementation. |
| modules/cyber_recorder_gui_simple/launch/cyber_recorder_gui_simple.launch | cyber_launch configuration for starting the GUI binary. |
| modules/cyber_recorder_gui_simple/player/play_param.h | Playback parameter struct. |
| modules/cyber_recorder_gui_simple/player/player.h | Player orchestration interface (producer/consumer threads). |
| modules/cyber_recorder_gui_simple/player/player.cc | Player orchestration implementation. |
| modules/cyber_recorder_gui_simple/player/play_task.h | PlayTask wrapper around message+writer and timestamps. |
| modules/cyber_recorder_gui_simple/player/play_task.cc | PlayTask write implementation + counters/logging. |
| modules/cyber_recorder_gui_simple/player/play_task_buffer.h | Task buffer interface (time-ordered queue). |
| modules/cyber_recorder_gui_simple/player/play_task_buffer.cc | Task buffer implementation (multimap + mutex). |
| modules/cyber_recorder_gui_simple/player/play_task_consumer.h | Consumer thread interface (timed playback). |
| modules/cyber_recorder_gui_simple/player/play_task_consumer.cc | Consumer timing + pause/play logic implementation. |
| modules/cyber_recorder_gui_simple/player/play_task_producer.h | Producer interface (record reading + writer creation). |
| modules/cyber_recorder_gui_simple/player/play_task_producer.cc | Producer implementation (record viewer iteration + task creation). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+50
to
+51
| channel_info_oss << setiosflags(std::ios::left); | ||
| channel_info_oss << setiosflags(std::ios::fixed); |
| #ifndef MAINWINDOW_H | ||
| #define MAINWINDOW_H | ||
| #include <ctime> | ||
| #include <chrono> |
Comment on lines
+13
to
+15
| QT_BEGIN_NAMESPACE | ||
| using namespace apollo::goodman::record; | ||
|
|
| QT_BEGIN_NAMESPACE | ||
| using namespace apollo::goodman::record; | ||
|
|
||
| // 删除bazel-out/k8-opt/bin/modules/cyber_recorder_gui_simple |
Comment on lines
+272
to
+282
| if (player_->Reset()) { | ||
| is_play_ = false; | ||
| playbar->setValue(0); | ||
| ui->label->setText("0.0/0.0"); | ||
| SetStatus("Stopped"); | ||
| UpdateRangeLabel(); | ||
| UpdateUiState(); | ||
| return; | ||
| } | ||
| is_play_ = false; | ||
| SetStatus("Stopped"); |
Comment on lines
+9
to
+16
| set(CMAKE_AUTORCC ON) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 11) | ||
| set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
|
||
| find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED) | ||
| find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED) | ||
|
|
| # are extracted to their own cc_libraries. See the TODO above. | ||
| # cpplint() | ||
| apollo_package(enable_source=False) | ||
| apollo_package() |
Comment on lines
+4
to
+20
| <description> | ||
| This is a demo package | ||
| </description> | ||
|
|
||
| <maintainer email="sample@sample.com">Apollo Developer</maintainer> | ||
| <license>Apache License 2.0</license> | ||
| <url type="website">https://www.apollo.auto/</url> | ||
| <url type="repository">https://github.com/ApolloAuto/apollo</url> | ||
| <url type="bugtracker">https://github.com/ApolloAuto/apollo/issues</url> | ||
|
|
||
| <type>module</type> | ||
| <src_path>//modules/cyber_recorder_gui_simple</src_path> | ||
| <builder>bazel</builder> | ||
|
|
||
| <!--<depend type="binary" repo_name="cyber">cyber</depend>--> | ||
| <depend type="binary" repo_name="common" lib_names="common">common</depend> | ||
| <depend type="binary" repo_name="common-msgs" lib_names="common-msgs">common-msgs</depend> |
Comment on lines
+292
to
+294
| Reset(); | ||
| producer_->Reset(process_time); | ||
| Start(); |
| <dag_conf></dag_conf> | ||
| <type>binary</type> | ||
| <process_name> | ||
| bazel-bin/modules/cyber_recorder_gui_simple/cyber_recorder_gui_simple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds the new
cyber_recorder_gui_simplemodule.The module provides a lightweight Qt-based GUI tool for Apollo Cyber record playback. It supports selecting a single record file or a directory of record files, displaying record metadata, and controlling playback through a simple interface with play, pause, resume, stop, and progress navigation.
Why is this needed?
A simple graphical record playback tool makes local debugging and validation easier, especially when developers need to quickly inspect and replay Cyber record data without relying only on command-line workflows.
This module helps users load recorded data, review basic record information, and replay messages through Cyber channels for downstream module testing and troubleshooting.
How was it tested?
Performed standard local testing and verified that:
Additional notes
This change adds a new standalone module under
modules/cyber_recorder_gui_simple. It does not modify existing external interfaces, record file formats, or other module workflows.