diff --git a/husarion_ugv_lights/config/lights_controller_parameters.yaml b/husarion_ugv_lights/config/lights_controller_parameters.yaml index c4b90ab0..0994c7b4 100644 --- a/husarion_ugv_lights/config/lights_controller_parameters.yaml +++ b/husarion_ugv_lights/config/lights_controller_parameters.yaml @@ -2,7 +2,7 @@ lights_controller: animations_config_path: type: string default_value: "" - description: Path to a YAML file with a description of led configuration. This file includes definition of robot panels, virtual segments and default animations. + description: Path to a YAML file with a description of LED configuration. This file includes definition of robot panels, virtual segments and default animations. validation: { not_empty<> } controller_frequency: diff --git a/husarion_ugv_lights/src/lights_controller_node.cpp b/husarion_ugv_lights/src/lights_controller_node.cpp index e1d51224..9306ff0c 100644 --- a/husarion_ugv_lights/src/lights_controller_node.cpp +++ b/husarion_ugv_lights/src/lights_controller_node.cpp @@ -56,7 +56,7 @@ LightsControllerNode::LightsControllerNode(const rclcpp::NodeOptions & options) const auto animations_config_path = this->params_.animations_config_path; const auto user_led_animations_path = this->params_.user_led_animations_path; - const float controller_freq = this->params_.controller_frequency; + const float controller_freq = static_cast(this->params_.controller_frequency); YAML::Node led_config_desc = YAML::LoadFile(animations_config_path); diff --git a/husarion_ugv_manager/config/lights_manager_parameters.yaml b/husarion_ugv_manager/config/lights_manager_parameters.yaml index e60a404c..efe28cfd 100644 --- a/husarion_ugv_manager/config/lights_manager_parameters.yaml +++ b/husarion_ugv_manager/config/lights_manager_parameters.yaml @@ -10,51 +10,50 @@ lights_manager: critical: type: double default_value: 15.0 - description: Time in seconds to wait before repeating animation, indicating a critical Battery state. + description: Time in seconds to wait before repeating animation, indicating a critical battery state. validation: { gt<>: 0.0 } low: type: double default_value: 30.0 - description: Time in seconds to wait before repeating the animation, indicating a low Battery state. + description: Time in seconds to wait before repeating the animation, indicating a low battery state. validation: { gt<>: 0.0 } percent: window_len: type: int default_value: 6 - description: Moving average window length used to smooth out Battery percentage readings. + description: Moving average window length used to smooth out battery percentage readings. validation: { gt<>: 0 } threshold: critical: type: double default_value: 0.1 - description: If the Battery percentage drops below this value, an animation indicating a critical Battery state will start being displayed. + description: If the battery percentage drops below this value, an animation indicating a critical battery state will start being displayed. validation: { bounds<>: [0.0, 1.0] } low: type: double default_value: 0.4 - description: If the Battery percentage drops below this value, the animation indicating a low Battery state will start being displayed. + description: If the battery percentage drops below this value, the animation indicating a low battery state will start being displayed. validation: { bounds<>: [0.0, 1.0] } bt_project_path: type: string default_value: "" description: Path to a BehaviorTree project. - validation: { not_empty<> } plugin_libs: type: string_array default_value: [] - description: List with names of plugins that are used in the BT project. + description: A list with names of plugins that are used in the BehaviorTree project. ros_communication_timeout: availability: type: double default_value: 1.0 - description: Timeout in seconds to wait for a service/action while initializing BT node. + description: Timeout in seconds to wait for a service/action while initializing a BehaviorTree node. validation: { gt<>: 0.0 } response: @@ -66,7 +65,7 @@ lights_manager: ros_plugin_libs: type: string_array default_value: [] - description: List with names of ROS plugins that are used in a BT project. + description: A list with names of ROS plugins that are used in a BehaviorTree project. timer_frequency: type: double diff --git a/husarion_ugv_manager/config/safety_manager_parameters.yaml b/husarion_ugv_manager/config/safety_manager_parameters.yaml index 4010ee12..068a4d9d 100644 --- a/husarion_ugv_manager/config/safety_manager_parameters.yaml +++ b/husarion_ugv_manager/config/safety_manager_parameters.yaml @@ -11,7 +11,6 @@ safety_manager: type: string default_value: "" description: Path to a BehaviorTree project. - validation: { not_empty<> } cpu: temp: @@ -44,7 +43,7 @@ safety_manager: fan_on: type: double default_value: 45.0 - description: Temperature in degrees Celsius* of any drivers above which the fan is turned on. + description: Temperature in degrees Celsius of any drivers above which the fan is turned on. validation: { bounds<>: [-20.0, 100.0] } window_len: @@ -62,13 +61,13 @@ safety_manager: plugin_libs: type: string_array default_value: [] - description: List with names of plugins that are used in the BT project. + description: A list with names of plugins that are used in the a BehaviorTree project. ros_communication_timeout: availability: type: double default_value: 1.0 - description: Timeout seconds to wait for a service/action while initializing BT node. + description: Timeout seconds to wait for a service/action while initializing a BehaviorTree node. validation: { gt<>: 0.0 } response: @@ -80,7 +79,7 @@ safety_manager: ros_plugin_libs: type: string_array default_value: [] - description: List with names of ROS plugins that are used in a BT project. + description: A list with names of ROS plugins that are used in a BehaviorTree project. shutdown_hosts_path: type: string diff --git a/husarion_ugv_manager/src/lights_manager_node.cpp b/husarion_ugv_manager/src/lights_manager_node.cpp index 730cf9d8..4cdd5484 100644 --- a/husarion_ugv_manager/src/lights_manager_node.cpp +++ b/husarion_ugv_manager/src/lights_manager_node.cpp @@ -107,10 +107,11 @@ void LightsManagerNode::RegisterBehaviorTree() std::map LightsManagerNode::CreateLightsInitialBlackboard() { update_charging_anim_step_ = this->params_.battery.charging_anim_step; - const float critical_battery_anim_period = this->params_.battery.anim_period.critical; - const float critical_battery_threshold_percent = this->params_.battery.percent.threshold.critical; - const float low_battery_anim_period = this->params_.battery.anim_period.low; - const float low_battery_threshold_percent = this->params_.battery.percent.threshold.low; + const double critical_battery_anim_period = this->params_.battery.anim_period.critical; + const double critical_battery_threshold_percent = + this->params_.battery.percent.threshold.critical; + const double low_battery_anim_period = this->params_.battery.anim_period.low; + const double low_battery_threshold_percent = this->params_.battery.percent.threshold.low; const std::string undefined_charging_anim_percent = ""; const int undefined_anim_id = -1; diff --git a/husarion_ugv_manager/src/safety_manager_node.cpp b/husarion_ugv_manager/src/safety_manager_node.cpp index 56c69bfe..63965f4f 100644 --- a/husarion_ugv_manager/src/safety_manager_node.cpp +++ b/husarion_ugv_manager/src/safety_manager_node.cpp @@ -98,7 +98,7 @@ void SafetyManagerNode::Initialize() // Timers // ------------------------------- - const float timer_freq = this->params_.timer_frequency; + const double timer_freq = this->params_.timer_frequency; const auto timer_period_ms = std::chrono::milliseconds(static_cast(1.0f / timer_freq * 1000)); @@ -134,11 +134,11 @@ void SafetyManagerNode::RegisterBehaviorTree() std::map SafetyManagerNode::CreateSafetyInitialBlackboard() { - const float cpu_fan_on_temp = this->params_.cpu.temp.fan_on; - const float cpu_fan_off_temp = this->params_.cpu.temp.fan_off; - const float driver_fan_on_temp = this->params_.driver.temp.fan_on; - const float driver_fan_off_temp = this->params_.driver.temp.fan_off; - const float fan_turn_off_timeout = this->params_.fan_turn_off_timeout; + const double cpu_fan_on_temp = this->params_.cpu.temp.fan_on; + const double cpu_fan_off_temp = this->params_.cpu.temp.fan_off; + const double driver_fan_on_temp = this->params_.driver.temp.fan_on; + const double driver_fan_off_temp = this->params_.driver.temp.fan_off; + const double fan_turn_off_timeout = this->params_.fan_turn_off_timeout; const std::map safety_initial_bb = { {"CPU_FAN_OFF_TEMP", cpu_fan_off_temp},