mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 12:07:46 +08:00
fix: harden timestamp CSV logger lifecycle and synced IMU setup
This commit is contained in:
@@ -820,11 +820,6 @@ void OBCameraNode::clean() noexcept {
|
||||
is_running_.store(false);
|
||||
is_camera_node_initialized_.store(false);
|
||||
|
||||
if (timestamp_csv_logger_) {
|
||||
timestamp_csv_logger_->shutdown();
|
||||
timestamp_csv_logger_.reset();
|
||||
}
|
||||
|
||||
// Stop diagnostic timer and updater first BEFORE acquiring device_lock to prevent deadlock
|
||||
try {
|
||||
if (diagnostic_timer_) {
|
||||
@@ -884,6 +879,11 @@ void OBCameraNode::clean() noexcept {
|
||||
RCLCPP_DEBUG_STREAM(logger_, "Exception while stopping streams");
|
||||
}
|
||||
|
||||
if (timestamp_csv_logger_) {
|
||||
timestamp_csv_logger_->shutdown();
|
||||
timestamp_csv_logger_.reset();
|
||||
}
|
||||
|
||||
// Clean up d2c_viewer_ before cleaning buffers
|
||||
RCLCPP_DEBUG_STREAM(logger_, "Clean d2c_viewer");
|
||||
try {
|
||||
|
||||
@@ -30,7 +30,7 @@ TimestampCsvLogger::TimestampCsvLogger(Config config, rclcpp::Logger logger)
|
||||
}
|
||||
}
|
||||
|
||||
if (config.csv_file_path.empty() || (!config.accel_enabled && !config.gyro_enabled)) {
|
||||
if (config.csv_file_path.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user