Skip to content

Commit

Permalink
fix formating
Browse files Browse the repository at this point in the history
Signed-off-by: Sokolov Denis <[email protected]>

Signed-off-by: Denis Sokolov <[email protected]>
  • Loading branch information
denis-robotics committed Apr 10, 2024
1 parent ded80a6 commit 61e4620
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions nav2_mppi_controller/src/critics/velocity_deadband_critic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ void VelocityDeadbandCritic::initialize()
getParam(deadband_velocities, "deadband_velocities", std::vector<double>{0.0, 0.0, 0.0});
std::transform(
deadband_velocities.begin(), deadband_velocities.end(), deadband_velocities_.begin(),
[](double d) { return static_cast<float>(d); });
[](double d) {return static_cast<float>(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)
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 61e4620

Please sign in to comment.