[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:
Prateek Machiraju
2021-01-05 20:55:44 -05:00
committed by GitHub
parent 78147aa342
commit 1e9c79c587
3 changed files with 3 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ bool SingleJointedArmSim::HasHitUpperLimit(
}
units::radian_t SingleJointedArmSim::GetAngle() const {
return units::radian_t{m_x(0)};
return units::radian_t{m_y(0)};
}
units::radians_per_second_t SingleJointedArmSim::GetVelocity() const {