[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

@@ -199,7 +199,7 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N1> {
* @return The current arm angle.
*/
public double getAngleRads() {
return m_x.get(0, 0);
return m_y.get(0, 0);
}
/**