beagleboard / librobotcontrol

Robotics Focused library for embedded Linux computers. Mirror of https://git.beagleboard.org/beagleboard/librobotcontrol
https://beagleboard.org/librobotcontrol
MIT License
196 stars 158 forks source link

Servo motion scale #181

Open clarkbriggs opened 4 years ago

clarkbriggs commented 4 years ago

Describe the bug Full scale servo motions are only a few degrees.

To Reproduce Alter rc_pru_start to point PRU1 at remoteproc1. Use rc_test_servos or custom example to command servo through range of motion from +90 to -90 degrees. Resulting motion is only some 10ish degrees. Direction seems correct, but scale is really short.

Expected behavior Expected servo to move through full +/-90 degree range.

background I'm using an older Futaba FP-S148 servo with range from 550 us to 2350 us. When using these min and max on a RPi with hardware pwm, the servo moves the full expected range of +/-90 degrees. I can't measure the waveforms produced by the Blue.

Platform information rc_test_drivers

Kernel: 4.19.94-ti-r42 BeagleBoard.org Debian Buster IoT Image 2020-04-06 Debian: 10.3

PASSED: gpio 0 PASSED: gpio 1 PASSED: gpio 2 PASSED: gpio 3 PASSED: pwm0 PASSED: pwm1 PASSED: pwm2 PASSED: eqep0 PASSED: eqep1 PASSED: eqep2 PASSED: pru-rproc PASSED: uart1 PASSED: uart2 PASSED: uart4 PASSED: uart5 PASSED: i2c1 PASSED: i2c2 PASSED: spi PASSED: LED PASSED: ADC iio

Currently running on a: MODEL_BB_BLUE Robot Control library Version: 1.0.4 I don't know what clock the PRU uses, but the Blue was in performance governor mode and scaling_cur_freq = 1000000.