Autonomous motor reset and position best strategies

Our 7th graders have been doing this for a couple of years now, and this year they’ve been trying to improve their autonomous (once they realized how important it is). So there are a few things that you can do a couple of different ways, and I wonder what the best strategy is to follow?

  1. Moving motors: You can move to a specified position (degrees, rotations, raw) or move by a certain amount (same units). Has anyone found one to be more reliable than the other? Our kids have tried both. For the case of an arm with a motor, they seem to prefer to deal with it as a position (0 being all the way down, and some larger positive value being all the way up for example). However, they seem to have some variability that they can’t explain. (which may be due to 2. below). For a drive train motor, they prefer specifying a relative move without worrying about an absolute position.
  2. Motor position resets: What is the preferred time to reset? At the program start, motors are supposed to be reset to 0 automatically, but we have seen occasional problems where a
    ‘move to position’ call seems to vary quite a bit. I’m wondering if a manual reset at the beginning of autonomous is just good practice? Or do you find more success with resetting more often, even before every move?

As an example to go along with #2, one of our teams was trying to make a program to place a cap on a post for Turning point. We showed them how to display the motor positions in degrees on the brain’s LCD. Their arm would display position 0 at the beginning, and they determined position 1180 was the optimal height for cap placement by manually moving the arm. However, once they programmed this, the arm would often be short by up to a couple hundred degrees when it automatically raised. I’m wondering if a code reset to 0 would help in these cases.

Are u using VSC or PROS?

If you are using VCS, use this to reset the motor encoder

Motor.resetRotation()

if you are using pros, its quite complicated

Motor.set_zero_position(Motor.get_position)

so here you set the encoder zero value to the position it is at, so it resets the encoder to zero

Thanks for the reply, we are using VCS.

In pros just use motor.tare_position()

1 Like

thanks i was wanting a faster and simpler way