![]() |
Re: Swerve questions (Languages, CAN)
The roboRIO is indeed faster, and it has multiple cores, but if you were able to analyze the existing code and identify why it is lagging, that would give you a big head start. Do you have ideas why it is lagging? CPU usage numbers, graphs of sensor readings for known transitions, control updates on the same time scale?
Greg McKaskle |
Re: Swerve questions (Languages, CAN)
Assumptions to be made at this time - chances of the new can motor controller having a rich enough firmware to handle the positional control of the module steering is very low, even less for PWM sensor input. The robo rio will have to close the loop. The robo rio should be more than fast enough to handle the well written swerve code and any other robo processing. Vision is the exception.
We use labview and lag is not a problem. 1st year we did. The code did not embrace data flow. One source of lag is the reading of the sensors. Is it in a periodic task or the main teleop loop? |
Re: Swerve questions (Languages, CAN)
Quote:
But you should be able to use an absolute analog encoder output on a Jaguar provided that it is within the input range. |
Re: Swerve questions (Languages, CAN)
Quote:
Quote:
-Data structures -Formal verification -Information theory -Artificial intelligence -Computer graphics -Cryptography -Networking -Distributed systems -Databases I think the answer is no. I'm not saying that it's impossible. I'm saying that it's not done, or at least it's very unusual. |
Re: Swerve questions (Languages, CAN)
Quote:
|
Re: Swerve questions (Languages, CAN)
Quote:
Since you ask, do you know how to decode the signal and if not will using a pwm w/ low pass filter effect the quality of the analog signal vs just buying a regular analog absolute encoder? |
Re: Swerve questions (Languages, CAN)
Quote:
I simply saw no reason for the statement to be in this thread. The majority of programming in the real world is done by technical people who do not have a CS degree. All technical professionals should learn how to program and be given the correct tooling to make them successful. Just as math courses aren't only for math majors, FRC programming isn't only for future CS researchers. Greg McKaskle |
Re: Swerve questions (Languages, CAN)
Quote:
|
Re: Swerve questions (Languages, CAN)
Quote:
Quote:
Quote:
Quote:
Quote:
|
Re: Swerve questions (Languages, CAN)
Quote:
See my previous post for thoughts on how a PWM signal might be decoded using digital inputs. |
Re: Swerve questions (Languages, CAN)
Be sure to read the documentation or description for the Get PWM function. Names can be misleading.
Greg McKaskle |
Re: Swerve questions (Languages, CAN)
Quote:
My post was not intended to endorse bharrison's inference that "Get PWM" is for decoding an input PWM signal... but rather the opposite. If I need to clarify my post please let me know and I will do so. |
Re: Swerve questions (Languages, CAN)
Quote:
|
Re: Swerve questions (Languages, CAN)
Your encoder will need to be used with the FPGA or with interrupts in order for it to work properly. Your user code which runs on the CPU would need to run impractically fast to decode the encoder PWM.
You have a few options to try to decode this signal You can do what Ether recommended, and try to use interrupts. This is likely more difficult than it sounds to get everything working properly. Also, interrupts and less commonly used features are likely the last priority of the roboRIO development team and beta testers, so you may encounter strange, hard to diagnose issues with interrupts. You could also attempt to read the encoder on a separate device, like an arduino or basic stamp. There are likely software libraries that exist for reading an encoder like this already. If not, you could likely write your own using the "pulseIn()" function on the arduino. You can connect the arduino to the roboRIO through a serial connection very easily. |
Re: Swerve questions (Languages, CAN)
Yes, Ether. I was responding to the OP. Sorry, but I don't use the threaded view and I simply clicked the Post button. I may need to pay more attention to that in the future.
Greg McKaskle |
| All times are GMT -5. The time now is 22:20. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi