Closed brettle closed 4 months ago
Nevermind. I now see that the code already always creates a sim for the built-in encoder (assuming the PositionSensor is present) and, if the PositionSensor is a SparkMax{AbsoluteEncoder,AlternateEncoder,AnalogSensor) creates an additional sim for that. Nice work @CoolSpy3!
This can't be done directly, but it is possible to create a second identical joint between the 2 solids (using a SolidReference) and attach a second PositionSensor to that joint. The question to investigate is whether that PositionSensor updates properly and whether the duplicate joint causes any other problems.
If that strategy works, it would be relatively straight forward to have, for example, one PositionSensor representing the NEOs built-in encoder and another representing an absolute encoder attached to the same joint.
If not, we might need a way to associated multiple encoder sims with the same PositionSensor.