Lightweight intake interaction model that consumes nearby balls into robot inventory.
More...
#include <intake_simulation.hpp>
Lightweight intake interaction model that consumes nearby balls into robot inventory.
◆ IntakeSimulation() [1/2]
| frcsim::IntakeSimulation::IntakeSimulation |
( |
| ) |
|
|
default |
◆ IntakeSimulation() [2/2]
| frcsim::IntakeSimulation::IntakeSimulation |
( |
const Config & | config | ) |
|
|
inlineexplicit |
Constructs intake simulation with explicit config.
- Parameters
-
| config | Intake configuration to store. |
◆ config()
| const Config & frcsim::IntakeSimulation::config |
( |
| ) |
const |
|
inline |
Returns current configuration.
- Returns
- Immutable config reference.
◆ gamePiecesInIntakeCount()
| std::size_t frcsim::IntakeSimulation::gamePiecesInIntakeCount |
( |
| ) |
const |
|
inline |
Returns current intake inventory count.
- Returns
- Number of stored pieces.
◆ isRunning()
| bool frcsim::IntakeSimulation::isRunning |
( |
| ) |
const |
|
inline |
Returns whether intake processing is active.
- Returns
- True if running.
◆ obtainGamePieceFromIntake()
| bool frcsim::IntakeSimulation::obtainGamePieceFromIntake |
( |
| ) |
|
|
inline |
Removes one stored piece from intake inventory.
- Returns
- True when a piece was available and consumed.
◆ recentEvents()
| const std::deque< ContactEvent > & frcsim::IntakeSimulation::recentEvents |
( |
| ) |
const |
|
inline |
Returns contact events generated during the most recent update call.
- Returns
- Event deque.
◆ setConfig()
| void frcsim::IntakeSimulation::setConfig |
( |
const Config & | config | ) |
|
|
inline |
Replaces intake configuration.
- Parameters
-
◆ setCustomIntakeCondition()
| void frcsim::IntakeSimulation::setCustomIntakeCondition |
( |
const std::function< bool(std::size_t, const BallGamepieceSim &)> & | predicate | ) |
|
|
inline |
Sets optional custom acceptance predicate for candidate balls.
- Parameters
-
| predicate | Callable receiving gamepiece index and simulator state. |
◆ setRunning()
| void frcsim::IntakeSimulation::setRunning |
( |
bool | running | ) |
|
|
inline |
Enables/disables intake processing.
- Parameters
-
| running | True to enable update processing. |
◆ update()
Performs proximity scanning and intake processing for one simulation step.
- Parameters
-
| sim | Mutable gamepiece simulator state. |
The documentation for this class was generated from the following file: