Public entry point for common JSim accessors.
◆ createPhysicsWorld()
| PhysicsWorld jsim.JSim.createPhysicsWorld |
( |
double | fixedDtSeconds, |
|
|
boolean | enableGravity ) |
|
inlinestatic |
Creates a new physics world.
- Parameters
-
| fixedDtSeconds | fixed simulation timestep in seconds |
| enableGravity | whether gravity is enabled for the world |
- Returns
- the created physics world
◆ createRobot()
| SimRobot jsim.JSim.createRobot |
( |
RobotID | id, |
|
|
Translation2d[] | frameDimensions ) |
|
inlinestatic |
Creates a simulated robot using the shared state manager.
- Parameters
-
| id | the robot identifier |
| frameDimensions | the robot frame perimeter vertices |
- Returns
- the created simulated robot
◆ getPhysicsWorld()
Returns the shared physics world, if one has been created.
- Returns
- the shared physics world, or
null if none exists yet
◆ getRobot()
Returns the simulated robot registered for the given driver-station id.
- Parameters
-
- Returns
- the registered simulated robot, or
null if none exists
◆ getStateManager()
Returns the shared simulation state manager.
- Returns
- the singleton state manager
◆ initializeField()
| void jsim.JSim.initializeField |
( |
int | year | ) |
|
|
inlinestatic |
Loads a built-in field definition by year and initializes the simulation field state. This is part of the JSim public API so examples and user code call into the vendordep.
- Parameters
-
| year | season year (e.g. 2026) |
◆ silenceJoystickWarnings()
| void jsim.JSim.silenceJoystickWarnings |
( |
| ) |
|
|
inlinestatic |
Silences WPILib joystick connection warnings if WPILib is present on the classpath. This uses reflection so callers don't need a compile-time dependency on WPILib.
The documentation for this class was generated from the following file: