|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
CANbus Jaguar control
We are finding several problems with CANbus control. There is no adequate documentation for the WPI lib code - this is a major failing on the part of FIRST.
Problems: 1. We used set(), setX(), and then get() and the get() results drift from what we have set! espaecially pronounced if we vary the set() values. Immediately after a set() or setX() the get() value is the same, but a few ms later it will drift quite significantly ~+/-0.1-0.3. 2. After a while (~10-100ms) the get() value goes to 0.0. We tried to use CANjaguar.setExpiration() but that didn't do anything - following the source code it appears WPlib does not even use this parameter nor the DEFAULT_SAFETY_EXPIRATION that is supposedly set at 0.1. 3. It seems that each call to CANbus takes ~10ms so our (very small) code that updates the motors grinds to a crawl, which we think is causing the set() to expire. 4. UpdateDashboard in the main loop - is just unusable due to the delay it causes. We used Timer to run updateDashbord only every second and the motors have a very visible slowdown every second! 5. The Timer "documentation" says it is in microseconds while it is actually in seconds. -minor issue but just highlights the quality and effort that was put into documentation (when there is any). Remember the purpose here is to educate kids, and not to teach them to give up in life! So any pointers to: 1. perfrmance aspect of comands that use CANbus, updateDashboard, and driverStation.update. 2. How to get the set/setX() values to stay set (a) no drift, and (b) increase timeout. Would be greatly appreciated so we can focus on the real code. Thanks, Dean |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|