JSim 2026.06.01-p(1)
Loading...
Searching...
No Matches
jsim.JSim Class Reference

Static Public Member Functions

static StateManager getStateManager ()
static SimRobot createRobot (RobotID id, Translation2d[] frameDimensions)
static SimRobot getRobot (RobotID id)
static PhysicsWorld createPhysicsWorld (double fixedDtSeconds, boolean enableGravity)
static PhysicsWorld getPhysicsWorld ()
static void initializeField (int year)
static void silenceJoystickWarnings ()

Detailed Description

Public entry point for common JSim accessors.

Member Function Documentation

◆ createPhysicsWorld()

PhysicsWorld jsim.JSim.createPhysicsWorld ( double fixedDtSeconds,
boolean enableGravity )
inlinestatic

Creates a new physics world.

Parameters
fixedDtSecondsfixed simulation timestep in seconds
enableGravitywhether 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
idthe robot identifier
frameDimensionsthe robot frame perimeter vertices
Returns
the created simulated robot

◆ getPhysicsWorld()

PhysicsWorld jsim.JSim.getPhysicsWorld ( )
inlinestatic

Returns the shared physics world, if one has been created.

Returns
the shared physics world, or null if none exists yet

◆ getRobot()

SimRobot jsim.JSim.getRobot ( RobotID id)
inlinestatic

Returns the simulated robot registered for the given driver-station id.

Parameters
idthe robot identifier
Returns
the registered simulated robot, or null if none exists

◆ getStateManager()

StateManager jsim.JSim.getStateManager ( )
inlinestatic

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
yearseason 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: