[Solved] PhidgetEncoder HighSpeed 4-Input 1047_1B problems with channel 2, 3 (joint2, joint3) avr_speed

Any hardware type questions or problems for all other Phidget devices.
seebq
Fresh meat
Posts: 2
Joined: Fri Dec 21, 2018 3:15 pm
Contact:

[Solved] PhidgetEncoder HighSpeed 4-Input 1047_1B problems with channel 2, 3 (joint2, joint3) avr_speed

Postby seebq » Fri Dec 21, 2018 4:49 pm

I'm using a DF Robot motor and motor driver (and manually turning) the wheels and getting some strange values when I plug in either wheel to the channels 2 and 3. They are very low.

I am using this encoder with these encoder adapters:
https://www.dfrobot.com/product-777.html
https://www.dfrobot.com/product-976.html
https://www.dfrobot.com/wiki/index.php/ ... er_FIT0324

Here's an example of running a few cycles of the PWM at full speed (255) on all the channels:

Code: Select all

---
header:
  seq: 50463
  stamp:
    secs: 1545431728
    nsecs: 374480665
  frame_id: ''
name: [joint0, joint1, joint2, joint3]
position: [-9560.0, -2698.0, -1.7348451648957836e-305, -9.18844e-319]
velocity: [0.0, 0.0, 0.0, 0.0]
effort: []
---


The values on channels 2 and 3 are crazy small and very close to 0 on those last 2 channels. The avr_speed calculation is very wrong:

avr_speed: 9.55416168218e-307

Channels 0 and 1 are reasonable (i.e. standard looking), but not the same, they're off by some factor, and the same factor when I switch out the same motor. Something is off with with the encoder readings.

Is there a way to reset the firmware or reset any values ticker or index or all the values on the PhidgetsEncoder?

How do I reset or get it back to factory state?

-- CBQ


Update:

Solved. There was a bug in the driver, and a patch was created, and merged quickly:

https://github.com/ros-drivers/phidgets_drivers/pull/30
Last edited by seebq on Sun Dec 30, 2018 9:54 am, edited 1 time in total.

seebq
Fresh meat
Posts: 2
Joined: Fri Dec 21, 2018 3:15 pm
Contact:

Re: PhidgetEncoder HighSpeed 4-Input 1047_1B problems with channel 2, 3 (joint2, joint3) avr_speed

Postby seebq » Fri Dec 28, 2018 3:08 pm

Found the error. The tick2rad was setup to multiply the first by 4, the second was standard (1x), and the other two were missing(!) so it was referencing memory it didn't own. Properly initialized them to 1.0 each and this fixed all the readings.

Have PR up:

https://github.com/ros-drivers/phidgets_drivers/pull/30


Return to “All Other Phidgets”

Who is online

Users browsing this forum: No registered users and 2 guests