mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpilib] Add set functions to differential drive simulation (#2746)
All the other simulation objects already have functions like this through LinearSystemSim.
This commit is contained in:
@@ -122,6 +122,20 @@ class DifferentialDrivetrainSim {
|
||||
*/
|
||||
units::ampere_t GetCurrentDraw() const;
|
||||
|
||||
/**
|
||||
* Sets the system state.
|
||||
*
|
||||
* @param state The state.
|
||||
*/
|
||||
void SetState(const Eigen::Matrix<double, 7, 1>& state);
|
||||
|
||||
/**
|
||||
* Sets the system pose.
|
||||
*
|
||||
* @param pose The pose.
|
||||
*/
|
||||
void SetPose(const frc::Pose2d& pose);
|
||||
|
||||
Eigen::Matrix<double, 7, 1> Dynamics(const Eigen::Matrix<double, 7, 1>& x,
|
||||
const Eigen::Matrix<double, 2, 1>& u);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user