From 61e46206a410ce5f9fcd7383fc24fd237d933964 Mon Sep 17 00:00:00 2001 From: Denis Sokolov Date: Thu, 11 Apr 2024 00:29:39 +0500 Subject: [PATCH] fix formating Signed-off-by: Sokolov Denis Signed-off-by: Denis Sokolov --- .../src/critics/velocity_deadband_critic.cpp | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/nav2_mppi_controller/src/critics/velocity_deadband_critic.cpp b/nav2_mppi_controller/src/critics/velocity_deadband_critic.cpp index 27a7facc81d..e5e6ef66331 100644 --- a/nav2_mppi_controller/src/critics/velocity_deadband_critic.cpp +++ b/nav2_mppi_controller/src/critics/velocity_deadband_critic.cpp @@ -29,13 +29,13 @@ void VelocityDeadbandCritic::initialize() getParam(deadband_velocities, "deadband_velocities", std::vector{0.0, 0.0, 0.0}); std::transform( deadband_velocities.begin(), deadband_velocities.end(), deadband_velocities_.begin(), - [](double d) { return static_cast(d); }); + [](double d) {return static_cast(d);}); RCLCPP_INFO_STREAM( logger_, "VelocityDeadbandCritic instantiated with " - << power_ << " power, " << weight_ << " weight, deadband_velocity [" - << deadband_velocities_.at(0) << "," << deadband_velocities_.at(1) << "," - << deadband_velocities_.at(2) << "]"); + << power_ << " power, " << weight_ << " weight, deadband_velocity [" + << deadband_velocities_.at(0) << "," << deadband_velocities_.at(1) << "," + << deadband_velocities_.at(2) << "]"); } void VelocityDeadbandCritic::score(CriticData & data) @@ -58,19 +58,19 @@ void VelocityDeadbandCritic::score(CriticData & data) xt::maximum(fabs(deadband_velocities_.at(0)) - xt::fabs(vx), 0) + xt::maximum(fabs(deadband_velocities_.at(1)) - xt::fabs(vy), 0) + xt::maximum(fabs(deadband_velocities_.at(2)) - xt::fabs(wz), 0)) * - data.model_dt, + data.model_dt, {1}, immediate) * - weight_, + weight_, power_); } else { data.costs += xt::sum( - (std::move( - xt::maximum(fabs(deadband_velocities_.at(0)) - xt::fabs(vx), 0) + - xt::maximum(fabs(deadband_velocities_.at(1)) - xt::fabs(vy), 0) + - xt::maximum(fabs(deadband_velocities_.at(2)) - xt::fabs(wz), 0))) * - data.model_dt, - {1}, immediate) * - weight_; + (std::move( + xt::maximum(fabs(deadband_velocities_.at(0)) - xt::fabs(vx), 0) + + xt::maximum(fabs(deadband_velocities_.at(1)) - xt::fabs(vy), 0) + + xt::maximum(fabs(deadband_velocities_.at(2)) - xt::fabs(wz), 0))) * + data.model_dt, + {1}, immediate) * + weight_; } return; } @@ -81,18 +81,18 @@ void VelocityDeadbandCritic::score(CriticData & data) std::move( xt::maximum(fabs(deadband_velocities_.at(0)) - xt::fabs(vx), 0) + xt::maximum(fabs(deadband_velocities_.at(2)) - xt::fabs(wz), 0)) * - data.model_dt, + data.model_dt, {1}, immediate) * - weight_, + weight_, power_); } else { data.costs += xt::sum( - (std::move( - xt::maximum(fabs(deadband_velocities_.at(0)) - xt::fabs(vx), 0) + - xt::maximum(fabs(deadband_velocities_.at(2)) - xt::fabs(wz), 0))) * - data.model_dt, - {1}, immediate) * - weight_; + (std::move( + xt::maximum(fabs(deadband_velocities_.at(0)) - xt::fabs(vx), 0) + + xt::maximum(fabs(deadband_velocities_.at(2)) - xt::fabs(wz), 0))) * + data.model_dt, + {1}, immediate) * + weight_; } return; }