jdhs-ftc/sparkfun-otos-quickstart

Parallel encoder should use Y direction

Opened this issue · 0 comments

ikarib commented

RR FTC Version

1.0.0

Observed Behavior

Sensor is mounted perpendicularly with X axis pointing towards the RIGHT of the robot and Y axis pointing towards the FRONT of the robot. Do you assume X axis pointing FRONT and Y axis pointing LEFT of the robot? I am asking because when tuning ForwardRampLogger and LateralRampLogger, robot moves forward and left respectively in each opmode, but there is no change in velocity on the charts.
If we change the following lines in TuningOpModes.java:
parEncs.add(new OtosEncoder(od.otos,false,false, od.leftBack));
perpEncs.add(new OtosEncoder(od.otos,true,false, od.leftBack));
to these:
parEncs.add(new OtosEncoder(od.otos,true,false, od.leftBack));
perpEncs.add(new OtosEncoder(od.otos,false,true, od.leftBack));
then the velocities are changing correctly.

Tuning Files

1734728235978_bug.json
1734728376361_fixed.json

Robot Logs

2024_12_20__15_57_08_068__ForwardRampLogger_bug.log
2024_12_20__15_59_20_221__ForwardRampLogger_fixed.log