Skip to content

Encoder response seems very slow #31

@fgrossman

Description

@fgrossman

With the following code below, the numbers would print 3 more times at the same value after I turned a wheel, and then print out the correct value.

from XRPLib.differential_drive import DifferentialDrive
import time

differentialDrive = DifferentialDrive.get_default_differential_drive()


while True:
  print('Left ' + str(differentialDrive.get_left_encoder_position()))
  print('Right ' + str(differentialDrive.get_right_encoder_position()))
  if (differentialDrive.get_left_encoder_position()) > 20:
    differentialDrive.reset_encoder_position()
  time.sleep(1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions