hoverboard-robotics / hoverboard-driver

ROS hardware driver for UART-controlled hoverboard
MIT License
96 stars 52 forks source link

No data from hoverboard #6

Closed ersinkaraduman closed 4 years ago

ersinkaraduman commented 4 years ago

Hi Alex. First of all thank you for your all effort for this project. Really well done. Now I have a strange issue. I both tried with Jetson Nano 64bit and also RaspPi3b+ with 32bit and the result was same that I always got 0s from all variables. I got no error from communication since if I disassembly serial cable I had communication timeout errors. Also when I run the launch file the motor frequency sound disables which guides me that the communication started.

I can able to connect to the board with same hardware point and no problem at all with Minicom using ASCII protocol. I also tried the board API with Arduino Due and also there is no problem that I can manage machine protocol.

I tried to catch the raw data before publishing (like printing double sense_speed0) still same value as 0.000 but no comm error.

I also attached a battery voltage call but still 0.000.

Do you have any idea about what is happening? Also I figured that you cal ProtocolTick together with Read and Write. (Ros Rate(50) 20ms interval). Normally in arduino you have stop main loop for about 30ms just for protocol tick without writing. But I thing it is working also like this way.

Thank you for your kind comments.

ersinkaraduman commented 4 years ago

Hello Again. Problem solved according to the PR request #36 in protocol git.

“Basically, in protocol.c line 507, the subscription code is erased. So, I made the registration of the subscription at PRE_WRITE time instead of POST_WRITE time.”

https://github.com/bipropellant/bipropellant-protocol/pull/36