mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[robotpy] Mirror most other subprojects (#8208)
GitOrigin-RevId: ac60fd3cf4a24023184376687da28373d14b781a This mirrors the robotpy files for the following projects: - apriltag - datalog - hal - ntcore - romiVendordep - wpilibc - wpimath - xrpVendordep This excludes cscore and the halsim wrappers for at this time. NOTE: This does not hook these projects up to the build system, just simply mirrors the files. The building will take place in a follow up PR to make it easier to review the changes necessary to build.
This commit is contained in:
12
wpilibc/src/main/python/semiwrap/simulation/ADXL345Sim.yml
Normal file
12
wpilibc/src/main/python/semiwrap/simulation/ADXL345Sim.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
extra_includes:
|
||||
- frc/ADXL345_I2C.h
|
||||
|
||||
classes:
|
||||
frc::sim::ADXL345Sim:
|
||||
methods:
|
||||
ADXL345Sim:
|
||||
overloads:
|
||||
const ADXL345_I2C&:
|
||||
SetX:
|
||||
SetY:
|
||||
SetZ:
|
||||
@@ -0,0 +1,26 @@
|
||||
extra_includes:
|
||||
- frc/AddressableLED.h
|
||||
|
||||
classes:
|
||||
frc::sim::AddressableLEDSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
AddressableLEDSim:
|
||||
overloads:
|
||||
const AddressableLED&:
|
||||
int:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterLengthCallback:
|
||||
GetLength:
|
||||
SetLength:
|
||||
RegisterDataCallback:
|
||||
GetData:
|
||||
SetData:
|
||||
RegisterStartCallback:
|
||||
GetStart:
|
||||
SetStart:
|
||||
GetGlobalData:
|
||||
SetGlobalData:
|
||||
@@ -0,0 +1,11 @@
|
||||
extra_includes:
|
||||
- frc/AnalogEncoder.h
|
||||
|
||||
classes:
|
||||
frc::sim::AnalogEncoderSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
AnalogEncoderSim:
|
||||
Set:
|
||||
Get:
|
||||
@@ -0,0 +1,25 @@
|
||||
extra_includes:
|
||||
- frc/AnalogInput.h
|
||||
|
||||
classes:
|
||||
frc::sim::AnalogInputSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
AnalogInputSim:
|
||||
overloads:
|
||||
const AnalogInput&:
|
||||
int:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterAverageBitsCallback:
|
||||
GetAverageBits:
|
||||
SetAverageBits:
|
||||
RegisterOversampleBitsCallback:
|
||||
GetOversampleBits:
|
||||
SetOversampleBits:
|
||||
RegisterVoltageCallback:
|
||||
GetVoltage:
|
||||
SetVoltage:
|
||||
ResetData:
|
||||
13
wpilibc/src/main/python/semiwrap/simulation/BatterySim.yml
Normal file
13
wpilibc/src/main/python/semiwrap/simulation/BatterySim.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
classes:
|
||||
frc::sim::BatterySim:
|
||||
force_type_casters:
|
||||
- units::ampere_t
|
||||
methods:
|
||||
Calculate:
|
||||
overloads:
|
||||
units::volt_t, units::ohm_t, std::span<const units::ampere_t>:
|
||||
units::volt_t, units::ohm_t, std::initializer_list<units::ampere_t>:
|
||||
ignore: true
|
||||
std::span<const units::ampere_t>:
|
||||
std::initializer_list<units::ampere_t>:
|
||||
ignore: true
|
||||
36
wpilibc/src/main/python/semiwrap/simulation/CTREPCMSim.yml
Normal file
36
wpilibc/src/main/python/semiwrap/simulation/CTREPCMSim.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
extra_includes:
|
||||
- frc/Compressor.h
|
||||
|
||||
classes:
|
||||
frc::sim::CTREPCMSim:
|
||||
typealias:
|
||||
- frc::PneumaticsBase
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
CTREPCMSim:
|
||||
overloads:
|
||||
'':
|
||||
int:
|
||||
const PneumaticsBase&:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterSolenoidOutputCallback:
|
||||
GetSolenoidOutput:
|
||||
SetSolenoidOutput:
|
||||
RegisterCompressorOnCallback:
|
||||
GetCompressorOn:
|
||||
SetCompressorOn:
|
||||
RegisterClosedLoopEnabledCallback:
|
||||
GetClosedLoopEnabled:
|
||||
SetClosedLoopEnabled:
|
||||
RegisterPressureSwitchCallback:
|
||||
GetPressureSwitch:
|
||||
SetPressureSwitch:
|
||||
RegisterCompressorCurrentCallback:
|
||||
GetCompressorCurrent:
|
||||
SetCompressorCurrent:
|
||||
GetAllSolenoidOutputs:
|
||||
SetAllSolenoidOutputs:
|
||||
ResetData:
|
||||
@@ -0,0 +1,26 @@
|
||||
functions:
|
||||
CallbackStoreThunk:
|
||||
ignore: true
|
||||
ConstBufferCallbackStoreThunk:
|
||||
ignore: true
|
||||
classes:
|
||||
frc::sim::CallbackStore:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
CallbackStore:
|
||||
overloads:
|
||||
# All are ignored because pybind11 can't use raw function pointers
|
||||
int32_t, NotifyCallback, CancelCallbackNoIndexFunc:
|
||||
ignore: true
|
||||
int32_t, int32_t, NotifyCallback, CancelCallbackFunc:
|
||||
ignore: true
|
||||
int32_t, int32_t, int32_t, NotifyCallback, CancelCallbackChannelFunc:
|
||||
ignore: true
|
||||
int32_t, ConstBufferCallback, CancelCallbackNoIndexFunc:
|
||||
ignore: true
|
||||
int32_t, int32_t, ConstBufferCallback, CancelCallbackFunc:
|
||||
ignore: true
|
||||
int32_t, int32_t, int32_t, ConstBufferCallback, CancelCallbackChannelFunc:
|
||||
ignore: true
|
||||
SetUid:
|
||||
35
wpilibc/src/main/python/semiwrap/simulation/DCMotorSim.yml
Normal file
35
wpilibc/src/main/python/semiwrap/simulation/DCMotorSim.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
classes:
|
||||
frc::sim::DCMotorSim:
|
||||
typealias:
|
||||
- frc::DCMotor
|
||||
methods:
|
||||
DCMotorSim:
|
||||
overloads:
|
||||
const LinearSystem<2, 1, 2>&, const DCMotor&, const std::array<double, 2>&:
|
||||
param_override:
|
||||
plant:
|
||||
x_type: frc::LinearSystem<2,1,2>
|
||||
SetState:
|
||||
GetAngularPosition:
|
||||
GetAngularVelocity:
|
||||
GetCurrentDraw:
|
||||
SetInputVoltage:
|
||||
GetAngularAcceleration:
|
||||
GetTorque:
|
||||
GetInputVoltage:
|
||||
GetGearbox:
|
||||
GetGearing:
|
||||
GetJ:
|
||||
SetAngle:
|
||||
SetAngularVelocity:
|
||||
|
||||
inline_code: |
|
||||
cls_DCMotorSim
|
||||
// java API compatibility
|
||||
.def("getAngularPositionRotations", [](const DCMotorSim &self) {
|
||||
return units::turn_t{self.GetAngularPosition()};
|
||||
}, py::doc("Returns the DC motor position in rotations"))
|
||||
.def("getAngularVelocityRPM", [](const DCMotorSim &self) {
|
||||
return units::revolutions_per_minute_t{self.GetAngularVelocity()};
|
||||
}, py::doc("Returns the DC motor velocity in revolutions per minute"))
|
||||
;
|
||||
30
wpilibc/src/main/python/semiwrap/simulation/DIOSim.yml
Normal file
30
wpilibc/src/main/python/semiwrap/simulation/DIOSim.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
extra_includes:
|
||||
- frc/DigitalInput.h
|
||||
- frc/DigitalOutput.h
|
||||
|
||||
classes:
|
||||
frc::sim::DIOSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
DIOSim:
|
||||
overloads:
|
||||
const DigitalInput&:
|
||||
const DigitalOutput&:
|
||||
int:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterValueCallback:
|
||||
GetValue:
|
||||
SetValue:
|
||||
RegisterPulseLengthCallback:
|
||||
GetPulseLength:
|
||||
SetPulseLength:
|
||||
RegisterIsInputCallback:
|
||||
GetIsInput:
|
||||
SetIsInput:
|
||||
RegisterFilterIndexCallback:
|
||||
GetFilterIndex:
|
||||
SetFilterIndex:
|
||||
ResetData:
|
||||
@@ -0,0 +1,96 @@
|
||||
classes:
|
||||
frc::sim::DifferentialDrivetrainSim:
|
||||
typealias:
|
||||
- frc::DCMotor
|
||||
- template <int S, int I, int O> using LinearSystem = frc::LinearSystem<S, I, O>
|
||||
methods:
|
||||
DifferentialDrivetrainSim:
|
||||
overloads:
|
||||
LinearSystem<2, 2, 2>, units::meter_t, DCMotor, double, units::meter_t, const std::array<double, 7>&:
|
||||
param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 7>{}
|
||||
? frc::DCMotor, double, units::kilogram_square_meter_t, units::kilogram_t, units::meter_t, units::meter_t, const std::array<double, 7>&
|
||||
: param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 7>{}
|
||||
ClampInput:
|
||||
SetInputs:
|
||||
SetGearing:
|
||||
Update:
|
||||
GetGearing:
|
||||
GetHeading:
|
||||
GetPose:
|
||||
GetRightPosition:
|
||||
GetRightVelocity:
|
||||
GetLeftPosition:
|
||||
GetLeftVelocity:
|
||||
GetRightCurrentDraw:
|
||||
GetLeftCurrentDraw:
|
||||
GetCurrentDraw:
|
||||
SetState:
|
||||
SetPose:
|
||||
Dynamics:
|
||||
CreateKitbotSim:
|
||||
overloads:
|
||||
frc::DCMotor, double, units::meter_t, const std::array<double, 7>&:
|
||||
param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 7>{}
|
||||
frc::DCMotor, double, units::meter_t, units::kilogram_square_meter_t, const std::array<double, 7>&:
|
||||
param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 7>{}
|
||||
frc::sim::DifferentialDrivetrainSim::State:
|
||||
attributes:
|
||||
kX:
|
||||
kY:
|
||||
kHeading:
|
||||
kLeftVelocity:
|
||||
kRightVelocity:
|
||||
kLeftPosition:
|
||||
kRightPosition:
|
||||
frc::sim::DifferentialDrivetrainSim::KitbotGearing:
|
||||
attributes:
|
||||
k12p75:
|
||||
k10p71:
|
||||
k8p45:
|
||||
k7p31:
|
||||
k5p95:
|
||||
frc::sim::DifferentialDrivetrainSim::KitbotMotor:
|
||||
attributes:
|
||||
SingleCIMPerSide:
|
||||
DualCIMPerSide:
|
||||
SingleMiniCIMPerSide:
|
||||
DualMiniCIMPerSide:
|
||||
SingleFalcon500PerSide:
|
||||
DualFalcon500PerSide:
|
||||
SingleNEOPerSide:
|
||||
DualNEOPerSide:
|
||||
frc::sim::DifferentialDrivetrainSim::KitbotWheelSize:
|
||||
attributes:
|
||||
kSixInch:
|
||||
kEightInch:
|
||||
kTenInch:
|
||||
|
||||
inline_code: |-
|
||||
cls_DifferentialDrivetrainSim
|
||||
.def("getLeftPositionFeet", [](DifferentialDrivetrainSim * self) -> units::foot_t {
|
||||
return self->GetLeftPosition();
|
||||
})
|
||||
.def("getLeftPositionInches", [](DifferentialDrivetrainSim * self) -> units::inch_t {
|
||||
return self->GetLeftPosition();
|
||||
})
|
||||
.def("getLeftVelocityFps", [](DifferentialDrivetrainSim * self) -> units::feet_per_second_t {
|
||||
return self->GetLeftVelocity();
|
||||
})
|
||||
.def("getRightPositionFeet", [](DifferentialDrivetrainSim * self) -> units::foot_t {
|
||||
return self->GetRightPosition();
|
||||
})
|
||||
.def("getRightPositionInches", [](DifferentialDrivetrainSim * self) -> units::inch_t {
|
||||
return self->GetRightPosition();
|
||||
})
|
||||
.def("getRightVelocityFps", [](DifferentialDrivetrainSim * self) -> units::feet_per_second_t {
|
||||
return self->GetRightVelocity();
|
||||
})
|
||||
;
|
||||
@@ -0,0 +1,23 @@
|
||||
extra_includes:
|
||||
- frc/DigitalOutput.h
|
||||
|
||||
classes:
|
||||
frc::sim::DigitalPWMSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
DigitalPWMSim:
|
||||
overloads:
|
||||
const DigitalOutput&:
|
||||
CreateForChannel:
|
||||
CreateForIndex:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterDutyCycleCallback:
|
||||
GetDutyCycle:
|
||||
SetDutyCycle:
|
||||
RegisterPinCallback:
|
||||
GetPin:
|
||||
SetPin:
|
||||
ResetData:
|
||||
@@ -0,0 +1,13 @@
|
||||
classes:
|
||||
frc::sim::DoubleSolenoidSim:
|
||||
typealias:
|
||||
- frc::PneumaticsModuleType
|
||||
methods:
|
||||
DoubleSolenoidSim:
|
||||
overloads:
|
||||
std::shared_ptr<PneumaticsBaseSim>, int, int:
|
||||
int, PneumaticsModuleType, int, int:
|
||||
PneumaticsModuleType, int, int:
|
||||
Get:
|
||||
Set:
|
||||
GetModuleSim:
|
||||
@@ -0,0 +1,51 @@
|
||||
classes:
|
||||
frc::sim::DriverStationSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
RegisterEnabledCallback:
|
||||
GetEnabled:
|
||||
SetEnabled:
|
||||
RegisterAutonomousCallback:
|
||||
GetAutonomous:
|
||||
SetAutonomous:
|
||||
RegisterTestCallback:
|
||||
GetTest:
|
||||
SetTest:
|
||||
RegisterEStopCallback:
|
||||
GetEStop:
|
||||
SetEStop:
|
||||
RegisterFmsAttachedCallback:
|
||||
GetFmsAttached:
|
||||
SetFmsAttached:
|
||||
RegisterDsAttachedCallback:
|
||||
GetDsAttached:
|
||||
SetDsAttached:
|
||||
RegisterAllianceStationIdCallback:
|
||||
GetAllianceStationId:
|
||||
SetAllianceStationId:
|
||||
RegisterMatchTimeCallback:
|
||||
GetMatchTime:
|
||||
SetMatchTime:
|
||||
NotifyNewData:
|
||||
SetSendError:
|
||||
SetSendConsoleLine:
|
||||
GetJoystickOutputs:
|
||||
GetJoystickRumble:
|
||||
SetJoystickButton:
|
||||
SetJoystickAxis:
|
||||
SetJoystickPOV:
|
||||
SetJoystickButtons:
|
||||
SetJoystickAxisCount:
|
||||
SetJoystickPOVCount:
|
||||
SetJoystickButtonCount:
|
||||
SetJoystickType:
|
||||
SetJoystickName:
|
||||
SetJoystickAxisType:
|
||||
SetGameSpecificMessage:
|
||||
SetEventName:
|
||||
SetMatchType:
|
||||
SetMatchNumber:
|
||||
SetReplayNumber:
|
||||
ResetData:
|
||||
SetJoystickIsGamepad:
|
||||
@@ -0,0 +1,14 @@
|
||||
extra_includes:
|
||||
- frc/DutyCycleEncoder.h
|
||||
|
||||
classes:
|
||||
frc::sim::DutyCycleEncoderSim:
|
||||
methods:
|
||||
DutyCycleEncoderSim:
|
||||
overloads:
|
||||
const DutyCycleEncoder&:
|
||||
int:
|
||||
Get:
|
||||
Set:
|
||||
IsConnected:
|
||||
SetConnected:
|
||||
22
wpilibc/src/main/python/semiwrap/simulation/DutyCycleSim.yml
Normal file
22
wpilibc/src/main/python/semiwrap/simulation/DutyCycleSim.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
extra_includes:
|
||||
- frc/DutyCycle.h
|
||||
|
||||
classes:
|
||||
frc::sim::DutyCycleSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
DutyCycleSim:
|
||||
overloads:
|
||||
const DutyCycle&:
|
||||
CreateForChannel:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterFrequencyCallback:
|
||||
GetFrequency:
|
||||
SetFrequency:
|
||||
RegisterOutputCallback:
|
||||
GetOutput:
|
||||
SetOutput:
|
||||
ResetData:
|
||||
42
wpilibc/src/main/python/semiwrap/simulation/ElevatorSim.yml
Normal file
42
wpilibc/src/main/python/semiwrap/simulation/ElevatorSim.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
classes:
|
||||
frc::sim::ElevatorSim:
|
||||
typealias:
|
||||
- frc::DCMotor
|
||||
- template <int S, int I, int O> using LinearSystem = frc::LinearSystem<S, I, O>
|
||||
- template <int I> using Vectord = frc::Vectord<I>
|
||||
methods:
|
||||
ElevatorSim:
|
||||
overloads:
|
||||
? const LinearSystem<2, 1, 2>&, const DCMotor&, units::meter_t, units::meter_t, bool, units::meter_t, const std::array<double, 2>&
|
||||
: param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 2>{0.0, 0.0}
|
||||
? const DCMotor&, double, units::kilogram_t, units::meter_t, units::meter_t, units::meter_t, bool, units::meter_t, const std::array<double, 2>&
|
||||
: param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 2>{0.0}
|
||||
? decltype(1_V/Velocity_t<Distance> (1)), decltype(1_V/Acceleration_t<Distance> (1)), const DCMotor&, units::meter_t, units::meter_t, bool, units::meter_t, const std::array<double, 2>&
|
||||
: ignore: true
|
||||
SetState:
|
||||
WouldHitLowerLimit:
|
||||
WouldHitUpperLimit:
|
||||
HasHitLowerLimit:
|
||||
HasHitUpperLimit:
|
||||
GetPosition:
|
||||
GetVelocity:
|
||||
GetCurrentDraw:
|
||||
SetInputVoltage:
|
||||
UpdateX:
|
||||
|
||||
inline_code: |-
|
||||
cls_ElevatorSim
|
||||
.def("getPositionFeet", [](ElevatorSim * self) -> units::foot_t {
|
||||
return self->GetPosition();
|
||||
})
|
||||
.def("getPositionInches", [](ElevatorSim * self) -> units::inch_t {
|
||||
return self->GetPosition();
|
||||
})
|
||||
.def("getVelocityFps", [](ElevatorSim * self) -> units::feet_per_second_t {
|
||||
return self->GetVelocity();
|
||||
})
|
||||
;
|
||||
45
wpilibc/src/main/python/semiwrap/simulation/EncoderSim.yml
Normal file
45
wpilibc/src/main/python/semiwrap/simulation/EncoderSim.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
extra_includes:
|
||||
- frc/Encoder.h
|
||||
|
||||
classes:
|
||||
frc::sim::EncoderSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
EncoderSim:
|
||||
overloads:
|
||||
const Encoder&:
|
||||
CreateForChannel:
|
||||
CreateForIndex:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterCountCallback:
|
||||
GetCount:
|
||||
SetCount:
|
||||
RegisterPeriodCallback:
|
||||
GetPeriod:
|
||||
SetPeriod:
|
||||
RegisterResetCallback:
|
||||
GetReset:
|
||||
SetReset:
|
||||
RegisterMaxPeriodCallback:
|
||||
GetMaxPeriod:
|
||||
SetMaxPeriod:
|
||||
RegisterDirectionCallback:
|
||||
GetDirection:
|
||||
SetDirection:
|
||||
RegisterReverseDirectionCallback:
|
||||
GetReverseDirection:
|
||||
SetReverseDirection:
|
||||
RegisterSamplesToAverageCallback:
|
||||
GetSamplesToAverage:
|
||||
SetSamplesToAverage:
|
||||
RegisterDistancePerPulseCallback:
|
||||
GetDistancePerPulse:
|
||||
SetDistancePerPulse:
|
||||
ResetData:
|
||||
SetDistance:
|
||||
GetDistance:
|
||||
SetRate:
|
||||
GetRate:
|
||||
27
wpilibc/src/main/python/semiwrap/simulation/FlywheelSim.yml
Normal file
27
wpilibc/src/main/python/semiwrap/simulation/FlywheelSim.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
classes:
|
||||
frc::sim::FlywheelSim:
|
||||
typealias:
|
||||
- frc::DCMotor
|
||||
- template <int S, int I, int O> using LinearSystem = frc::LinearSystem<S, I, O>
|
||||
methods:
|
||||
FlywheelSim:
|
||||
overloads:
|
||||
const LinearSystem<1, 1, 1>&, const DCMotor&, double, const std::array<double, 1>&:
|
||||
param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 1>{0.0}
|
||||
const DCMotor&, double, units::kilogram_square_meter_t, const std::array<double, 1>&:
|
||||
param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 1>{0.0}
|
||||
SetState:
|
||||
GetAngularVelocity:
|
||||
GetCurrentDraw:
|
||||
SetInputVoltage:
|
||||
SetVelocity:
|
||||
GetAngularAcceleration:
|
||||
GetTorque:
|
||||
GetInputVoltage:
|
||||
Gearbox:
|
||||
Gearing:
|
||||
J:
|
||||
@@ -0,0 +1,23 @@
|
||||
classes:
|
||||
frc::sim::GenericHIDSim:
|
||||
methods:
|
||||
GenericHIDSim:
|
||||
overloads:
|
||||
const GenericHID&:
|
||||
int:
|
||||
NotifyNewData:
|
||||
SetRawButton:
|
||||
SetRawAxis:
|
||||
SetPOV:
|
||||
overloads:
|
||||
int, DriverStation::POVDirection:
|
||||
DriverStation::POVDirection:
|
||||
SetAxisCount:
|
||||
SetPOVCount:
|
||||
SetButtonCount:
|
||||
SetType:
|
||||
SetName:
|
||||
SetAxisType:
|
||||
GetOutput:
|
||||
GetOutputs:
|
||||
GetRumble:
|
||||
18
wpilibc/src/main/python/semiwrap/simulation/JoystickSim.yml
Normal file
18
wpilibc/src/main/python/semiwrap/simulation/JoystickSim.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
extra_includes:
|
||||
- frc/Joystick.h
|
||||
|
||||
classes:
|
||||
frc::sim::JoystickSim:
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
JoystickSim:
|
||||
overloads:
|
||||
const Joystick&:
|
||||
int:
|
||||
SetX:
|
||||
SetY:
|
||||
SetZ:
|
||||
SetTwist:
|
||||
SetThrottle:
|
||||
SetTrigger:
|
||||
SetTop:
|
||||
@@ -0,0 +1,75 @@
|
||||
classes:
|
||||
frc::sim::LinearSystemSim:
|
||||
typealias:
|
||||
- template <int S, int I, int O> using LinearSystem = frc::LinearSystem<S, I, O>
|
||||
- template <int I> using Vectord = frc::Vectord<I>
|
||||
template_params:
|
||||
- int States
|
||||
- int Inputs
|
||||
- int Outputs
|
||||
attributes:
|
||||
m_plant:
|
||||
m_x:
|
||||
m_y:
|
||||
m_u:
|
||||
m_measurementStdDevs:
|
||||
methods:
|
||||
LinearSystemSim:
|
||||
param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, Outputs>{}
|
||||
Update:
|
||||
GetOutput:
|
||||
overloads:
|
||||
'[const]':
|
||||
int [const]:
|
||||
SetInput:
|
||||
overloads:
|
||||
const Vectord<Inputs>&:
|
||||
int, double:
|
||||
GetInput:
|
||||
overloads:
|
||||
'[const]':
|
||||
int [const]:
|
||||
SetState:
|
||||
UpdateX:
|
||||
ClampInput:
|
||||
|
||||
|
||||
templates:
|
||||
LinearSystemSim_1_1_1:
|
||||
qualname: frc::sim::LinearSystemSim
|
||||
params:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
LinearSystemSim_1_1_2:
|
||||
qualname: frc::sim::LinearSystemSim
|
||||
params:
|
||||
- 1
|
||||
- 1
|
||||
- 2
|
||||
LinearSystemSim_2_1_1:
|
||||
qualname: frc::sim::LinearSystemSim
|
||||
params:
|
||||
- 2
|
||||
- 1
|
||||
- 1
|
||||
LinearSystemSim_2_1_2:
|
||||
qualname: frc::sim::LinearSystemSim
|
||||
params:
|
||||
- 2
|
||||
- 1
|
||||
- 2
|
||||
LinearSystemSim_2_2_1:
|
||||
qualname: frc::sim::LinearSystemSim
|
||||
params:
|
||||
- 2
|
||||
- 2
|
||||
- 1
|
||||
LinearSystemSim_2_2_2:
|
||||
qualname: frc::sim::LinearSystemSim
|
||||
params:
|
||||
- 2
|
||||
- 2
|
||||
- 2
|
||||
@@ -0,0 +1,33 @@
|
||||
extra_includes:
|
||||
- frc/PS4Controller.h
|
||||
|
||||
classes:
|
||||
frc::sim::PS4ControllerSim:
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
PS4ControllerSim:
|
||||
overloads:
|
||||
const PS4Controller&:
|
||||
int:
|
||||
SetLeftX:
|
||||
SetRightX:
|
||||
SetLeftY:
|
||||
SetRightY:
|
||||
SetL2Axis:
|
||||
SetR2Axis:
|
||||
SetSquareButton:
|
||||
SetCrossButton:
|
||||
SetCircleButton:
|
||||
SetTriangleButton:
|
||||
SetL1Button:
|
||||
SetR1Button:
|
||||
SetL2Button:
|
||||
SetR2Button:
|
||||
SetShareButton:
|
||||
SetOptionsButton:
|
||||
SetL3Button:
|
||||
SetR3Button:
|
||||
SetPSButton:
|
||||
SetTouchpad:
|
||||
ignore: true
|
||||
SetTouchpadButton:
|
||||
@@ -0,0 +1,33 @@
|
||||
extra_includes:
|
||||
- frc/PS5Controller.h
|
||||
|
||||
classes:
|
||||
frc::sim::PS5ControllerSim:
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
PS5ControllerSim:
|
||||
overloads:
|
||||
const PS5Controller&:
|
||||
int:
|
||||
SetLeftX:
|
||||
SetRightX:
|
||||
SetLeftY:
|
||||
SetRightY:
|
||||
SetL2Axis:
|
||||
SetR2Axis:
|
||||
SetSquareButton:
|
||||
SetCrossButton:
|
||||
SetCircleButton:
|
||||
SetTriangleButton:
|
||||
SetL1Button:
|
||||
SetR1Button:
|
||||
SetL2Button:
|
||||
SetR2Button:
|
||||
SetCreateButton:
|
||||
SetOptionsButton:
|
||||
SetL3Button:
|
||||
SetR3Button:
|
||||
SetPSButton:
|
||||
SetTouchpad:
|
||||
ignore: true
|
||||
SetTouchpadButton:
|
||||
@@ -0,0 +1,8 @@
|
||||
classes:
|
||||
frc::sim::PWMMotorControllerSim:
|
||||
methods:
|
||||
PWMMotorControllerSim:
|
||||
overloads:
|
||||
const PWMMotorController&:
|
||||
int:
|
||||
GetSpeed:
|
||||
23
wpilibc/src/main/python/semiwrap/simulation/PWMSim.yml
Normal file
23
wpilibc/src/main/python/semiwrap/simulation/PWMSim.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
extra_includes:
|
||||
- frc/PWM.h
|
||||
- frc/motorcontrol/PWMMotorController.h
|
||||
|
||||
classes:
|
||||
frc::sim::PWMSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
PWMSim:
|
||||
overloads:
|
||||
const PWM&:
|
||||
int:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterPulseMicrosecondCallback:
|
||||
GetPulseMicrosecond:
|
||||
SetPulseMicrosecond:
|
||||
ResetData:
|
||||
RegisterOutputPeriodCallback:
|
||||
GetOutputPeriod:
|
||||
SetOutputPeriod:
|
||||
@@ -0,0 +1,32 @@
|
||||
classes:
|
||||
frc::sim::PneumaticsBaseSim:
|
||||
typealias:
|
||||
- frc::PneumaticsBase
|
||||
attributes:
|
||||
m_index:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
GetForType:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterInitializedCallback:
|
||||
GetCompressorOn:
|
||||
SetCompressorOn:
|
||||
RegisterCompressorOnCallback:
|
||||
GetSolenoidOutput:
|
||||
SetSolenoidOutput:
|
||||
RegisterSolenoidOutputCallback:
|
||||
GetPressureSwitch:
|
||||
SetPressureSwitch:
|
||||
RegisterPressureSwitchCallback:
|
||||
GetCompressorCurrent:
|
||||
SetCompressorCurrent:
|
||||
RegisterCompressorCurrentCallback:
|
||||
GetAllSolenoidOutputs:
|
||||
SetAllSolenoidOutputs:
|
||||
ResetData:
|
||||
PneumaticsBaseSim:
|
||||
overloads:
|
||||
const PneumaticsBase&:
|
||||
const int:
|
||||
@@ -0,0 +1,27 @@
|
||||
extra_includes:
|
||||
- frc/PowerDistribution.h
|
||||
|
||||
classes:
|
||||
frc::sim::PowerDistributionSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
PowerDistributionSim:
|
||||
overloads:
|
||||
int:
|
||||
const PowerDistribution&:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterTemperatureCallback:
|
||||
GetTemperature:
|
||||
SetTemperature:
|
||||
RegisterVoltageCallback:
|
||||
GetVoltage:
|
||||
SetVoltage:
|
||||
RegisterCurrentCallback:
|
||||
GetCurrent:
|
||||
SetCurrent:
|
||||
GetAllCurrents:
|
||||
SetAllCurrents:
|
||||
ResetData:
|
||||
36
wpilibc/src/main/python/semiwrap/simulation/REVPHSim.yml
Normal file
36
wpilibc/src/main/python/semiwrap/simulation/REVPHSim.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
extra_includes:
|
||||
- frc/Compressor.h
|
||||
|
||||
classes:
|
||||
frc::sim::REVPHSim:
|
||||
typealias:
|
||||
- frc::PneumaticsBase
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
REVPHSim:
|
||||
overloads:
|
||||
'':
|
||||
int:
|
||||
const PneumaticsBase&:
|
||||
RegisterInitializedCallback:
|
||||
GetInitialized:
|
||||
SetInitialized:
|
||||
RegisterSolenoidOutputCallback:
|
||||
GetSolenoidOutput:
|
||||
SetSolenoidOutput:
|
||||
RegisterCompressorOnCallback:
|
||||
GetCompressorOn:
|
||||
SetCompressorOn:
|
||||
RegisterCompressorConfigTypeCallback:
|
||||
GetCompressorConfigType:
|
||||
SetCompressorConfigType:
|
||||
RegisterPressureSwitchCallback:
|
||||
GetPressureSwitch:
|
||||
SetPressureSwitch:
|
||||
RegisterCompressorCurrentCallback:
|
||||
GetCompressorCurrent:
|
||||
SetCompressorCurrent:
|
||||
GetAllSolenoidOutputs:
|
||||
SetAllSolenoidOutputs:
|
||||
ResetData:
|
||||
34
wpilibc/src/main/python/semiwrap/simulation/RoboRioSim.yml
Normal file
34
wpilibc/src/main/python/semiwrap/simulation/RoboRioSim.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
classes:
|
||||
frc::sim::RoboRioSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
methods:
|
||||
RegisterVInVoltageCallback:
|
||||
GetVInVoltage:
|
||||
SetVInVoltage:
|
||||
RegisterUserVoltage3V3Callback:
|
||||
GetUserVoltage3V3:
|
||||
SetUserVoltage3V3:
|
||||
RegisterUserCurrent3V3Callback:
|
||||
GetUserCurrent3V3:
|
||||
SetUserCurrent3V3:
|
||||
RegisterUserActive3V3Callback:
|
||||
GetUserActive3V3:
|
||||
SetUserActive3V3:
|
||||
RegisterUserFaults3V3Callback:
|
||||
GetUserFaults3V3:
|
||||
SetUserFaults3V3:
|
||||
RegisterBrownoutVoltageCallback:
|
||||
GetBrownoutVoltage:
|
||||
SetBrownoutVoltage:
|
||||
RegisterCPUTempCallback:
|
||||
GetCPUTemp:
|
||||
SetCPUTemp:
|
||||
RegisterTeamNumberCallback:
|
||||
GetTeamNumber:
|
||||
SetTeamNumber:
|
||||
GetSerialNumber:
|
||||
SetSerialNumber:
|
||||
GetComments:
|
||||
SetComments:
|
||||
ResetData:
|
||||
@@ -0,0 +1,8 @@
|
||||
classes:
|
||||
frc::sim::SendableChooserSim:
|
||||
methods:
|
||||
SendableChooserSim:
|
||||
overloads:
|
||||
std::string_view:
|
||||
nt::NetworkTableInstance, std::string_view:
|
||||
SetSelected:
|
||||
9
wpilibc/src/main/python/semiwrap/simulation/ServoSim.yml
Normal file
9
wpilibc/src/main/python/semiwrap/simulation/ServoSim.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
classes:
|
||||
frc::sim::ServoSim:
|
||||
methods:
|
||||
ServoSim:
|
||||
overloads:
|
||||
const Servo&:
|
||||
int:
|
||||
GetPosition:
|
||||
GetAngle:
|
||||
@@ -0,0 +1,8 @@
|
||||
classes:
|
||||
frc::SharpIRSim:
|
||||
methods:
|
||||
SharpIRSim:
|
||||
overloads:
|
||||
const SharpIR&:
|
||||
int:
|
||||
SetRange:
|
||||
85
wpilibc/src/main/python/semiwrap/simulation/SimDeviceSim.yml
Normal file
85
wpilibc/src/main/python/semiwrap/simulation/SimDeviceSim.yml
Normal file
@@ -0,0 +1,85 @@
|
||||
extra_includes:
|
||||
- pybind11/stl.h
|
||||
|
||||
classes:
|
||||
frc::sim::SimDeviceSim:
|
||||
doc: |
|
||||
Interact with a generic simulated device
|
||||
|
||||
Any devices that support simulation but don't have a dedicated sim
|
||||
object associated with it can be interacted with via this object.
|
||||
You just need to know the name of the associated object.
|
||||
|
||||
Here are two ways to find the names of available devices:
|
||||
|
||||
* The static function :meth:`.enumerateDevices` can give you a list of
|
||||
all available devices -- note that the device must be created first
|
||||
before this will return any results!
|
||||
* When running the WPILib simulation GUI, the names of the 'Other Devices'
|
||||
panel are names of devices that you can interact with via this class.
|
||||
|
||||
Once you've created a simulated device, you can use the :meth:`.enumerateValues`
|
||||
method to determine what values you can interact with.
|
||||
|
||||
|
||||
.. note:: WPILib has simulation support for all of its devices. Some
|
||||
vendors may only have limited support for simulation -- read
|
||||
the vendor's documentation or contact them for more information.
|
||||
force_type_casters:
|
||||
- std::function
|
||||
- std::string_view
|
||||
methods:
|
||||
SimDeviceSim:
|
||||
overloads:
|
||||
const char*:
|
||||
const char*, int:
|
||||
const char*, int, int:
|
||||
HAL_SimDeviceHandle:
|
||||
GetName:
|
||||
GetValue:
|
||||
doc: |
|
||||
Provides a readonly mechanism to retrieve all types of device values
|
||||
GetInt:
|
||||
doc: |
|
||||
Retrieves an object that allows you to interact with simulated values
|
||||
represented as an integer.
|
||||
GetLong:
|
||||
doc: |
|
||||
Retrieves an object that allows you to interact with simulated values
|
||||
represented as a long.
|
||||
GetDouble:
|
||||
doc: |
|
||||
Retrieves an object that allows you to interact with simulated values
|
||||
represented as a double.
|
||||
GetEnum:
|
||||
GetBoolean:
|
||||
doc: |
|
||||
Retrieves an object that allows you to interact with simulated values
|
||||
represented as a boolean.
|
||||
GetEnumOptions:
|
||||
EnumerateValues:
|
||||
ignore: true
|
||||
EnumerateDevices:
|
||||
ignore: true
|
||||
ResetData:
|
||||
|
||||
inline_code: |
|
||||
cls_SimDeviceSim
|
||||
.def("enumerateValues", [](frc::sim::SimDeviceSim * that) {
|
||||
std::vector<std::pair<std::string, bool>> values;
|
||||
that->EnumerateValues([&values](const char * name, HAL_SimValueHandle handle,
|
||||
HAL_Bool readonly, const struct HAL_Value * value){
|
||||
values.push_back(std::pair<std::string, bool>(name, readonly));
|
||||
});
|
||||
return values;
|
||||
}, release_gil(),
|
||||
"Returns a list of (name, readonly) tuples of available values for this device")
|
||||
.def_static("enumerateDevices", [](const char * prefix) {
|
||||
std::vector<std::string> devices;
|
||||
frc::sim::SimDeviceSim::EnumerateDevices(prefix, [&devices](const char * name, HAL_SimDeviceHandle handle) {
|
||||
devices.push_back(std::string(name));
|
||||
});
|
||||
return devices;
|
||||
}, release_gil(),
|
||||
py::arg("prefix")="",
|
||||
"Returns a list of available device names\n");
|
||||
11
wpilibc/src/main/python/semiwrap/simulation/SimHooks.yml
Normal file
11
wpilibc/src/main/python/semiwrap/simulation/SimHooks.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
functions:
|
||||
SetRuntimeType:
|
||||
WaitForProgramStart:
|
||||
SetProgramStarted:
|
||||
GetProgramStarted:
|
||||
RestartTiming:
|
||||
PauseTiming:
|
||||
ResumeTiming:
|
||||
IsTimingPaused:
|
||||
StepTiming:
|
||||
StepTimingAsync:
|
||||
@@ -0,0 +1,38 @@
|
||||
classes:
|
||||
frc::sim::SingleJointedArmSim:
|
||||
typealias:
|
||||
- frc::DCMotor
|
||||
- template <int S, int I, int O> using LinearSystem = frc::LinearSystem<S, I, O>
|
||||
- template <int I> using Vectord = frc::Vectord<I>
|
||||
methods:
|
||||
SingleJointedArmSim:
|
||||
overloads:
|
||||
? const LinearSystem<2, 1, 2>&, const DCMotor&, double, units::meter_t, units::radian_t, units::radian_t, bool, units::radian_t, const std::array<double, 2>&
|
||||
: param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 2>{0.0, 0.0}
|
||||
? const DCMotor&, double, units::kilogram_square_meter_t, units::meter_t, units::radian_t, units::radian_t, bool, units::radian_t, const std::array<double, 2>&
|
||||
: param_override:
|
||||
measurementStdDevs:
|
||||
default: std::array<double, 2>{0.0, 0.0}
|
||||
SetState:
|
||||
WouldHitLowerLimit:
|
||||
WouldHitUpperLimit:
|
||||
HasHitLowerLimit:
|
||||
HasHitUpperLimit:
|
||||
GetAngle:
|
||||
GetVelocity:
|
||||
GetCurrentDraw:
|
||||
SetInputVoltage:
|
||||
EstimateMOI:
|
||||
UpdateX:
|
||||
|
||||
inline_code: |-
|
||||
cls_SingleJointedArmSim
|
||||
.def("getAngleDegrees", [](SingleJointedArmSim * self) -> units::degree_t {
|
||||
return self->GetAngle();
|
||||
})
|
||||
.def("getVelocityDps", [](SingleJointedArmSim * self) -> units::degrees_per_second_t {
|
||||
return self->GetVelocity();
|
||||
})
|
||||
;
|
||||
16
wpilibc/src/main/python/semiwrap/simulation/SolenoidSim.yml
Normal file
16
wpilibc/src/main/python/semiwrap/simulation/SolenoidSim.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
classes:
|
||||
frc::sim::SolenoidSim:
|
||||
force_type_casters:
|
||||
- std::function
|
||||
typealias:
|
||||
- frc::PneumaticsModuleType
|
||||
methods:
|
||||
SolenoidSim:
|
||||
overloads:
|
||||
std::shared_ptr<PneumaticsBaseSim>, int:
|
||||
int, PneumaticsModuleType, int:
|
||||
PneumaticsModuleType, int:
|
||||
GetOutput:
|
||||
SetOutput:
|
||||
RegisterOutputCallback:
|
||||
GetModuleSim:
|
||||
@@ -0,0 +1,30 @@
|
||||
extra_includes:
|
||||
- frc/StadiaController.h
|
||||
|
||||
classes:
|
||||
frc::sim::StadiaControllerSim:
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
StadiaControllerSim:
|
||||
overloads:
|
||||
const StadiaController&:
|
||||
int:
|
||||
SetLeftX:
|
||||
SetRightX:
|
||||
SetLeftY:
|
||||
SetRightY:
|
||||
SetAButton:
|
||||
SetBButton:
|
||||
SetXButton:
|
||||
SetYButton:
|
||||
SetLeftBumperButton:
|
||||
SetRightBumperButton:
|
||||
SetLeftStickButton:
|
||||
SetRightStickButton:
|
||||
SetEllipsesButton:
|
||||
SetHamburgerButton:
|
||||
SetStadiaButton:
|
||||
SetRightTriggerButton:
|
||||
SetLeftTriggerButton:
|
||||
SetGoogleButton:
|
||||
SetFrameButton:
|
||||
@@ -0,0 +1,33 @@
|
||||
extra_includes:
|
||||
- frc/XboxController.h
|
||||
|
||||
classes:
|
||||
frc::sim::XboxControllerSim:
|
||||
force_no_trampoline: true
|
||||
typealias:
|
||||
- frc::XboxController
|
||||
methods:
|
||||
XboxControllerSim:
|
||||
overloads:
|
||||
const XboxController&:
|
||||
int:
|
||||
SetLeftX:
|
||||
SetRightX:
|
||||
SetLeftY:
|
||||
SetRightY:
|
||||
SetLeftTriggerAxis:
|
||||
SetRightTriggerAxis:
|
||||
SetLeftBumper:
|
||||
ignore: true
|
||||
SetRightBumper:
|
||||
ignore: true
|
||||
SetLeftStickButton:
|
||||
SetRightStickButton:
|
||||
SetAButton:
|
||||
SetBButton:
|
||||
SetXButton:
|
||||
SetYButton:
|
||||
SetBackButton:
|
||||
SetStartButton:
|
||||
SetLeftBumperButton:
|
||||
SetRightBumperButton:
|
||||
Reference in New Issue
Block a user