Conversation
Andrewyx
added this pull request to stack #3951
September 12, 2026 08:39
This was referenced Sep 12, 2026
Ports three upstream ER-Force fixes onto our fork (upstream 73e139db..38563d11): - Perfect dribbler hold ball constraint (upstream ee58ccd0): the hinge between robot and ball is replaced by a point to point constraint plus a constraint that keeps the robot upright. Two robots duelling for the same ball used to flip each other over, and a flipped robot is teleported to the side of the field by Simulator::resetFlipped. Since all our simulated tests run with the perfect dribbler, this happened on the default path. - Quaternion component order in SimRobot::update and restoreState (upstream 5ae9dd8c). We read the separate angle field, so this only affects the rotation field of SimulatorState and restoring a saved simulator state. - The ball model reported in the geometry packet now describes the ball model this simulator actually implements, instead of the values ER-Force reports for their own model (ours was replaced in #2653/#2918). Adds a test that drives two dribbling robots into the same ball and checks that they stay upright and on the field, which fails without the first fix, and a test for the rotation reported in SimulatorState.
Andrewyx
force-pushed
the
Andrewyx/erforce_sim_physics_fixes
branch
from
September 12, 2026 08:45
a296186 to
5403f40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
WIP Claude Template
Our ER-Force simulator is a fork of robotics-erlangen/framework taken at upstream
73e139db(2021-12-16). This is the first of four stacked PRs that port what upstream has changed in their simulator since then (#3912).A note on the approach, since it differs from what the issue describes: re-importing upstream wholesale would mean redoing our Qt removal (upstream is on Qt6 now), our synchronous
stepSimulationAPI and our own ball model, and the payoff would be about 500 lines of simulator logic — almost all of upstream's work in the last 4.5 years went into Ra, strategy and tracking, which we don't vendor. So these PRs port the simulator changes onto our fork commit by commit instead, and record the sync point in the extlib README (last PR of the stack) so the next sync is a diff away.This PR carries the changes that affect the simulator's default behaviour:
ee58ccd0): the hinge between robot and ball becomes a point to point constraint plus a constraint that keeps a dribbling robot upright. Two robots duelling for the same ball used to flip each other over, andSimulator::resetFlippedthen teleports a flipped robot off to the side of the field. All our simulated tests run with the perfect dribbler, so this was happening on the default path.SimRobot::updateandrestoreState(upstream5ae9dd8c). We read the separateanglefield, so this only affects therotationfield ofSimulatorStateand restoring a saved simulator state.Testing Done
er_force_simulator_testcases: two dribbling robots driven into the same ball stay upright and on the field, and the rotation inSimulatorStatematches the robot's orientation. The duel test is a real regression guard: with the old hinge constraint both robots flip and end up teleported to y ≈ 3.19 m on a 6 m wide field, which I confirmed by reverting just that hunk.bazel testover the CI software test set: 121/121 pass.//software/ai/hl/...,//software/ai/navigator/..., ball model test) and a 3 minute autoref'd AI vs AI game, run on the full stack.Resolved Issues
Part of #3912
Length Justification and Key Files to Review
149 lines. Key file:
src/extlibs/er_force_sim/src/amun/simulator/simrobot.cpp.Review Checklist