Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Feb 1, 2025
1 parent 115bf6d commit 8e48f8e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion crane_robot_skills/src/attacker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ Attacker::Attacker(RobotCommandWrapperBase::SharedPtr & base)
double x_diff_with_their_goal =
std::abs(world_model()->getTheirGoalCenter().x() - world_model()->ball.pos.x());
return robot()->getDistance(world_model()->ball.pos) < 1.0 &&
x_diff_with_their_goal >= world_model()->field_size.x() * 0.5 && not world_model()->ball.isMoving(1.0);
x_diff_with_their_goal >= world_model()->field_size.x() * 0.5 &&
not world_model()->ball.isMoving(1.0);
});

addTransition(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AttackerSkillPlanner : public PlannerBase
if (world_model->ball.isMoving()) {
{
SvgPolyLineBuilder polyline_builder;
for (auto [point, distance]: world_model->getBallSequence(2.0, 0.1)) {
for (auto [point, distance] : world_model->getBallSequence(2.0, 0.1)) {
polyline_builder.addPoint(point);
}
polyline_builder.stroke("orange", 0.3).strokeWidth(100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ struct WorldModelWrapper
std::shared_ptr<RobotInfo> robot;
};

[[nodiscard]] auto getBallSequence(double t_horizon, double t_step) -> std::vector<std::pair<Point, double>>;
[[nodiscard]] auto getBallSequence(double t_horizon, double t_step)
-> std::vector<std::pair<Point, double>>;

[[nodiscard]] auto getBallSlackTime(
double time, const RobotList & robots, const double max_acc, const double max_vel)
Expand Down
3 changes: 2 additions & 1 deletion utility/crane_msg_wrappers/src/world_model_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ auto WorldModelWrapper::getMinMaxSlackInterceptPoint(
return {min_intercept_point, max_intercept_point};
}

auto WorldModelWrapper::getBallSequence(double t_horizon, double t_step) -> std::vector<std::pair<Point, double>>
auto WorldModelWrapper::getBallSequence(double t_horizon, double t_step)
-> std::vector<std::pair<Point, double>>
{
std::vector<double> t_ball_sequence = generateSequence(0.0, t_horizon, t_step);
std::vector<std::pair<Point, double>> ball_sequence;
Expand Down

0 comments on commit 8e48f8e

Please sign in to comment.