Quote:
Originally Posted by NotInControl
Just off the bat, immediately after watching your release video the Mammoth became my favorite robot this season.
With the performance to boot. As a control engineer, it is very interesting to see all the cool things you guys do.
I did have a couple of questions of my own I am hoping someone on 971 can answer.
I think the most obvious first question is:
1. What are some of the main reasons your team choose to use the Begalebone to read through all the sensors vs using the cRIO?
|
We do a lot with edge capturing. When a hall effect sensor triggers, we want to know the encoder value at the edge. We use this for zeroing our claws and shooter, used it to locate the frisbees in our helix, etc, etc. This is a perfect application for an interrupt. Unfortunately, if you try to trigger an interrupt on the cRIO, you will randomly reboot it. We tried that in 2012, and spent multiple matches dead (or rebooting in a loop) on the field. We had our problems escalated with FIRST, and were pretty much ignored. We decided that we would never do that again, and brought everything back under our own control.
We ran a FitPC with a custom USB board for sensors in 2012 and 2013, and had problems with the PC and the USB link. We took a leap this year and chose to use a BBB instead with a serial interlink with a custom cape to handle all the encoder decoding. Kernel context switches are really expensive and wouldn't have let us decode any reasonable number of counts/sec.
Quote:
Originally Posted by NotInControl
2. Does the cRIO do any processing? If so, what? (aside from the compressor)
|
It does nothing other than listen to the BBB for motor control packets and run the compressor.
Quote:
Originally Posted by NotInControl
3. How do you handle graceful shut down of the bone? Or do you not care? In particular, do you take any measures to protect the filesystem on an unplanned shutdown because you are writing to the filesystem as well (I assume this because it was mentioned the bone writes a log file)?
|
We haven't had any corruption. Modern file systems are quite reliable and have good journaling.
Quote:
Originally Posted by NotInControl
4. What is the communication protocol used between the beaglebone and the cRIO?
|
UDP packet with all the motor values. If I remember right, the protocol is pretty flexible and essentially says 'talon on port 1 -> 50%, spike on port 5 -> fwd, solenoid 3 -> on' in a list. UDP is the right answer here since we don't want stale values to arrive, and would rather drop packets than get them too late.
Quote:
Originally Posted by NotInControl
5. Do you have vision processing on the beaglebone as well?
|
Nope. We are running it at like 80% CPU utilization right now without vision.
Quote:
Originally Posted by NotInControl
6. Do I understand correctly that all of your PID loops are on the beaglebone and not run on the cRIO?
|
PID! We have been running full state feedback since 2012, and haven't looked back. All of our logic runs on the BBB. We updated cRIO code once or twice this year when a new WPILib update came out.
Quote:
Originally Posted by NotInControl
7. What language do you run on the bone? what language do you run on the cRIO?
|
C++ on both.
Quote:
Originally Posted by NotInControl
8. What linux distro are you running on the bone?
|
Debian Wheezy.
Quote:
Originally Posted by NotInControl
We used a beaglebone white this year for our vision processing only. All other sensor data (3 encoders, 1 pot, 2 limit switches, and 2 analog IR sensors were all connected to the cRIO.) This gave us 20fps with 100ms lag, well within our requirements of vision detection.
We have a custom fault tolerant TCP link between the bone and cRIO such that if the link ever goes down, it is displayed on our custom dashboard, and the robot continues to operate without a camera. If the link comes up, the server and clients reset, and comms are re-established automatically.
This system worked flawlessly through our 3 in-season competitions. We had problem at our first off-season event event 2 weekends ago. The filesystem on the SD card started to become corrupt and would crash upon startup. This is because we mount the filesystem r/w and do nothing to prevent ungracefull shutdowns. The quick fix was buy a new SD card, and put a clean img on there and then it worked like a champ.
I have planned countermeasures to prevent this failure from happening in the future, I would just like to know your experience with these devices as well.
Thanks in advanced,
Kevin
|
We have at least 2 partitions on the BBB. We put all our logs on one partition, and the root filesystem on another. We try to not write to the root partition so there is little to no risk of corruption. I'd recommend putting /var/ and where ever you put your logs on a separate partition from your executables. Brian can chime in on a bit more of the particulars of our current setup.
We have had a bit of trouble getting the BBB to come up reliably. It seems like the NIC doesn't always boot reliably, and sometimes the processor doesn't boot either. Every match when I boot the robot up on the field, I watch all the light sequences and make sure that the NIC lights are flashing and the CPU lights are flashing correctly. I've had to do a robot reboot once or twice on the field to fix it.
If you have any hard controls questions, those would also be fun to answer. I think this robot has loops more sophisticated than ones I have written for work.