feat: rename frame timestamp CSV logging to frame drop logging and update related parameters

This commit is contained in:
slz
2026-06-05 14:07:23 +08:00
parent a43b358fea
commit 951e48e715
25 changed files with 97 additions and 105 deletions
@@ -20,7 +20,8 @@ namespace orbbec_camera {
class FrameTimestampCsvLogger {
public:
FrameTimestampCsvLogger(bool enabled, const std::string &csv_file_path, rclcpp::Logger logger);
FrameTimestampCsvLogger(bool drop_log_enabled, const std::string &csv_file_path,
rclcpp::Logger logger);
~FrameTimestampCsvLogger() noexcept;
@@ -120,7 +121,6 @@ class FrameTimestampCsvLogger {
int64_t arrival_steady_us, bool publish_expected);
void populatePublishData(StreamState &state, TrackedStream stream, int64_t publish_system_us,
int64_t publish_steady_us);
void reportDropLogFormatOnce();
std::optional<int64_t> updateDelta(std::optional<int64_t> &previous, int64_t current);
@@ -141,10 +141,11 @@ class FrameTimestampCsvLogger {
rclcpp::Logger logger_;
bool enabled_ = false;
bool csv_enabled_ = false;
bool drop_log_enabled_ = false;
std::atomic_bool shutdown_requested_{false};
bool writer_failed_ = false;
bool csv_writer_failed_ = false;
bool queue_warning_active_ = false;
bool drop_log_format_reported_ = false;
std::string csv_file_path_;
std::ofstream csv_stream_;
std::thread writer_thread_;
@@ -913,7 +913,7 @@ class OBCameraNode {
int min_depth_limit_ = 0;
int max_depth_limit_ = 0;
std::string time_domain_ = "global"; // device, system, global
bool enable_frame_timestamp_csv_ = false;
bool enable_frame_drop_log_ = false;
std::string frame_timestamp_csv_file_;
std::unique_ptr<FrameTimestampCsvLogger> frame_timestamp_csv_logger_;
std::string exposure_range_mode_;