JSim 2026.06.01-p(1)
Loading...
Searching...
No Matches
season_2026_gamepiece_presets.hpp
Go to the documentation of this file.
1// Copyright (c) JSim contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the LGPLv3 license file in the root directory of this project.
4
5#pragma once
6
8
10
13 config.net_boundary_user_id = 2026;
14 config.wall_restitution = 0.22;
15 config.wall_friction = 0.25;
16 return config;
17}
18
21 properties.mass_kg = 0.216;
22 properties.radius_m = 0.15 * 0.5;
23 properties.drag_coefficient = 0.58;
24 properties.reference_area_m2 = 3.14159265358979323846 * properties.radius_m * properties.radius_m;
25 properties.restitution = 0.52;
26 return properties;
27}
28
31 config.magnus_coefficient = 1.2e-4;
32 config.rolling_friction_per_s = 1.8;
33 return config;
34}
35
38 sim.fieldElements().clear();
39 sim.goals().clear();
40
43 net.user_id = 2026;
44 net.position_m = Vector3(7.0, 4.1, 1.7);
45 net.half_extents_m = Vector3(0.4, 0.4, 0.5);
46 net.is_active = true;
47 sim.addFieldElement(net);
48
51 hub_goal.center_m = net.position_m;
52 hub_goal.half_extents_m = Vector3(0.35, 0.35, 0.45);
55 sim.addGoalZone(hub_goal);
56}
57
58} // namespace frcsim::BallGamepiecePresets
Resolves robot-ball contact response. projectiles.
Definition ball_gamepiece_sim.hpp:38
std::vector< EnvironmentalBoundary > & fieldElements()
Mutable field-element list.
Definition ball_gamepiece_sim.hpp:505
GoalZone & addGoalZone(const GoalZone &goal_zone)
Adds a goal zone and returns a mutable reference to the stored copy.
Definition ball_gamepiece_sim.hpp:344
std::vector< GoalZone > & goals()
Mutable goal-zone list.
Definition ball_gamepiece_sim.hpp:499
EnvironmentalBoundary & addFieldElement(const EnvironmentalBoundary &boundary)
Adds a field element and returns a mutable reference to the stored copy.
Definition ball_gamepiece_sim.hpp:379
@ kBall
Definition ball_gamepiece_sim.hpp:43
void setFieldConfig(const FieldConfig &field)
Replaces field configuration while preserving dynamic simulation entities.
Definition ball_gamepiece_sim.hpp:277
Definition season_2026_gamepiece_presets.hpp:9
BallPhysicsSim3D::BallProperties season2026BallProperties()
Definition season_2026_gamepiece_presets.hpp:19
BallPhysicsSim3D::Config season2026BallConfig()
Definition season_2026_gamepiece_presets.hpp:29
BallGamepieceSim::FieldConfig evergreenFieldConfig()
Definition gamepiece_presets.hpp:49
BallPhysicsSim3D::Config evergreenBallConfig()
Definition gamepiece_presets.hpp:38
BallGamepieceSim::FieldConfig season2026FieldConfig()
Definition season_2026_gamepiece_presets.hpp:11
void configureSeason2026Field(BallGamepieceSim &sim)
Definition season_2026_gamepiece_presets.hpp:36
@ kBox
Box primitive (axis-aligned or oriented via quaternion).
Definition boundary.hpp:26
Global field and contact tuning parameters.
Definition ball_gamepiece_sim.hpp:55
double wall_friction
Definition ball_gamepiece_sim.hpp:69
double wall_restitution
Definition ball_gamepiece_sim.hpp:61
int net_boundary_user_id
Definition ball_gamepiece_sim.hpp:73
Goal capture region and validation logic.
Definition ball_gamepiece_sim.hpp:225
@ kBox
Definition ball_gamepiece_sim.hpp:228
Shape shape
Definition ball_gamepiece_sim.hpp:233
bool require_positive_vertical_velocity
Definition ball_gamepiece_sim.hpp:245
Vector3 half_extents_m
Definition ball_gamepiece_sim.hpp:237
GamePieceType accepted_type
Definition ball_gamepiece_sim.hpp:241
Vector3 center_m
Definition ball_gamepiece_sim.hpp:235
Physical parameters for the ball body.
Definition ball_physics.hpp:49
double drag_coefficient
Definition ball_physics.hpp:55
double restitution
Definition ball_physics.hpp:59
double mass_kg
Definition ball_physics.hpp:51
double reference_area_m2
Definition ball_physics.hpp:57
double radius_m
Definition ball_physics.hpp:53
Runtime physics environment parameters.
Definition ball_physics.hpp:25
double rolling_friction_per_s
Definition ball_physics.hpp:41
double magnus_coefficient
Definition ball_physics.hpp:35
Collision or constraint boundary definition used by PhysicsWorld.
Definition boundary.hpp:51
int user_id
Application-defined identifier for scenario-specific routing.
Definition boundary.hpp:107
bool is_active
Active flag for enabling/disabling participation without removal.
Definition boundary.hpp:131
Vector3 position_m
World-space boundary origin/center in meters.
Definition boundary.hpp:64
BoundaryType type
Geometry primitive type that determines shape semantics.
Definition boundary.hpp:53
Vector3 half_extents_m
Half extents in meters for box-like boundaries.
Definition boundary.hpp:78
3D vector utility used throughout JSim physics.
Definition vector.hpp:22