|
JSim 2026.06.01-p(1)
|
Classes | |
| class | RobotState |
Public Member Functions | |
| GamepieceZone | createGamepieceZone (String name, Transform3d[] zoneDimensions, Rotation3d robotRotation) |
| GamepieceZone | getGamepieceZone (String name) |
| Map< String, GamepieceZone > | getGamepieceZones () |
| Pose2d | getPose () |
| Pose2d | getOdometryPose () |
| Translation2d[] | getFrameVertices () |
| ChassisSpeeds | getVelocity () |
| void | resetPose (Pose2d pose) |
| void | setChassisSpeeds (ChassisSpeeds speeds) |
| void | update (double dtSeconds) |
| RobotID | getRobotID () |
Static Public Member Functions | |
| static SimRobot | createRobot (RobotID id, Translation2d[] frameDimensions) |
| static SimRobot | getRobot (RobotID id) |
Protected Member Functions | |
| SimRobot (RobotID id, FieldState< RobotState > stateRef) | |
External interface for simulated FRC Robots interacting with JSim.
|
inlineprotected |
Protected constructor. Use SimRobot.createRobot().
| id | The RobotID for this robot. |
| stateRef | The field state reference for this robot. |
|
inline |
Creates a gamepiece zone tied to this robot.
| name | the zone name used for retrieval |
| zoneDimensions | the zone polygon dimensions relative to the robot center |
| robotRotation | the zone rotation relative to the robot |
| IllegalArgumentException | if a zone with the same name already exists |
Initializes a new robot via the unified StateManager tracking system.
| id | The logical driver station id. |
| frameDimensions | Translation2d[] for each vertex of the frame perimeter |
|
inline |
Returns the robot frame perimeter vertices used to build the robot body.
|
inline |
Retrieves a previously created gamepiece zone by name.
| name | the zone name |
null if none exists
|
inline |
Returns all gamepiece zones registered on this robot.
|
inline |
Retrieves the current odometry pose. This is always the commanded pose, not the physics body pose. Used internally for syncing with the physics engine.
|
inline |
Retrieves the current field-relative physics pose when physics is attached. Falls back to the commanded pose until a physics body is registered.
Retrieves a previously created robot by driver-station id.
| id | the robot identifier |
null if none exists
|
inline |
|
inline |
Returns the robot's current measured chassis velocity when physics is attached. Falls back to the last commanded chassis speeds until a body is registered.
|
inline |
Hard overrides the state manager's simulation pose for this robot.
| pose | the new pose to set for the robot. |
|
inline |
Applies commanded speeds to the physics solver.
| speeds | the chassis speeds to apply. |
|
inline |
Advances the robot state by one simulation tick.
| dtSeconds | timestep in seconds |