JSim 2026.06.01-p(1)
Loading...
Searching...
No Matches
frcsim::FlywheelWheelSim Class Reference

Single-wheel flywheel velocity model with optional closed-loop speed command behavior. More...

#include <shooter_wheel.hpp>

Classes

struct  MotorConfig
 DC motor approximation constants for flywheel drive. More...
struct  WheelConfig
 Flywheel wheel inertial/friction and ball-coupling parameters. More...
struct  ControlInput
 Control inputs for open-loop or simple internal velocity-loop operation. More...

Public Member Functions

 FlywheelWheelSim ()=default
 FlywheelWheelSim (const MotorConfig &motor, const WheelConfig &wheel)
 Constructs a wheel simulator with explicit motor and wheel configuration.
void setMotorConfig (const MotorConfig &motor)
 Sets motor constants.
void setWheelConfig (const WheelConfig &wheel)
 Sets wheel constants.
const MotorConfigmotorConfig () const
 Returns motor configuration.
const WheelConfigwheelConfig () const
 Returns wheel configuration.
void setAngularSpeedRadps (double omega_radps)
 Forces internal angular speed state.
double angularSpeedRadps () const
 Returns current wheel angular speed.
double surfaceSpeedMps () const
 Computes tangential speed at wheel perimeter.
double estimatedExitVelocityMps () const
 Estimates ball exit speed from current surface speed and coupling factor.
void step (double dt_s, const ControlInput &control)
 Advances the flywheel wheel state by one step.

Detailed Description

Single-wheel flywheel velocity model with optional closed-loop speed command behavior.

Constructor & Destructor Documentation

◆ FlywheelWheelSim() [1/2]

frcsim::FlywheelWheelSim::FlywheelWheelSim ( )
default

◆ FlywheelWheelSim() [2/2]

frcsim::FlywheelWheelSim::FlywheelWheelSim ( const MotorConfig & motor,
const WheelConfig & wheel )
inline

Constructs a wheel simulator with explicit motor and wheel configuration.

Parameters
motorMotor configuration constants.
wheelWheel mechanical configuration.

Member Function Documentation

◆ angularSpeedRadps()

double frcsim::FlywheelWheelSim::angularSpeedRadps ( ) const
inline

Returns current wheel angular speed.

Returns
Angular speed in rad/s.

◆ estimatedExitVelocityMps()

double frcsim::FlywheelWheelSim::estimatedExitVelocityMps ( ) const
inline

Estimates ball exit speed from current surface speed and coupling factor.

Returns
Exit speed in m/s.

◆ motorConfig()

const MotorConfig & frcsim::FlywheelWheelSim::motorConfig ( ) const
inline

Returns motor configuration.

Returns
Immutable MotorConfig reference.

◆ setAngularSpeedRadps()

void frcsim::FlywheelWheelSim::setAngularSpeedRadps ( double omega_radps)
inline

Forces internal angular speed state.

Parameters
omega_radpsWheel angular speed in rad/s.

◆ setMotorConfig()

void frcsim::FlywheelWheelSim::setMotorConfig ( const MotorConfig & motor)
inline

Sets motor constants.

Parameters
motorNew motor configuration.

◆ setWheelConfig()

void frcsim::FlywheelWheelSim::setWheelConfig ( const WheelConfig & wheel)
inline

Sets wheel constants.

Parameters
wheelNew wheel configuration.

◆ step()

void frcsim::FlywheelWheelSim::step ( double dt_s,
const ControlInput & control )
inline

Advances the flywheel wheel state by one step.

Parameters
dt_sTimestep in seconds.
controlControl input for this step.

◆ surfaceSpeedMps()

double frcsim::FlywheelWheelSim::surfaceSpeedMps ( ) const
inline

Computes tangential speed at wheel perimeter.

Returns
Surface speed in m/s.

◆ wheelConfig()

const WheelConfig & frcsim::FlywheelWheelSim::wheelConfig ( ) const
inline

Returns wheel configuration.

Returns
Immutable WheelConfig reference.

The documentation for this class was generated from the following file: