Skip to content

Simulate the corner blocks and goal line boundary of the SSL field - #3949

Draft
Andrewyx wants to merge 1 commit into
Andrewyx/erforce_sim_realism_optionsfrom
Andrewyx/erforce_sim_field_colliders
Draft

Andrewyx wants to merge 1 commit into
Andrewyx/erforce_sim_realism_optionsfrom
Andrewyx/erforce_sim_field_colliders

Conversation

@Andrewyx

@Andrewyx Andrewyx commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Description

WIP Claude Template

Third of four stacked PRs porting upstream ER-Force simulator changes (#3912). Stacked on #3948.

Ports the field collider changes upstream made for the newer SSL field layouts (upstream 74afb1f4, d496e5ff, 48245210, c002db2f, db1fddb0):

  • Corner blocks: the triangular blocks that smooth out the corners of the field, which real SSL fields have had since 2023. Both of our field configs now declare them (corner_block_cathetus_length: 0.09), so a ball rolled into a corner is deflected instead of coming to rest in the corner itself.
  • boundary_width_goal_line, for fields whose boundary behind the goal lines is wider than the one along the touch lines. It falls back to boundary_width, so our fields keep their walls exactly where they are; the side walls of the goals now extend back to the wall.
  • A mode for playing without any boundary area at all, where the goals stand outside the field lines and the wall behind the goal line is split around them. Unused by our configs, ported so we are ready for it.

The three new geometry fields are added to the simulator's world.proto and to our SSL_GeometryFieldSize, using the field numbers from the official SSL Vision protocol so we stay wire compatible with real vision. Field keeps its single boundary_buffer_size for now — a non uniform boundary there belongs with adopting the 2026 field dimensions, which this PR deliberately does not do (the sim still loads the 2020 configs).

One behaviour change to flag: porting upstream's goal placement also shifts the goals outward by half a line width (5 mm). That is what upstream's code does; note that their comment says the opposite of their code, so this is worth a second opinion.

Testing Done

  • New er_force_simulator_test case: a ball driven into a field corner never enters the cut off corner triangle. Verified it is a real guard by removing corner_block_cathetus_length from the config, where the ball reaches 0.035 m from the corner against the 0.0675 m threshold.
  • ssl_geometry_test and the existing field configuration tests pass, i.e. the geometry round trip is unchanged when the new fields are absent.
  • Same full suite runs as Fix ER-Force simulator dribbling physics and reported ball model #3947.

Resolved Issues

Part of #3912

Length Justification and Key Files to Review

247 lines. Key file: src/extlibs/er_force_sim/src/amun/simulator/simfield.cpp.

Review Checklist

  • Function & Class comments
  • Remove all commented out code
  • Remove extra print statements
  • Resolve all TODO's

Ports the field collider changes upstream made for the newer SSL field layouts
(upstream 74afb1f4, d496e5ff, 48245210, c002db2f, db1fddb0):

- triangular blocks that smooth out the corners of the field, which real fields
  have had since 2023. Both of our field configs now declare them, so a ball
  rolled into a corner is deflected instead of coming to rest in the corner
- boundary_width_goal_line, for fields whose boundary behind the goal lines is
  wider than the one along the touch lines. It falls back to boundary_width, so
  our fields keep the walls exactly where they are, and the side walls of the
  goals now extend back to the wall
- a mode for playing without any boundary area at all, where the goals stand
  outside the field lines and the wall behind the goal line is split around them

The three new geometry fields are added to the simulator's world.proto and to
our SSL_GeometryFieldSize, using the field numbers of the official SSL Vision
protocol so that we stay compatible with real vision. Field keeps its single
boundary_buffer_size for now; a non uniform boundary there belongs with adopting
the 2026 field dimensions.

Note that this also shifts the goals by half a line width, which is what
upstream's code does (their comment says the opposite).
@Andrewyx
Andrewyx force-pushed the Andrewyx/erforce_sim_field_colliders branch from 4951797 to 2daba48 Compare September 12, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant