Commit 9efd2067 authored by NicolaiO's avatar NicolaiO 🐼 Committed by TIGERs GitLab
Browse files

Resolve "Redirect model for flat balls with curvature"

Closes #1642

See merge request main/Sumatra!1387

sumatra-commit: 7d947af68ff772fcc13bd1bdc39c800cad8fd583
parent 256c06f6
Pipeline #16747 passed with stage
in 6 minutes and 34 seconds
......@@ -48,10 +48,17 @@ public class BallParameters
@Configurable(
comment = "Amount of spin transferred during a redirect.",
defValue = "0.75",
defValue = "0.8",
spezis = { "SUMATRA", "LAB", "TISCH", "ROBOCUP", "ANDRE", "NICOLAI", "SIMULATOR" }
)
private double redirectSpinFactor = 0.8;
@Configurable(
comment = "Restitution coefficient for redirected balls from a bot.",
defValue = "0.2",
spezis = { "SUMATRA", "LAB", "TISCH", "ROBOCUP", "ANDRE", "NICOLAI", "SIMULATOR" }
)
private double redirectSpinFactor = 0.75;
private double redirectRestitutionCoefficient = 0.2;
@Configurable(
comment = "Fixed velocity where the ball starts to roll [mm/s]",
......
......@@ -18,6 +18,7 @@ import edu.tigers.sumatra.vision.data.KickSolverResult;
import edu.tigers.sumatra.vision.kick.estimators.EBallModelIdentType;
import edu.tigers.sumatra.vision.kick.estimators.IBallModelIdentResult;
import edu.tigers.sumatra.vision.kick.estimators.IKickSolver;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Value;
import org.apache.commons.math3.analysis.MultivariateFunction;
......@@ -266,6 +267,7 @@ public class FlatKickSolverNonLin3Factor implements IKickSolver
}
@RequiredArgsConstructor
@Getter
public static class RedirectModelIdentResult implements IBallModelIdentResult
{
private final IVector3 kickVel;
......@@ -335,5 +337,17 @@ public class FlatKickSolverNonLin3Factor implements IKickSolver
+ "in: " + Vector2.fromAngleLength(inAngle, inVel) + System.lineSeparator()
+ "out: " + Vector2.fromAngleLength(outAngle, outVel) + System.lineSeparator();
}
public IVector2 getInVelocity()
{
return Vector2.fromAngleLength(inAngle, inVel);
}
public IVector2 getOutVelocity()
{
return Vector2.fromAngleLength(outAngle, outVel);
}
}
}
\ No newline at end of file
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