Skip to content

Commit

Permalink
一部変更
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo committed Oct 16, 2024
1 parent 1c19aae commit c3bc744
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ uint32 TEAM_COLOR_BLUE = 2

# The robot number
uint32 id
# The team color
uint32 team_color
# The team
uint32 team
7 changes: 3 additions & 4 deletions crane_world_model_publisher/src/world_model_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,9 @@ void WorldModelPublisherComponent::visionDetectionsCallback(
}

for (const auto & robot : msg->robots) {
int team_index =
(robot.robot_id.team_color == robocup_ssl_msgs::msg::RobotId::TEAM_COLOR_YELLOW)
? static_cast<int>(Color::YELLOW)
: static_cast<int>(Color::BLUE);
int team_index = (robot.robot_id.team == robocup_ssl_msgs::msg::RobotId::TEAM_COLOR_YELLOW)
? static_cast<int>(Color::YELLOW)
: static_cast<int>(Color::BLUE);

auto & each_robot_info = robot_info[team_index].at(robot.robot_id.id);
if (not robot.visibility.empty()) {
Expand Down

0 comments on commit c3bc744

Please sign in to comment.