Commit b76b2311 authored by MarkG's avatar MarkG Committed by TIGERs GitLab
Browse files

[#1595] Implement a new pass interception algorithm

Closes #1595

See merge request main/Sumatra!1393

sumatra-commit: 1209677e78ed415486a0c4d6973a00cb6c510a7c
parent 3aeb1f80
Pipeline #16803 passed with stage
in 6 minutes and 40 seconds
...@@ -12,17 +12,17 @@ import com.sleepycat.persist.model.Persistent; ...@@ -12,17 +12,17 @@ import com.sleepycat.persist.model.Persistent;
@Persistent @Persistent
public class BotMovementLimits implements IBotMovementLimits public class BotMovementLimits implements IBotMovementLimits
{ {
private double velMax = 2; private double velMax = 0.1;
private double accMax = 3; private double accMax = 0.1;
private double brkMax = 6; private double brkMax = 0.1;
private double jerkMax = 20; private double jerkMax = 0.1;
private double velMaxW = 20; private double velMaxW = 0.1;
private double accMaxW = 50; private double accMaxW = 0.1;
private double jerkMaxW = 1000; private double jerkMaxW = 0.1;
private double velMaxFast = 3; private double velMaxFast = 0.1;
private double accMaxFast = 4; private double accMaxFast = 0.1;
/** /**
......
...@@ -473,6 +473,12 @@ public class GameState ...@@ -473,6 +473,12 @@ public class GameState
} }
public boolean isFreeKickForUs()
{
return isFreeKick() && isGameStateForUs();
}
/** /**
* @return true if this is an INDIRECT_FREE for them. * @return true if this is an INDIRECT_FREE for them.
*/ */
......
/* /*
* Copyright (c) 2009 - 2020, DHBW Mannheim - TIGERs Mannheim * Copyright (c) 2009 - 2021, DHBW Mannheim - TIGERs Mannheim
*/ */
package edu.tigers.sumatra.wp.data; package edu.tigers.sumatra.wp.data;
...@@ -85,7 +85,9 @@ public class WorldFrame extends SimpleWorldFrame ...@@ -85,7 +85,9 @@ public class WorldFrame extends SimpleWorldFrame
.filter(bot -> bot.getBotId().getTeamColor() == aiTeam.getTeamColor().opposite()) .filter(bot -> bot.getBotId().getTeamColor() == aiTeam.getTeamColor().opposite())
.filter(bot -> Geometry.getFieldWBorders().isPointInShape(bot.getPos())) .filter(bot -> Geometry.getFieldWBorders().isPointInShape(bot.getPos()))
.map(bot -> { .map(bot -> {
RobotInfo info = RobotInfo.stub(bot.getBotId(), bot.getTimestamp()); RobotInfo info = RobotInfo.stubBuilder(bot.getBotId(), bot.getTimestamp())
.withBotParams(bot.getRobotInfo().getBotParams())
.build();
return TrackedBot.newCopyBuilder(bot) return TrackedBot.newCopyBuilder(bot)
.withBotInfo(info) .withBotInfo(info)
.withState(bot.getFilteredState().orElse(bot.getBotState())) .withState(bot.getFilteredState().orElse(bot.getBotState()))
......
...@@ -514,7 +514,7 @@ public class FieldPanel extends JPanel implements IDrawableTool ...@@ -514,7 +514,7 @@ public class FieldPanel extends JPanel implements IDrawableTool
private void paintCoordinates(final Graphics2D g, final ETeamColor teamColor, private void paintCoordinates(final Graphics2D g, final ETeamColor teamColor,
final int width, final int height, final boolean inverted) final int width, final int height, final boolean inverted)
{ {
int fontSize = ScalingUtil.getFontSize(EFontSize.SMALL); int fontSize = ScalingUtil.getFontSize(EFontSize.LARGE);
g.setStroke(new BasicStroke()); g.setStroke(new BasicStroke());
g.setFont(new Font("", Font.PLAIN, fontSize)); g.setFont(new Font("", Font.PLAIN, fontSize));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment