diff --git a/crane_game_analyzer/include/crane_game_analyzer/kick_event_detector.hpp b/crane_game_analyzer/include/crane_game_analyzer/kick_event_detector.hpp index da4a171d0..7b8d92551 100644 --- a/crane_game_analyzer/include/crane_game_analyzer/kick_event_detector.hpp +++ b/crane_game_analyzer/include/crane_game_analyzer/kick_event_detector.hpp @@ -63,10 +63,8 @@ class KickEventDetector .radius(0.5) .stroke("blue") .fill("blue") - .strokeWidth(2); + .strokeWidth(20); visualizer->add(circle_builder.getSvgString()); - // visualizer->addCircle( - // world_model.getOurRobot(id)->pose.pos, 0.5, 2, "blue", "blue", 1.0, "KICK"); kick_event_origin.emplace(ros_clock.now(), world_model.ball.pos, RobotIdentifier{true, id}); } for (const auto & id : detected_bots.enemies) { @@ -75,10 +73,8 @@ class KickEventDetector .radius(0.5) .stroke("blue") .fill("blue") - .strokeWidth(2); + .strokeWidth(20); visualizer->add(circle_builder.getSvgString()); - // visualizer->addCircle( - // world_model.getTheirRobot(id)->pose.pos, 0.5, 2, "blue", "blue", 1.0, "KICK"); kick_event_origin.emplace(ros_clock.now(), world_model.ball.pos, RobotIdentifier{false, id}); } @@ -101,15 +97,7 @@ class KickEventDetector .stroke("red", 0.3) .strokeWidth(200); visualizer->add(line_builder.getSvgString()); - // visualizer->addTube( - // world_model.ball.pos, ongoing_kick_origin.value().position, - // 0.2, 2, "red", "", 1.0, "KICK"); } - - // キックの履歴を可視化 - // for (const auto & [kick_origin, kick_end] : kick_history) { - // visualizer->addLine(kick_origin.position, kick_end, 2, "red", 0.5, "KICK"); - // } } bool hasInterruptedOnGoingKick(const WorldModelWrapper & world_model) const diff --git a/crane_local_planner/include/crane_local_planner/simple_planner.hpp b/crane_local_planner/include/crane_local_planner/simple_planner.hpp index 6dc376ce1..159502c13 100644 --- a/crane_local_planner/include/crane_local_planner/simple_planner.hpp +++ b/crane_local_planner/include/crane_local_planner/simple_planner.hpp @@ -40,17 +40,13 @@ class SimplePlanner : public LocalPlannerBase for (auto & command : commands.robot_commands) { auto robot = world_model->getOurRobot(command.robot_id); if (not command.position_target_mode.empty()) { - // visualizer->addLine( - // robot->pose.pos.x(), robot->pose.pos.y(), - // command.position_target_mode.front().target_x, - // command.position_target_mode.front().target_y, 1); SvgLineBuilder line_builder; line_builder.start(robot->pose.pos) .end( command.position_target_mode.front().target_x, command.position_target_mode.front().target_y) .stroke("red") - .strokeWidth(2); + .strokeWidth(20); visualizer->add(line_builder.getSvgString()); } if (command.local_planner_config.max_velocity > MAX_VEL) { diff --git a/crane_local_planner/src/crane_local_planner.cpp b/crane_local_planner/src/crane_local_planner.cpp index da18d21d6..17cc995ae 100644 --- a/crane_local_planner/src/crane_local_planner.cpp +++ b/crane_local_planner/src/crane_local_planner.cpp @@ -66,7 +66,7 @@ void LocalPlannerComponent::callbackRobotCommands(const crane_msgs::msg::RobotCo raw_command.position_target_mode.front().target_x, raw_command.position_target_mode.front().target_y) .stroke("yellow", 0.3) - .strokeWidth(2); + .strokeWidth(20); planner->visualizer->add(line_builder.getSvgString()); } break; @@ -132,7 +132,7 @@ void LocalPlannerComponent::callbackRobotCommands(const crane_msgs::msg::RobotCo command.position_target_mode.front().target_x, command.position_target_mode.front().target_y) .stroke("yellow", 0.5) - .strokeWidth(1); + .strokeWidth(10); planner->visualizer->add(line_builder.getSvgString()); } break; case crane_msgs::msg::RobotCommand::SIMPLE_VELOCITY_TARGET_MODE: { @@ -147,7 +147,7 @@ void LocalPlannerComponent::callbackRobotCommands(const crane_msgs::msg::RobotCo robot->pose.pos.x() + command.simple_velocity_target_mode.front().target_vx * 0.5, robot->pose.pos.y() + command.simple_velocity_target_mode.front().target_vy * 0.5) .stroke("white", 0.5) - .strokeWidth(1); + .strokeWidth(10); planner->visualizer->add(line_builder.getSvgString()); } break; case crane_msgs::msg::RobotCommand::POLAR_VELOCITY_TARGET_MODE: { @@ -170,7 +170,7 @@ void LocalPlannerComponent::callbackRobotCommands(const crane_msgs::msg::RobotCo 0.5 * command.polar_velocity_target_mode.front().target_velocity_r * std::sin(command.polar_velocity_target_mode.front().target_velocity_theta)) .stroke("white", 0.5) - .strokeWidth(1); + .strokeWidth(10); planner->visualizer->add(line_builder.getSvgString()); } break; } diff --git a/crane_robot_skills/src/attacker.cpp b/crane_robot_skills/src/attacker.cpp index 04e419e0c..18ee5a14b 100644 --- a/crane_robot_skills/src/attacker.cpp +++ b/crane_robot_skills/src/attacker.cpp @@ -110,13 +110,12 @@ Attacker::Attacker(RobotCommandWrapperBase::SharedPtr & base) }); addStateFunction(AttackerState::STEAL_BALL, [this]() -> Status { - // visualizer->addCircle(robot()->pose.pos, 0.25, 1, "blue", "white", 1.0); SvgCircleBuilder circle_builder; circle_builder.center(world_model()->ball.pos) .radius(0.25) .stroke("blue") .fill("white") - .strokeWidth(1); + .strokeWidth(10); visualizer->add(circle_builder.getSvgString()); return steal_ball_skill.run(); @@ -278,9 +277,8 @@ Attacker::Attacker(RobotCommandWrapperBase::SharedPtr & base) auto our_robots = world_model()->ours.getAvailableRobots(robot()->id); const auto enemy_robots = world_model()->theirs.getAvailableRobots(); - // visualizer->addLine(world_model()->ball.pos, kick_target, 1, "red"); SvgLineBuilder line_builder; - line_builder.start(world_model()->ball.pos).end(kick_target).stroke("red").strokeWidth(1); + line_builder.start(world_model()->ball.pos).end(kick_target).stroke("red").strokeWidth(10); visualizer->add(line_builder.getSvgString()); kick_skill.setParameter("target", kick_target); diff --git a/crane_robot_skills/src/goal_kick.cpp b/crane_robot_skills/src/goal_kick.cpp index 3c8152d5d..24934914a 100644 --- a/crane_robot_skills/src/goal_kick.cpp +++ b/crane_robot_skills/src/goal_kick.cpp @@ -27,9 +27,8 @@ Status GoalKick::update() world_model()); Point target = world_model()->ball.pos + getNormVec(best_angle) * 0.5; - // visualizer->addLine(world_model()->ball.pos, target, 2, "red"); SvgLineBuilder line_builder; - line_builder.start(world_model()->ball.pos).end(target).stroke("red").strokeWidth(2); + line_builder.start(world_model()->ball.pos).end(target).stroke("red").strokeWidth(20); visualizer->add(line_builder.getSvgString()); kick_skill.setParameter("target", target); kick_skill.setParameter("dot_threshold", getParameter("dot_threshold")); diff --git a/crane_robot_skills/src/goalie.cpp b/crane_robot_skills/src/goalie.cpp index 8caf1204f..76a71c1ee 100644 --- a/crane_robot_skills/src/goalie.cpp +++ b/crane_robot_skills/src/goalie.cpp @@ -49,7 +49,6 @@ Status Goalie::update() } } - // visualizer->addPoint(robot()->pose.pos.x(), robot()->pose.pos.y(), 0, "white", 1., phase); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(phase) @@ -87,9 +86,8 @@ void Goalie::emitBallFromPenaltyArea() } }(); - // visualizer->addLine(ball, pass_target, 1, "blue"); SvgLineBuilder line_builder; - line_builder.start(ball).end(pass_target).stroke("blue").strokeWidth(1); + line_builder.start(ball).end(pass_target).stroke("blue").strokeWidth(10); visualizer->add(line_builder.getSvgString()); Point intermediate_point = ball + (ball - pass_target).normalized() * 0.2f; diff --git a/crane_robot_skills/src/kick.cpp b/crane_robot_skills/src/kick.cpp index 17d63120e..74b5b2d3e 100644 --- a/crane_robot_skills/src/kick.cpp +++ b/crane_robot_skills/src/kick.cpp @@ -35,7 +35,6 @@ Kick::Kick(RobotCommandWrapperBase::SharedPtr & base) receive_skill->setParameter("redirect_kick_power", 0.3); addStateFunction(KickState::ENTRY_POINT, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "", 1., "Kick::ENTRY_POINT"); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text("Kick::ENTRY_POINT") @@ -48,7 +47,6 @@ Kick::Kick(RobotCommandWrapperBase::SharedPtr & base) addTransition(KickState::ENTRY_POINT, KickState::AROUND_BALL_AND_KICK, [this]() { return true; }); addStateFunction(KickState::POSITIVE_REDIRECT_KICK, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "", 1., "Kick::POSITIVE_REDIRECT_KICK"); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text("Kick::POSITIVE_REDIRECT_KICK") @@ -89,7 +87,6 @@ Kick::Kick(RobotCommandWrapperBase::SharedPtr & base) }); addStateFunction(KickState::REDIRECT_KICK, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "", 1., "Kick::REDIRECT_KICK"); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text("Kick::REDIRECT_KICK") @@ -120,22 +117,19 @@ Kick::Kick(RobotCommandWrapperBase::SharedPtr & base) addStateFunction(KickState::AROUND_BALL_AND_KICK, [this]() { auto target = getParameter("target"); Point ball_pos = world_model()->ball.pos; - // visualizer->addLine(ball_pos, ball_pos + (target - ball_pos).normalized() * 1.0, 1, "blue"); SvgLineBuilder line_builder; line_builder.start(ball_pos) .end(ball_pos + (target - ball_pos).normalized() * 1.0) .stroke("blue") - .strokeWidth(1); + .strokeWidth(10); visualizer->add(line_builder.getSvgString()); constexpr double SWITCH_DISTANCE = 1.0; - // visualizer->addCircle(ball_pos, SWITCH_DISTANCE, 1, "yellow", "yellow", 0.); { SvgCircleBuilder circle_builder; - circle_builder.center(ball_pos).radius(SWITCH_DISTANCE).stroke("yellow").strokeWidth(1); + circle_builder.center(ball_pos).radius(SWITCH_DISTANCE).stroke("yellow").strokeWidth(10); visualizer->add(circle_builder.getSvgString()); } if (robot()->getDistance(ball_pos) > SWITCH_DISTANCE) { - // visualizer->addPoint(robot()->pose.pos, 0, "", 1., "Kick::AROUND_BALL(遠い)"); { SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) @@ -149,7 +143,6 @@ Kick::Kick(RobotCommandWrapperBase::SharedPtr & base) .setTerminalVelocity(0.3); return Status::RUNNING; } else { - // visualizer->addPoint(robot()->pose.pos, 0, "", 1., "Kick::AROUND_BALL(近い)"); { SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) diff --git a/crane_robot_skills/src/marker.cpp b/crane_robot_skills/src/marker.cpp index 8d55e1ab7..9a45e8d9a 100644 --- a/crane_robot_skills/src/marker.cpp +++ b/crane_robot_skills/src/marker.cpp @@ -38,17 +38,14 @@ Status Marker::update() } command.setTargetPosition(marking_point, 0.1).setTargetTheta(target_theta); - // visualizer->addCircle(enemy_pos, 0.3, 1, "black", ""); SvgCircleBuilder circle_builder; - circle_builder.center(enemy_pos).radius(0.3).stroke("black").strokeWidth(1); + circle_builder.center(enemy_pos).radius(0.3).stroke("black").strokeWidth(10); visualizer->add(circle_builder.getSvgString()); - // visualizer->addLine( - // robot()->pose.pos, enemy_pos + (enemy_pos - robot()->pose.pos).normalized() * 0.3, 2, "black"); SvgLineBuilder line_builder; line_builder.start(robot()->pose.pos) .end(enemy_pos + (enemy_pos - robot()->pose.pos).normalized() * 0.3) .stroke("black") - .strokeWidth(2); + .strokeWidth(20); visualizer->add(line_builder.getSvgString()); return Status::RUNNING; } diff --git a/crane_robot_skills/src/penalty_kick.cpp b/crane_robot_skills/src/penalty_kick.cpp index 78d28ed4c..5ccaa9ebe 100644 --- a/crane_robot_skills/src/penalty_kick.cpp +++ b/crane_robot_skills/src/penalty_kick.cpp @@ -46,9 +46,8 @@ PenaltyKick::PenaltyKick(RobotCommandWrapperBase::SharedPtr & base) double best_angle = GoalKick::getBestAngleToShootFromPoint( minimum_angle_accuracy, world_model()->ball.pos, world_model()); Point best_target = world_model()->ball.pos + getNormVec(best_angle) * 0.5; - // visualizer->addPoint(best_target.x(), best_target.y(), 1, "red", 1.0, "best_target"); SvgCircleBuilder circle_builder; - circle_builder.center(best_target).radius(0.1).stroke("red").strokeWidth(1); + circle_builder.center(best_target).radius(0.1).stroke("red").strokeWidth(10); kick_skill.setParameter("target", best_target); diff --git a/crane_robot_skills/src/receive.cpp b/crane_robot_skills/src/receive.cpp index a41455831..88336950b 100644 --- a/crane_robot_skills/src/receive.cpp +++ b/crane_robot_skills/src/receive.cpp @@ -48,9 +48,8 @@ Status Receive::update() }(); Point interception_point = getInterceptionPoint() + offset; - // visualizer->addLine(interception_point, robot()->pose.pos, 1, "red", 1., "intercept"); SvgLineBuilder line_builder; - line_builder.start(interception_point).end(robot()->pose.pos).stroke("red").strokeWidth(1); + line_builder.start(interception_point).end(robot()->pose.pos).stroke("red").strokeWidth(10); visualizer->add(line_builder.getSvgString()); if (getParameter("enable_redirect")) { @@ -88,9 +87,8 @@ Point Receive::getInterceptionPoint() const Segment ball_line( world_model()->ball.pos, (world_model()->ball.pos + world_model()->ball.vel.normalized() * 10.0)); - // visualizer->addLine(ball_line.first, ball_line.second, 1, "blue", 1., "ball_line"); SvgLineBuilder line_builder; - line_builder.start(ball_line.first).end(ball_line.second).stroke("blue").strokeWidth(1); + line_builder.start(ball_line.first).end(ball_line.second).stroke("blue").strokeWidth(10); visualizer->add(line_builder.getSvgString()); auto result = getClosestPointAndDistance(robot()->pose.pos, ball_line); return result.closest_point; diff --git a/crane_robot_skills/src/single_ball_placement.cpp b/crane_robot_skills/src/single_ball_placement.cpp index 560ac3d17..fec6202f0 100644 --- a/crane_robot_skills/src/single_ball_placement.cpp +++ b/crane_robot_skills/src/single_ball_placement.cpp @@ -20,7 +20,6 @@ SingleBallPlacement::SingleBallPlacement(RobotCommandWrapperBase::SharedPtr & ba setParameter("コート端判定のオフセット", 0.0); addStateFunction(SingleBallPlacementStates::ENTRY_POINT, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "white", 1.0, state_string); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(state_string) @@ -47,7 +46,6 @@ SingleBallPlacement::SingleBallPlacement(RobotCommandWrapperBase::SharedPtr & ba // 端にある場合、コート側からアプローチする addStateFunction(SingleBallPlacementStates::PULL_BACK_FROM_EDGE_PREPARE, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "white", 1.0, state_string); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(state_string) @@ -107,7 +105,6 @@ SingleBallPlacement::SingleBallPlacement(RobotCommandWrapperBase::SharedPtr & ba // PULL_BACK_FROM_EDGE_TOUCH addStateFunction(SingleBallPlacementStates::PULL_BACK_FROM_EDGE_TOUCH, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "white", 1.0, state_string); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(state_string) @@ -169,7 +166,6 @@ SingleBallPlacement::SingleBallPlacement(RobotCommandWrapperBase::SharedPtr & ba // PULL_BACK_FROM_EDGE_PULL addStateFunction(SingleBallPlacementStates::PULL_BACK_FROM_EDGE_PULL, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "white", 1.0, state_string); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(state_string) @@ -200,7 +196,6 @@ SingleBallPlacement::SingleBallPlacement(RobotCommandWrapperBase::SharedPtr & ba [this]() { return robot()->getDistance(world_model()->ball.pos) > 0.15; }); addStateFunction(SingleBallPlacementStates::GO_OVER_BALL, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "white", 1.0, state_string); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(state_string) @@ -255,7 +250,6 @@ SingleBallPlacement::SingleBallPlacement(RobotCommandWrapperBase::SharedPtr & ba [this]() { return skill_status == Status::SUCCESS; }); addStateFunction(SingleBallPlacementStates::CONTACT_BALL, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "white", 1.0, state_string); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(state_string) @@ -279,7 +273,6 @@ SingleBallPlacement::SingleBallPlacement(RobotCommandWrapperBase::SharedPtr & ba [this]() { return skill_status == Status::SUCCESS; }); addStateFunction(SingleBallPlacementStates::MOVE_TO_TARGET, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "white", 1.0, state_string); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(state_string) @@ -319,7 +312,6 @@ SingleBallPlacement::SingleBallPlacement(RobotCommandWrapperBase::SharedPtr & ba [this]() { return skill_status == Status::FAILURE; }); addStateFunction(SingleBallPlacementStates::SLEEP, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "white", 1.0, state_string); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(state_string) @@ -346,7 +338,6 @@ SingleBallPlacement::SingleBallPlacement(RobotCommandWrapperBase::SharedPtr & ba }); addStateFunction(SingleBallPlacementStates::LEAVE_BALL, [this]() { - // visualizer->addPoint(robot()->pose.pos, 0, "white", 1.0, state_string); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text(state_string) diff --git a/crane_robot_skills/src/sub_attacker.cpp b/crane_robot_skills/src/sub_attacker.cpp index e3523a116..79be2ee60 100644 --- a/crane_robot_skills/src/sub_attacker.cpp +++ b/crane_robot_skills/src/sub_attacker.cpp @@ -49,9 +49,6 @@ Status SubAttacker::update() result.closest_point + (robot()->pose.pos - result.closest_point).normalized() * 0.5); command.enableBallAvoidance(); { - // visualizer->addPoint( - // robot()->pose.pos.x(), robot()->pose.pos.y(), 0, - // "red", 1., "ボールラインから一旦遠ざかる"); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text("ボールラインから一旦遠ざかる") @@ -62,8 +59,6 @@ Status SubAttacker::update() } else { // ボールの進路上に移動 { - // visualizer->addPoint( - // robot()->pose.pos.x(), robot()->pose.pos.y(), 0, "red", 1., "ボールの進路上に移動"); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text("ボールの進路上に移動") @@ -89,8 +84,6 @@ Status SubAttacker::update() } } else { { - // visualizer->addPoint( - // robot()->pose.pos.x(), robot()->pose.pos.y(), 0, "red", 1., "ベストポジションへ移動"); SvgTextBuilder text_builder; text_builder.position(robot()->pose.pos.x() - 0.5, robot()->pose.pos.y() + 0.5) .text("ベストポジションへ移動") @@ -102,9 +95,6 @@ Status SubAttacker::update() double best_score = 0.0; for (const auto & dpps_point : dpps_points) { double score = getPointScore(dpps_point, world_model()->ball.pos, world_model()); - // visualizer->addPoint( - // dpps_point.x(), dpps_point.y(), std::clamp(static_cast(score * 100), 0, 20), "blue", - // 1.); if (score > best_score) { best_score = score; @@ -122,10 +112,8 @@ Status SubAttacker::update() auto to_goal = getNormVec(goal_angle); auto to_ball = (world_model()->ball.pos - target_pos).normalized(); { - // visualizer->addLine( - // target_pos, target_pos + to_goal * 3.0, 2, "yellow", 1.0, "Supporterシュートライン"); SvgLineBuilder line_builder; - line_builder.start(target_pos).end(target_pos + to_goal * 3.0).stroke("yellow").strokeWidth(2); + line_builder.start(target_pos).end(target_pos + to_goal * 3.0).stroke("yellow").strokeWidth(20); visualizer->add(line_builder.getSvgString()); } command.setTargetTheta(getAngle(to_goal + to_ball)); diff --git a/crane_world_model_publisher/src/visualization_data_handler.cpp b/crane_world_model_publisher/src/visualization_data_handler.cpp index 9d70707ae..c2d841df0 100644 --- a/crane_world_model_publisher/src/visualization_data_handler.cpp +++ b/crane_world_model_publisher/src/visualization_data_handler.cpp @@ -106,7 +106,7 @@ void VisualizationDataHandler::publish_vis_geometry(const SSL_GeometryData & geo builder.start(field_line.p1().x() * 0.001, field_line.p1().y() * 0.001) .end(field_line.p2().x() * 0.001, field_line.p2().y() * 0.001) .stroke("white") - .strokeWidth(2); + .strokeWidth(20); visualizer_geometry->add(builder.getSvgString()); } @@ -115,7 +115,7 @@ void VisualizationDataHandler::publish_vis_geometry(const SSL_GeometryData & geo builder.center(field_arc.center().x() * 0.001, field_arc.center().y() * 0.001) .radius(field_arc.radius() * 0.001) .stroke("white") - .strokeWidth(2); + .strokeWidth(20); visualizer_geometry->add(builder.getSvgString()); } @@ -144,7 +144,7 @@ void VisualizationDataHandler::publish_vis_geometry(const SSL_GeometryData & geo (geometry_data.field().field_length() + geometry_data.field().boundary_width() * 2) * 0.001, (geometry_data.field().field_width() + geometry_data.field().boundary_width() * 2) * 0.001) .stroke("black") - .strokeWidth(3); + .strokeWidth(30); visualizer_geometry->add(rect_builder.getSvgString()); visualizer_geometry->flush(); CraneVisualizerBuffer::publish(); @@ -164,7 +164,7 @@ void VisualizationDataHandler::publish_vis_tracked(const TrackedFrame & tracked_ .radius(0.0215) .stroke("black") .fill("orange") - .strokeWidth(1); + .strokeWidth(10); visualizer_tracked->add(builder.getSvgString()); // ボールは小さいのでボールの周りを大きな円で囲う @@ -172,7 +172,7 @@ void VisualizationDataHandler::publish_vis_tracked(const TrackedFrame & tracked_ .radius(0.5) .stroke("crimson", 0.7) .fill("none") - .strokeWidth(1); + .strokeWidth(10); visualizer_tracked->add(builder.getSvgString()); ball_x = ball.pos().x(); @@ -185,7 +185,7 @@ void VisualizationDataHandler::publish_vis_tracked(const TrackedFrame & tracked_ line_builder.start(ball.pos().x(), ball.pos().y()) .end(ball.pos().x() + ball.vel().x(), ball.pos().y() + ball.vel().y()) .stroke("gold", VELOCITY_ALPHA) - .strokeWidth(2); + .strokeWidth(20); visualizer_tracked->add(line_builder.getSvgString()); } } @@ -200,7 +200,7 @@ void VisualizationDataHandler::publish_vis_tracked(const TrackedFrame & tracked_ double robot_theta = robot.orientation(); builder.position(robot.pos().x(), robot.pos().y(), robot.orientation()) .stroke("black") - .strokeWidth(1); + .strokeWidth(10); if (robot.robot_id().team() == RobotId::TEAM_COLOR_BLUE) { builder.fill("dodgerblue"); } else { @@ -526,7 +526,7 @@ void VisualizationDataHandler::publish_vis_referee(const Referee::SharedPtr msg) msg->designated_position.front().x / 1000., msg->designated_position.front().y / 1000.) .end(ball_x, ball_y) .stroke("aquamarine") - .strokeWidth(1); + .strokeWidth(10); visualizer_referee->add(line_builder.getSvgString()); } } diff --git a/crane_world_model_publisher/src/world_model_publisher.cpp b/crane_world_model_publisher/src/world_model_publisher.cpp index eb49d45c7..a73bfde8c 100644 --- a/crane_world_model_publisher/src/world_model_publisher.cpp +++ b/crane_world_model_publisher/src/world_model_publisher.cpp @@ -447,12 +447,11 @@ void WorldModelPublisherComponent::publishWorldModel() Point p2; p1 << history.at(index).x, history.at(index).y; p2 << history.at(index + SAMPLING_NUM).x, history.at(index + SAMPLING_NUM).y; - // visualizer->addLine(p1, p2, 1, "yellow", index / static_cast(history.size())); SvgLineBuilder line_builder; line_builder.start(p1) .end(p2) .stroke("yellow", index / static_cast(history.size())) - .strokeWidth(3); + .strokeWidth(30); visualizer->add(line_builder.getSvgString()); } } @@ -465,12 +464,11 @@ void WorldModelPublisherComponent::publishWorldModel() Point p2; p1 << history.at(index).x, history.at(index).y; p2 << history.at(index + SAMPLING_NUM).x, history.at(index + SAMPLING_NUM).y; - // visualizer->addLine(p1, p2, 1, "blue", index / static_cast(history.size())); SvgLineBuilder line_builder; line_builder.start(p1) .end(p2) .stroke("blue", index / static_cast(history.size())) - .strokeWidth(3); + .strokeWidth(30); visualizer->add(line_builder.getSvgString()); } } @@ -478,14 +476,11 @@ void WorldModelPublisherComponent::publishWorldModel() if (ball_history.size() > SAMPLING_NUM + 1) { for (int index = 0; index < ball_history.size() - SAMPLING_NUM; index += SAMPLING_NUM) { - // visualizer->addLine( - // ball_history.at(index), ball_history.at(index + SAMPLING_NUM), 1, "orange", - // index / static_cast(ball_history.size())); SvgLineBuilder line_builder; line_builder.start(ball_history.at(index)) .end(ball_history.at(index + SAMPLING_NUM)) .stroke("orange", index / static_cast(ball_history.size())) - .strokeWidth(3); + .strokeWidth(30); visualizer->add(line_builder.getSvgString()); } } diff --git a/session/crane_planner_plugins/include/crane_planner_plugins/attacker_skill_planner.hpp b/session/crane_planner_plugins/include/crane_planner_plugins/attacker_skill_planner.hpp index 5f34bda97..4f576d616 100644 --- a/session/crane_planner_plugins/include/crane_planner_plugins/attacker_skill_planner.hpp +++ b/session/crane_planner_plugins/include/crane_planner_plugins/attacker_skill_planner.hpp @@ -46,29 +46,22 @@ class AttackerSkillPlanner : public PlannerBase } else { std::string state_name(magic_enum::enum_name(skill->getCurrentState())); { - // visualizer->addCircle( - // skill->commander().getRobot()->pose.pos, 0.3, 2, "red", "", 1.0, state_name); SvgCircleBuilder circle_builder; circle_builder.center(skill->commander().getRobot()->pose.pos) .radius(0.3) .stroke("red") - .strokeWidth(2); + .strokeWidth(20); visualizer->add(circle_builder.getSvgString()); } if (world_model->ball.isMoving()) { { - // visualizer->addLine( - // world_model->ball.pos, - // world_model->ball.pos + - // world_model->ball.vel.normalized() * world_model->getBallDistanceHorizon(), - // 3, "red", 0.5, ""); SvgLineBuilder line_builder; line_builder.start(world_model->ball.pos) .end( world_model->ball.pos + world_model->ball.vel.normalized() * world_model->getBallDistanceHorizon()) .stroke("red") - .strokeWidth(3); + .strokeWidth(30); visualizer->add(line_builder.getSvgString()); } } diff --git a/session/crane_planner_plugins/include/crane_planner_plugins/offensive_planner.hpp b/session/crane_planner_plugins/include/crane_planner_plugins/offensive_planner.hpp index e0c91f1bb..9fbc1dfe6 100644 --- a/session/crane_planner_plugins/include/crane_planner_plugins/offensive_planner.hpp +++ b/session/crane_planner_plugins/include/crane_planner_plugins/offensive_planner.hpp @@ -43,28 +43,21 @@ class OffensivePlanner : public PlannerBase { std::string state_name(magic_enum::enum_name(attacker->getCurrentState())); { - // visualizer->addCircle( - // attacker->commander().getRobot()->pose.pos, 0.3, 2, "red", "", 1.0, state_name); SvgCircleBuilder circle_builder; circle_builder.center(attacker->commander().getRobot()->pose.pos) .radius(0.3) .stroke("red") - .strokeWidth(2); + .strokeWidth(20); visualizer->add(circle_builder.getSvgString()); } { - // visualizer->addLine( - // world_model->ball.pos, - // world_model->ball.pos + - // world_model->ball.vel.normalized() * world_model->getBallDistanceHorizon(), - // 3, "red", 0.5, ""); SvgLineBuilder line_builder; line_builder.start(world_model->ball.pos) .end( world_model->ball.pos + world_model->ball.vel.normalized() * world_model->getBallDistanceHorizon()) .stroke("red") - .strokeWidth(3); + .strokeWidth(30); visualizer->add(line_builder.getSvgString()); } auto status = attacker->run(); diff --git a/session/crane_planner_plugins/include/crane_planner_plugins/placement_avoidance_planner.hpp b/session/crane_planner_plugins/include/crane_planner_plugins/placement_avoidance_planner.hpp index 03f2c53f3..a92a09038 100644 --- a/session/crane_planner_plugins/include/crane_planner_plugins/placement_avoidance_planner.hpp +++ b/session/crane_planner_plugins/include/crane_planner_plugins/placement_avoidance_planner.hpp @@ -95,12 +95,11 @@ class BallPlacementAvoidancePlanner : public PlannerBase // ボールプレイスメントエリアを横切ってしまうことがあるため、上書きしてしまう command.original_position = target_position; command.command->setTargetPosition(target_position); - // visualizer->addLine(command.original_position, target_position, 2, "yellow"); SvgLineBuilder line_builder; line_builder.start(command.original_position) .end(target_position) .stroke("yellow") - .strokeWidth(2); + .strokeWidth(20); visualizer->add(line_builder.getSvgString()); } else { command.command->setTargetPosition(command.original_position); diff --git a/session/crane_planner_plugins/include/crane_planner_plugins/simple_placer_planner.hpp b/session/crane_planner_plugins/include/crane_planner_plugins/simple_placer_planner.hpp index b081761a9..dc23cf289 100644 --- a/session/crane_planner_plugins/include/crane_planner_plugins/simple_placer_planner.hpp +++ b/session/crane_planner_plugins/include/crane_planner_plugins/simple_placer_planner.hpp @@ -189,9 +189,8 @@ class SimplePlacerPlanner : public PlannerBase // visualize areas with info for (const auto & area : areas_with_info) { - // visualizer->addRect(area.box, 1., "yellow", "", 1., area.name); SvgRectBuilder rect_builder; - rect_builder.box(area.box).stroke("yellow").strokeWidth(1); + rect_builder.box(area.box).stroke("yellow").strokeWidth(10); visualizer->add(rect_builder.getSvgString()); SvgTextBuilder text_builder; @@ -203,14 +202,11 @@ class SimplePlacerPlanner : public PlannerBase } for (const auto & cmd : robot_commands) { - // visualizer->addLine( - // cmd.current_pose.x, cmd.current_pose.y, cmd.position_target_mode.front().target_x, - // cmd.position_target_mode.front().target_y, 1, "blue"); SvgLineBuilder line_builder; line_builder.start(cmd.current_pose.x, cmd.current_pose.y) .end(cmd.position_target_mode.front().target_x, cmd.position_target_mode.front().target_y) .stroke("blue") - .strokeWidth(1); + .strokeWidth(10); visualizer->add(line_builder.getSvgString()); } return {PlannerBase::Status::RUNNING, robot_commands};