Skip to content

Add Cyber Recorder Gui Simple#15795

Open
1012327963 wants to merge 1 commit into
ApolloAuto:masterfrom
1012327963:add-cyber-recorder-gui-simple
Open

Add Cyber Recorder Gui Simple#15795
1012327963 wants to merge 1 commit into
ApolloAuto:masterfrom
1012327963:add-cyber-recorder-gui-simple

Conversation

@1012327963
Copy link
Copy Markdown
Contributor

What does this PR do?

This PR adds the new cyber_recorder_gui_simple module.

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:

  • The new module builds successfully.
  • The GUI can be launched normally.
  • Single record files can be selected and loaded.
  • Record directories can be selected and loaded.
  • Record metadata is displayed correctly.
  • Playback controls such as play, pause, resume, stop, and progress navigation work as expected.
  • No negative impact was observed on existing logic.

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.

Copilot AI review requested due to automatic review settings May 22, 2026 13:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants