Skip to content

add fuel in simulation#52

Open
ariakrishnamoorthy wants to merge 2 commits intomainfrom
aria/add-game-pieces
Open

add fuel in simulation#52
ariakrishnamoorthy wants to merge 2 commits intomainfrom
aria/add-game-pieces

Conversation

@ariakrishnamoorthy
Copy link
Copy Markdown
Contributor

No description provided.

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Feb 4, 2026

🤖 Augment PR Summary

Summary: This PR adds simulated 2026 “Fuel” game pieces and publishes their positions for visualization.

Changes:

  • Populates the simulation field on startup with a small grid of RebuiltFuelOnField pieces
  • Adds a NetworkTables StructArrayPublisher<Pose3d> to stream fuel poses (topic: MyPoseArray)
  • Steps the MapleSim SimulatedArena during simulationPeriodic() and publishes the current fuel pose array

Technical Notes: Fuel is placed at fixed Translation2d coordinates and pose publishing relies on SimulatedArena.getGamePiecesArrayByType("Fuel").

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

.publish();
@Override
public void simulationPeriodic() {
SimulatedArena.getInstance().simulationPeriodic();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SimulatedArena.getInstance().simulationPeriodic() is also called inside MapleSimSwervePhysics.update(), so calling it here as well may advance the arena twice (or at mismatched rates) and desync game-piece/robot simulation behavior. Consider ensuring the arena is stepped exactly once per simulation loop.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown
Contributor

@riley-jen riley-jen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise looks p good

@Override
public void simulationInit() {}
public void simulationInit() {
for (int xCnt = 0; xCnt < 4; xCnt++){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this stuff somewhere else?

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.

2 participants