diff --git a/project_guideline/audio/BUILD b/project_guideline/audio/BUILD index 8123337..e12b7c6 100644 --- a/project_guideline/audio/BUILD +++ b/project_guideline/audio/BUILD @@ -151,6 +151,8 @@ cc_library( "//project_guideline/audio/assets:legacy_v4_2_warning_embed", "//project_guideline/audio/assets:legacy_warning_embed", "//project_guideline/audio/assets:obstacle_embed", + "//project_guideline/audio/assets:turn_embed", + "//project_guideline/audio/assets:turn_fast_embed", "//project_guideline/audio/assets:warning_pitch_shift_2x_embed", "//project_guideline/environment:control_signal", "//project_guideline/logging:guideline_logger", diff --git a/project_guideline/audio/assets/BUILD b/project_guideline/audio/assets/BUILD index a5ab494..3acea53 100644 --- a/project_guideline/audio/assets/BUILD +++ b/project_guideline/audio/assets/BUILD @@ -45,6 +45,8 @@ ALL_OGG_ASSETS = [ "steering_on_course_impulse_tick", "stopstopstop", "straight", + "turn", + "turn_fast", "warning_pitch_shift_2x", ] diff --git a/project_guideline/audio/assets/turn.ogg b/project_guideline/audio/assets/turn.ogg new file mode 100644 index 0000000..107f22d Binary files /dev/null and b/project_guideline/audio/assets/turn.ogg differ diff --git a/project_guideline/audio/assets/turn_fast.ogg b/project_guideline/audio/assets/turn_fast.ogg new file mode 100644 index 0000000..41ee34a Binary files /dev/null and b/project_guideline/audio/assets/turn_fast.ogg differ diff --git a/project_guideline/audio/legacy_sound_pack.cc b/project_guideline/audio/legacy_sound_pack.cc index e769229..6af42d7 100644 --- a/project_guideline/audio/legacy_sound_pack.cc +++ b/project_guideline/audio/legacy_sound_pack.cc @@ -14,6 +14,7 @@ #include "project_guideline/audio/legacy_sound_pack.h" +#include #include #include #include @@ -33,6 +34,8 @@ #include "project_guideline/audio/assets/legacy_v4_2_warning_embed.h" #include "project_guideline/audio/assets/legacy_warning_embed.h" #include "project_guideline/audio/assets/obstacle_embed.h" +#include "project_guideline/audio/assets/turn_embed.h" +#include "project_guideline/audio/assets/turn_fast_embed.h" #include "project_guideline/audio/assets/warning_pitch_shift_2x_embed.h" #include "project_guideline/audio/sound_player.h" #include "project_guideline/logging/guideline_logger.h" @@ -63,6 +66,15 @@ static PanningStrategy LinearThresholdPan(float threshold) { }; } +static PanningStrategy LegacyThresholdPan(float threshold, bool reversed) { + return [threshold, reversed](float input, float& left, float& right) { + float l = util::ClampedLerp(input, threshold, 1, 0, 1); + float r = util::ClampedLerp(input, -1, -threshold, 1, 0); + left = reversed ? r : l; + right = reversed ? l : r; + }; +} + float ApplyShaping(float x, float sensitivity_curve) { if (sensitivity_curve == 0) { return x; @@ -151,12 +163,26 @@ absl::Status LegacySoundPack::Initialize() { CHECK(steering_sound_toc); CHECK(warning_sound_toc); + const util::EmbeddedFileToc* curve_sound_toc = nullptr; + if (options_.use_fast_curve_sound()) { + curve_sound_toc = turn_fast_embed_create(); + } else { + curve_sound_toc = turn_embed_create(); + } + curve_panner_ = LegacyThresholdPan(options_.turn_sensitivity(), false); + curve_rate_strategy_ = [](float input) { return 1; }; + + CHECK(curve_sound_toc); + GL_ASSIGN_OR_RETURN(steering_sound_, sound_player_->LoadStereoSound(steering_sound_toc)); sound_player_->SetLoop(steering_sound_, true); GL_ASSIGN_OR_RETURN(warning_sound_, sound_player_->LoadStereoSound(warning_sound_toc)); sound_player_->SetLoop(warning_sound_, true); + GL_ASSIGN_OR_RETURN(curve_sound_, + sound_player_->LoadStereoSound(curve_sound_toc)); + sound_player_->SetLoop(curve_sound_, true); GL_ASSIGN_OR_RETURN(obstacle_sound_, sound_player_->LoadStereoSound(obstacle_embed_create())); sound_player_->SetLoop(obstacle_sound_, true); @@ -209,6 +235,21 @@ void LegacySoundPack::OnControlSignal( sound_player_->SetPlaybackRate(warning_sound_, warning_rate_strategy_(warning_position)); sound_player_->Play(warning_sound_); + + float curve_panning_position = 0; + curve_panning_position = util::ClampedLerp( + signal.rotation_movement_ahead_degrees, -options_.max_rotation_degrees(), + options_.max_rotation_degrees(), -1, 1); + float curve_left_volume = 0; + float curve_right_volume = 0; + curve_panning_position = + ApplyShaping(curve_panning_position, options_.sensitivity_curvature()); + curve_panner_(curve_panning_position, curve_left_volume, curve_right_volume); + sound_player_->SetStereoVolume(curve_sound_, curve_left_volume, + curve_right_volume); + sound_player_->SetPlaybackRate(curve_sound_, + curve_rate_strategy_(curve_panning_position)); + sound_player_->Play(curve_sound_); } std::optional diff --git a/project_guideline/audio/legacy_sound_pack.h b/project_guideline/audio/legacy_sound_pack.h index f09557d..baef15f 100644 --- a/project_guideline/audio/legacy_sound_pack.h +++ b/project_guideline/audio/legacy_sound_pack.h @@ -63,11 +63,14 @@ class LegacySoundPack : public SoundPack { PanningStrategy steering_panner_ = nullptr; PanningStrategy warning_panner_ = nullptr; + PanningStrategy curve_panner_ = nullptr; RateStrategy steering_rate_strategy_ = nullptr; RateStrategy warning_rate_strategy_ = nullptr; + RateStrategy curve_rate_strategy_ = nullptr; SoundId steering_sound_; SoundId warning_sound_; + SoundId curve_sound_; SoundId obstacle_sound_; }; diff --git a/project_guideline/environment/control_signal.h b/project_guideline/environment/control_signal.h index 60a85e1..a047203 100644 --- a/project_guideline/environment/control_signal.h +++ b/project_guideline/environment/control_signal.h @@ -38,6 +38,10 @@ struct ControlSignal { // upcoming line. float rotation_movement_degrees = 0.; + // Desired user rotational movement based on user position, direction of + // upcoming line and ahead distance omitted. + float rotation_movement_ahead_degrees = 0.; + // World coordinates of an upcoming turn point, if any. std::optional turn_point = std::nullopt; diff --git a/project_guideline/environment/path_planning.cc b/project_guideline/environment/path_planning.cc index 35bbf6f..fdf2545 100644 --- a/project_guideline/environment/path_planning.cc +++ b/project_guideline/environment/path_planning.cc @@ -280,6 +280,21 @@ RotationMovementOutput SimpleControlSystem::ComputeRotationalMovement( return RotationMovementOutput(rotation_movement_degrees, all_rotations, num_guideline_points_per_segment); } +RotationMovementOutput +SimpleControlSystem::ComputeRotationalMovementWithLookAhead( + const Vector3d& human_direction, + absl::Span guideline_points, + int closest_guideline_point_indx, float rotational_movement_ahead_meter, + const Axis3 vertical_axis) { + auto indices_skip = + static_cast(rotational_movement_ahead_meter * + options_.num_guideline_points_per_meter()); + auto closest_guideline_point_indx_offset = + closest_guideline_point_indx + indices_skip; + return ComputeRotationalMovement(human_direction, guideline_points, + closest_guideline_point_indx_offset, + vertical_axis); +} TurnPointOutput SimpleControlSystem::FindTurnPoint( const Vector3d& human_position, absl::Span guideline_points, @@ -447,6 +462,10 @@ ControlSignal SimpleControlSystem::GenerateControlSignal( auto rotational_movement = ComputeRotationalMovement( human_direction, guideline_points, lateral_movement.closest_guideline_point_indx, vertical_axis); + auto rotational_movement_ahead = ComputeRotationalMovementWithLookAhead( + human_direction, guideline_points, + lateral_movement.closest_guideline_point_indx, + options_.rotational_movement_ahead_meters(), vertical_axis); auto turn_point = FindTurnPoint( human_position, guideline_points, lateral_movement.closest_guideline_point_indx, @@ -458,6 +477,8 @@ ControlSignal SimpleControlSystem::GenerateControlSignal( lateral_movement.lateral_movement_meters; current_control_signal.rotation_movement_degrees = rotational_movement.rotation_movement_degrees; + current_control_signal.rotation_movement_ahead_degrees = + rotational_movement_ahead.rotation_movement_degrees; current_control_signal.turn_point = turn_point.turn_point; current_control_signal.turn_angle_degrees = turn_point.turn_angle_degrees; current_control_signal.turn_point_distance_meters = diff --git a/project_guideline/environment/path_planning.h b/project_guideline/environment/path_planning.h index 59bca30..44d7665 100644 --- a/project_guideline/environment/path_planning.h +++ b/project_guideline/environment/path_planning.h @@ -137,6 +137,11 @@ class SimpleControlSystem : public ControlSystem { const ::Eigen::Vector3d& human_direction, absl::Span guideline_points, int closest_guideline_point_indx, util::Axis3 vertical_axis); + RotationMovementOutput ComputeRotationalMovementWithLookAhead( + const ::Eigen::Vector3d& human_direction, + absl::Span guideline_points, + int closest_guideline_point_indx, float rotational_movement_ahead_meter, + util::Axis3 vertical_axis); TurnPointOutput FindTurnPoint( const ::Eigen::Vector3d& human_position, absl::Span guideline_points, diff --git a/project_guideline/logging/BUILD b/project_guideline/logging/BUILD index 2020df0..ac298c7 100644 --- a/project_guideline/logging/BUILD +++ b/project_guideline/logging/BUILD @@ -80,3 +80,36 @@ cc_library( "@com_google_absl//absl/status", ], ) + +cc_library( + name = "debug_signal", + hdrs = ["debug_signal.h"], + visibility = ["//visibility:public"], +) + +cc_library( + name = "debug_signal_provider", + srcs = ["debug_signal_provider.cc"], + hdrs = ["debug_signal_provider.h"], + visibility = [ + "//visibility:public", + ], + deps = [ + ":debug_signal", + "//project_guideline/camera:camera_model", + "//project_guideline/environment:control_signal", + "//project_guideline/motion:tracking_feature", + "//project_guideline/proto:guideline_engine_config_cc_proto", + "//project_guideline/util:image", + "//project_guideline/util:transformation", + "@com_google_absl//absl/functional:bind_front", + "@com_google_absl//absl/log", + "@com_google_absl//absl/log:check", + "@com_google_absl//absl/memory", + "@com_google_absl//absl/status", + "@com_google_absl//absl/status:statusor", + "@com_google_absl//absl/synchronization", + "@com_google_absl//absl/time", + "@eigen_archive//:eigen3", + ], +) diff --git a/project_guideline/logging/debug_signal.h b/project_guideline/logging/debug_signal.h new file mode 100644 index 0000000..3bcdef7 --- /dev/null +++ b/project_guideline/logging/debug_signal.h @@ -0,0 +1,31 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef PROJECT_GUIDELINE_LOGGING_DEBUG_SIGNAL_H_ +#define PROJECT_GUIDELINE_LOGGING_DEBUG_SIGNAL_H_ + +#include +namespace guideline::logging { +struct DebugSignal { + bool tracking; + int64_t camera_pose_fps; + int64_t camera_pose_lagging_frame; + int64_t detection_fps; + int64_t detection_lagging_frame; + int64_t tracking_features_fps; + int64_t tracking_features_lagging_frame; +}; +} // namespace guideline::logging + +#endif // PROJECT_GUIDELINE_LOGGING_DEBUG_SIGNAL_H_ diff --git a/project_guideline/logging/debug_signal_provider.cc b/project_guideline/logging/debug_signal_provider.cc new file mode 100644 index 0000000..2e8ae03 --- /dev/null +++ b/project_guideline/logging/debug_signal_provider.cc @@ -0,0 +1,198 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "project_guideline/logging/debug_signal_provider.h" + + +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/memory/memory.h" +#include "absl/status/status.h" +#include "absl/synchronization/mutex.h" +#include "absl/time/clock.h" +#include "absl/time/time.h" +#include "Eigen/Core" +#include "project_guideline/camera/camera_model.h" +#include "project_guideline/environment/control_signal.h" +#include "project_guideline/logging/debug_signal.h" +#include "project_guideline/motion/tracking_feature.h" +#include "project_guideline/proto/guideline_engine_config.pb.h" +#include "project_guideline/util/image.h" +#include "project_guideline/util/transformation.h" + +namespace guideline::logging { + +absl::StatusOr> +DebugSignalProvider::Create(const DebugSignalProviderOptions& options) { + return absl::WrapUnique(new DebugSignalProvider(options)); +} + +DebugSignalProvider::DebugSignalProvider( + const DebugSignalProviderOptions& options) + : options_(options) {} + +DebugSignalProvider::~DebugSignalProvider() { + // if (shouter_thread_) { + // auto status = Stop(); + // if (!status.ok()) { + // LOG(ERROR) << "Shouter thread failed to stop: " << status; + // } + // } +} + +absl::Status DebugSignalProvider::Start() { + // CHECK(shouter_thread_ == nullptr) << "Shouter thread is already started."; + // if (options_.enable_data_shouting()) { + // running_ = true; + // shouter_thread_ = std::make_unique( + // absl::bind_front(&DataGuidelineShouter::RunShouter, this)); + // } + return absl::OkStatus(); +} + +absl::Status DebugSignalProvider::Stop() { + // CHECK(shouter_thread_) << "Shouter thread is already stopped."; + // running_ = false; + // shouter_thread_->join(); + // shouter_thread_ = nullptr; + return absl::OkStatus(); +} + +void DebugSignalProvider::RunDebugSignalProvider() { + while (running_) { + auto timestamp = absl::Now(); + if ((timestamp - last_debug_timestamp) >= + absl::Milliseconds(DEBUG_PERIOD_MS)) { + NotifyDebugSignalCallbacks(); + last_debug_timestamp = timestamp; + } + } +} + +void DebugSignalProvider::OnCameraPose( + int64_t timestamp_us, const util::Transformation& world_t_camera, + std::shared_ptr camera_model) { + { + absl::MutexLock lock(&camera_pose_mutex_); + if (timestamp_us - last_camera_pose_timestamp_us_ < pow(10, 6)) { + camera_pose_update_count_++; + } else { + current_camera_pose_fps_ = camera_pose_update_count_; + last_camera_pose_timestamp_us_ = timestamp_us; + camera_pose_update_count_ = 0; + } + camera_pose_lag_count_ = 0; + } +} + +void DebugSignalProvider::OnDetection( + int64_t timestamp_us, const std::vector& keypoints, + std::shared_ptr guideline_mask, + std::shared_ptr depth_map) { + { + absl::MutexLock lock(&detection_mutex_); + if (timestamp_us - last_detection_timestamp_us_ < pow(10, 6)) { + detection_update_count_++; + } else { + current_detection_fps_ = detection_update_count_; + last_detection_timestamp_us_ = timestamp_us; + detection_update_count_ = 0; + } + detection_lag_count_ = 0; + } + NotifyDebugSignalCallbacks(); +} + +void DebugSignalProvider::OnControlSignal( + const environment::ControlSignal& control_signal) {} + +void DebugSignalProvider::OnGuideline( + const std::vector& guideline) { + { + absl::MutexLock lock(&guideline_mutex_); + guideline_count_ = guideline.size(); + } +} + +void DebugSignalProvider::OnTrackingStateChanged(bool is_tracking) { + { + absl::MutexLock lock(&tracking_state_changed_mutex_); + tracking_ = is_tracking; + } +} + +void DebugSignalProvider::OnTrackingFeatures( + int64_t timestamp_us, + const std::vector& features) { + { + absl::MutexLock lock(&tracking_features_mutex_); + if (timestamp_us - last_tracking_features_timestamp_us_ < 1000000) { + tracking_features_update_count_++; + } else { + current_tracking_features_fps_ = tracking_features_update_count_; + last_tracking_features_timestamp_us_ = timestamp_us; + tracking_features_update_count_ = 0; + } + tracking_features_lag_count_ = 0; + } +} + +void DebugSignalProvider::AddDebugSignalCallback( + const DebugSignalCallback& debug_signal_callback) { + { + absl::MutexLock lock(&debug_signal_callbacks_mutex_); + debug_signal_callbacks_.push_back(debug_signal_callback); + } +} + +void DebugSignalProvider::NotifyDebugSignalCallbacks() { + if (!options_.enable_debug_signal_provider()) { + return; + } + DebugSignal debug_signal; + { + absl::MutexLock lock(&camera_pose_mutex_); + debug_signal.camera_pose_fps = current_camera_pose_fps_; + debug_signal.camera_pose_lagging_frame = camera_pose_lag_count_; + camera_pose_lag_count_++; + } + { + absl::MutexLock lock(&detection_mutex_); + debug_signal.detection_fps = current_detection_fps_; + debug_signal.detection_lagging_frame = detection_lag_count_; + detection_lag_count_++; + } + { + absl::MutexLock lock(&tracking_features_mutex_); + debug_signal.tracking_features_fps = current_tracking_features_fps_; + debug_signal.tracking_features_lagging_frame = tracking_features_lag_count_; + tracking_features_lag_count_++; + } + { + absl::MutexLock lock(&tracking_state_changed_mutex_); + debug_signal.tracking = tracking_; + } + { + absl::MutexLock lock(&debug_signal_callbacks_mutex_); + for (const auto& callback : debug_signal_callbacks_) { + callback(debug_signal); + } + } +} +} // namespace guideline::logging diff --git a/project_guideline/logging/debug_signal_provider.h b/project_guideline/logging/debug_signal_provider.h new file mode 100644 index 0000000..4d38d97 --- /dev/null +++ b/project_guideline/logging/debug_signal_provider.h @@ -0,0 +1,119 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef PROJECT_GUIDELINE_LOGGING_DEBUG_SIGNAL_PROVIDER_H_ +#define PROJECT_GUIDELINE_LOGGING_DEBUG_SIGNAL_PROVIDER_H_ + +#include +#include +#include +#include +#include + +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/synchronization/mutex.h" +#include "absl/time/clock.h" +#include "absl/time/time.h" +#include "Eigen/Core" +#include "project_guideline/camera/camera_model.h" +#include "project_guideline/environment/control_signal.h" +#include "project_guideline/logging/debug_signal.h" +#include "project_guideline/motion/tracking_feature.h" +#include "project_guideline/proto/guideline_engine_config.pb.h" +#include "project_guideline/util/image.h" +#include "project_guideline/util/transformation.h" + +namespace guideline::logging { + +class DebugSignalProvider { + public: + using DebugSignalCallback = + std::function; + static absl::StatusOr> Create( + const DebugSignalProviderOptions& options); + + DebugSignalProvider& operator=(const DebugSignalProvider&) = delete; + ~DebugSignalProvider(); + + void OnCameraPose(int64_t timestamp_us, + const util::Transformation& world_t_camera, + std::shared_ptr camera_model); + void OnDetection(int64_t timestamp_us, + const std::vector& keypoints, + std::shared_ptr guideline_mask, + std::shared_ptr depth_map); + + void OnControlSignal(const environment::ControlSignal& control_signal); + void OnGuideline(const std::vector& guideline); + void OnTrackingStateChanged(bool is_tracking); + void OnTrackingFeatures(int64_t timestamp_us, + const std::vector& features); + + void AddDebugSignalCallback(const DebugSignalCallback& debug_signal_callback) + ABSL_LOCKS_EXCLUDED(debug_signal_callbacks_mutex_); + + absl::Status Start(); + absl::Status Stop(); + + private: + explicit DebugSignalProvider(const DebugSignalProviderOptions& options); + void NotifyDebugSignalCallbacks() + ABSL_LOCKS_EXCLUDED(debug_signal_callbacks_mutex_); + void RunDebugSignalProvider(); + + private: + const DebugSignalProviderOptions options_; + absl::Mutex camera_pose_mutex_; + int64_t last_camera_pose_timestamp_us_ ABSL_GUARDED_BY(camera_pose_mutex_) = + 0; + int64_t camera_pose_update_count_ ABSL_GUARDED_BY(camera_pose_mutex_) = 0; + int64_t camera_pose_lag_count_ ABSL_GUARDED_BY(camera_pose_mutex_) = 0; + int64_t current_camera_pose_fps_ ABSL_GUARDED_BY(camera_pose_mutex_) = 0; + + absl::Mutex detection_mutex_; + int64_t last_detection_timestamp_us_ ABSL_GUARDED_BY(detection_mutex_) = 0; + int64_t detection_update_count_ ABSL_GUARDED_BY(detection_mutex_) = 0; + int64_t detection_lag_count_ ABSL_GUARDED_BY(detection_mutex_) = 0; + int64_t current_detection_fps_ ABSL_GUARDED_BY(detection_mutex_) = 0; + absl::Mutex tracking_features_mutex_; + int64_t last_tracking_features_timestamp_us_ + ABSL_GUARDED_BY(tracking_features_mutex_) = 0; + int64_t tracking_features_update_count_ + ABSL_GUARDED_BY(tracking_features_mutex_) = 0; + int64_t tracking_features_lag_count_ + ABSL_GUARDED_BY(tracking_features_mutex_) = 0; + int64_t current_tracking_features_fps_ + ABSL_GUARDED_BY(tracking_features_mutex_) = 0; + + absl::Mutex tracking_state_changed_mutex_; + bool tracking_ ABSL_GUARDED_BY(tracking_state_changed_mutex_) = false; + + absl::Mutex guideline_mutex_; + int64_t guideline_count_ ABSL_GUARDED_BY(guideline_mutex_) = 0; + + absl::Mutex debug_signal_callbacks_mutex_; + std::vector debug_signal_callbacks_ + ABSL_GUARDED_BY(debug_signal_callbacks_mutex_); + + std::atomic running_ = false; + std::unique_ptr debug_thread_; + + absl::Time last_debug_timestamp = absl::Now(); + + const int64_t DEBUG_PERIOD_MS = 500; +}; +} // namespace guideline::logging + +#endif // PROJECT_GUIDELINE_LOGGING_DEBUG_SIGNAL_PROVIDER_H_ diff --git a/project_guideline/proto/guideline_engine_config.proto b/project_guideline/proto/guideline_engine_config.proto index bd796cb..03f784e 100644 --- a/project_guideline/proto/guideline_engine_config.proto +++ b/project_guideline/proto/guideline_engine_config.proto @@ -25,7 +25,7 @@ option java_package = "com.google.research.guideline.proto"; option optimize_for = LITE_RUNTIME; // Configuration for the Guideline Engine. -// Next available index: 9 +// Next available index: 11 message GuidelineEngineConfig { message FileDescriptor { optional int32 fd = 1; @@ -59,6 +59,7 @@ message GuidelineEngineConfig { optional PointCloudOptions point_cloud_options = 7; optional AudioSystemOptions audio_system_options = 8; optional VisualizationOptions visualization_options = 9; + optional DebugSignalProviderOptions debug_signal_provider_options = 10; } message KeypointExtractorOptions { @@ -98,6 +99,9 @@ message LegacySoundPackOptions { optional float max_rotation_degrees = 2 [default = 45]; optional float sensitivity_curvature = 3 [default = 0.4]; optional float warning_threshold_meters = 4 [default = 1.5]; + optional bool enable_curve_sound = 5 [default = false]; + optional bool use_fast_curve_sound = 6 [default = false]; + optional float turn_sensitivity = 7 [default = 0.4]; } message PointCloudOptions { @@ -205,6 +209,7 @@ message SimpleControlSystemOptions { [default = 0]; optional float rotational_movement_abs_max_threshold_degrees = 10 [default = 90]; + optional float rotational_movement_ahead_meters = 16 [default = 3]; optional int32 max_history_to_keep = 11 [default = 300]; optional float min_turn_point_distance_meters = 12 [default = 2]; optional float track_width_meters = 13 [default = 3]; @@ -240,3 +245,7 @@ message VisualizationOptions { // Enable ML debug overlay showing segmentation mask and depth image results. optional bool enable_ml_overlay = 1; } + +message DebugSignalProviderOptions { + optional bool enable_debug_signal_provider = 1; +}