mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[sim] Use plant output to retrieve simulated position (#3043)
Using the plant output means that measurement noise can be incorporated. SingleJointedArmSim (in C++ and Java) and ElevatorSim (in C++) used the state instead of the measurement. Closes #3042
This commit is contained in:
committed by
GitHub
parent
78147aa342
commit
1e9c79c587
@@ -48,7 +48,7 @@ bool ElevatorSim::HasHitUpperLimit(const Eigen::Matrix<double, 2, 1>& x) const {
|
||||
}
|
||||
|
||||
units::meter_t ElevatorSim::GetPosition() const {
|
||||
return units::meter_t{m_x(0)};
|
||||
return units::meter_t{m_y(0)};
|
||||
}
|
||||
|
||||
units::meters_per_second_t ElevatorSim::GetVelocity() const {
|
||||
|
||||
Reference in New Issue
Block a user