rosserial Can't Read current values Pololu MC33926 Motor Driver Shield for Arduino

asked 2014-09-17 18:50:17 -0500

Pototo gravatar image

I purchased a Pololu Dual MC33926 Motor Driver Shield for Arduino, and for some reason I cannot read current from the motor controller. On the Serial.println() it just prints good values, but when I use rosserial I only see -0.0 (minus zero) value for both motors.

All I've done is plug the shield on my Arduino UNO R3 model, and run the demo that comes with the sample library:

https://github.com/pololu/dual-mc33926-motor-shield

One thing, though, is the driver library returns an int for the current value, and my publisher (which grabs the current data) publishes a Float32Multiarray.

If I want to publish a pure int, then what would be the right type? Is it Int8Multiarray? I am not sure if that might be the cause for this problem?

How can I fix this issue?

edit retag flag offensive close merge delete

Comments

Try using Int16MultiArray since the driver cause go up to 6 A, Int8 can only go to 127 but Int16 can go to 32,767. Thus it it would be able to display your voltage in mA.

tonybaltovski gravatar image tonybaltovski  ( 2014-09-17 21:15:05 -0500 )edit