Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Code Style On position-assignment #2216

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rj_constants/include/rj_constants/topic_names.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ constexpr auto kMotionControlParamModule = "motion_control";

namespace radio::topics {

constexpr auto kAliveRobotsTopic {"radio/alive_robots"};
constexpr auto kAliveRobotsTopic{"radio/alive_robots"};

static inline std::string robot_status_topic(int robot_id) {
return "radio/robot_status/robot_" + std::to_string(robot_id);
Expand Down
4 changes: 2 additions & 2 deletions soccer/src/soccer/radio/sim_radio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ SimRadio::SimRadio(bool blue_team)
for (uint8_t robot_id = 0; robot_id < 6; robot_id++) {
alive_robots_[robot_id] = true;
}
alive_robots_pub_ = this->create_publisher<rj_msgs::msg::AliveRobots>(
topics::kAliveRobotsTopic, rclcpp::QoS(1));
alive_robots_pub_ = this->create_publisher<rj_msgs::msg::AliveRobots>(topics::kAliveRobotsTopic,
rclcpp::QoS(1));

alive_robots_timer_ = create_wall_timer(std::chrono::milliseconds(500), [this]() {
rj_msgs::msg::AliveRobots alive_message{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ std::optional<RobotIntent> RobotFactoryPosition::get_task(WorldState& world_stat
// Assigning new position
// Checking whether we have possesion or if the ball is on their half (using 1.99 to avoid
// rounding issues on midline)
if (our_possession_ ||
world_state.ball.position.y() > field_dimensions.length() / 1.99) {
if (our_possession_ || world_state.ball.position.y() > field_dimensions.length() / 1.99) {
// Offensive mode
// Closest 2 robots on defense, rest on offense
if (i <= 1) {
Expand Down