FRC-Utilities / LibDS

Library for controling FRC robots
MIT License
38 stars 20 forks source link

Unable to control 2014 robots #1

Closed camearle20 closed 4 years ago

camearle20 commented 7 years ago

Using the latest version of LibDS at the time of this writing, I am unable to get LibDS to control a 2014 protocol robot. Network activity indicates that there is indeed a connection between the driver station and the robot, and LibDS indicates that comms and robot code are true, yet no commands work. Enabling appears to have no effect, and even attempting to run methods such as DS_RebootRobot yields no result. For reference, using the 2016 protocol with a 2016 robot works as expected. Additionally, using the latest version of QDriverStation shows the exact same results. The code in use is available at https://github.com/camearle20/CartDS. It is built to use on a Raspberry Pi, yet the same results are seen running the code on a standard 64 bit Linux machine.

alex-spataru commented 7 years ago

Hi,

I think that this has something to do with how LibDS generates DS-to-robot packets. I will check the implementation of the 2014 protocol for errors and notify you if I find something. Anyways, do you have access to the logs (printed on the console/stdout) generated by LibDS? They could help us to find the source of this issue.

Thanks for the report!

Alex Spataru


From: Cameron notifications@github.com Sent: Monday, April 17, 2017 5:31:00 PM To: FRC-Utilities/LibDS Cc: Subscribed Subject: [FRC-Utilities/LibDS] Unable to control 2014 robots (#1)

Using the latest version of LibDS at the time of this writing, I am unable to get LibDS to control a 2014 protocol robot. Network activity indicates that there is indeed a connection between the driver station and the robot, and LibDS indicates that comms and robot code are true, yet no commands work. Enabling appears to have no effect, and even attempting to run methods such as DS_RebootRobot yields no result. For reference, using the 2016 protocol with a 2016 robot works as expected. Additionally, using the latest version of QDriverStation shows the exact same results. The code in use is available at https://github.com/camearle20/CartDS. It is built to use on a Raspberry Pi, yet the same results are seen running the code on a standard 64 bit Linux machine.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/FRC-Utilities/LibDS/issues/1, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEB6BpkgSbPgnUff8THg7vGxTAsq0cmKks5rw-gkgaJpZM4M_pkk.

camearle20 commented 7 years ago

Thanks for the quick reply! I'm not at our shop right now and don't have access to a robot, so I will have to run some more tests tomorrow. From what I saw, there was no console output except for that produced by my code. I also didn't see any log files. Is there some place I should look/some method that enables this functionality?

Thanks again, Cameron Earle Team 401

alex-spataru commented 7 years ago

I fixed some issues with the FRC 2014 protocol implementation, and everything should work now. The problem was that the CRC32 checksum was not calculated correctly for the size of the generated DS-to-robot packets. Also, the version bytes sent to the robot where outdated.

After fixing these issues, the generated packets sent by the FRC DS and QDriverStation where exactly the same (at least under my test conditions).

Could you please check if your problem was fixed with the latest commit?