![]() |
FRC971 Spartan Robotics 2016 Release Video
![]() Team 971 proudly presents our 2016 robot, which will be competing at the Sacramento and Silicon Valley regionals in California. Special thanks to everyone who made this robot possible! And without further ado, here is a link to our release video: https://youtu.be/CMX4ynSQsyI See you at the competition! |
Re: FRC971 Spartan Robotics 2016 Release Video
I like the steering wheel! Did your driver just prefer to control the robot that way? Quite interesting.
Looks impressive as always 971. Good luck at your regional's and I hope to see you guys at champs. |
Re: FRC971 Spartan Robotics 2016 Release Video
Wow! That shooter arm springing out is amazing!
|
Re: FRC971 Spartan Robotics 2016 Release Video
I love this robot!
Those linkages did not disappoint you guys always have some of the coolest machines on the field! |
Re: FRC971 Spartan Robotics 2016 Release Video
For some reason, when this unfolds, I get somewhat of a "King Cobra" vibe from it.
|
Re: FRC971 Spartan Robotics 2016 Release Video
This has to be one of the craziest robots I've seen. I really can't wait to see it in action.
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
"King Cobra" would be great.:D |
Re: FRC971 Spartan Robotics 2016 Release Video
Is that ITX motherboard a camera processing computer? What's it running?
|
Re: FRC971 Spartan Robotics 2016 Release Video
WOW... I am simply speechless!
Congrats to all of 971 for making such an AMAZING robot. Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Wow, watching that robot move is mesmerizing.
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Absolutely one of the most absurd robots I've ever seen - and I mean that in the absolute BEST way possible.
Way to go 971 - this thing is a work of art. -Brando |
Re: FRC971 Spartan Robotics 2016 Release Video
971 is nothing if not elegant, and this year is no exception. Y'all make it look easy with designs this good.
If I may ask, does the shooter "wrist" rotate independently of the arm or are the mechanically linked? |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
Always impressively different from the rest. |
Re: FRC971 Spartan Robotics 2016 Release Video
Can we get a name for this monster? So much pivot.
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
The team has been using the steering wheel setup since at least 2009. The team has found that our drivers like this setup and it provides excellent maneuverability and is very intuitive. Having a steering wheel with good software allows a driver to very easily make constant radius arced turns. Many drivers who use two joystick tank drive, especially beginners, tend to have a jerky and less efficient path to certain points around the field. It can be pretty easy to tell what system people use just by watching people drive. With practice, we think that the driver station setup gives us great handling on the robot and many advantages. Great job Comran making a fantastic reveal/promo video! |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Dang, truly another beautiful machine from 971.
|
Re: FRC971 Spartan Robotics 2016 Release Video
You guys are absolutely insane! By far my favorite design this season. Just like last season... and the one before that...
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
Our tentative name for the robot is Geoffrey. That may change, but it seems to be the consensus. The board is a Jetson TK1. The shooter wrist and shoulder joints are mechanically independent, but the software ends up more complicated that way. Motions in one now affect the other, which causes no end of headaches... It wouldn't be a proper 971 robot if we didn't fix it in software :) We are looking forwards to getting to see everyone at the Sacramento Regional, Silicon Valley Regional, and hopefully champs! |
Re: FRC971 Spartan Robotics 2016 Release Video
Looks sick! It's really come along since I saw the frame sitting on your guy's table being put together. :)
|
Re: FRC971 Spartan Robotics 2016 Release Video
Undoubtedly my new favorite robot. That thing is on a new level of cool.
May I ask what kind of mechanism you're using to push the ball into the shooter wheels? |
Re: FRC971 Spartan Robotics 2016 Release Video
Amazing as always.
I count 5 control loops minimum to put a ball in the goal? |
Re: FRC971 Spartan Robotics 2016 Release Video
Wow that's an awesome design! One of the most unique robots this season.
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Is that a radio mounted to your moving arm with electrical tape?
|
Re: FRC971 Spartan Robotics 2016 Release Video
This is the most ingenious and inspiring design I've seen yet for this year's competition. Absolutely stunning. This is definitely a machine I'm gonna seek out for an up close look in St. Louis. Amazing job, guys!
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
It was really the only place we found that was not covered by metal on 5/6 of the sides. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
The same loop runs on the left and right side of the shooter. They are only coupled in software. The control loop to run the shoulder and shooter angle is a 6 state MIMO (multiple input, multiple output) controller. The intake loop is separate. Then, there is the MIMO drivetrain loop being fed with angles by the camera. So, yea, 5. Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Amazing robot as always!
a few question about you auto aiming- are you guys using two camera's to aim? can you explain how it works? how much(avg) time does it take to be focused on the target? Thanks in advance! |
Re: FRC971 Spartan Robotics 2016 Release Video
Ok so I thought last years 971 robot was unique and yet very competitive... This year continues that trend... can't wait to see this up and running tomorrow at Sac/Davis!
|
Re: FRC971 Spartan Robotics 2016 Release Video
They just make the most robotic robots. :p
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
The first 4 states are obvious: main arm position and speed, shooter mini-arm position and speed. What are the other two? How'd you go about tuning that? With that level of complexity, I imagine you had to go to model-based control? |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
971's made a really cool robot as usual, I'm hoping to see it in person soon! |
Re: FRC971 Spartan Robotics 2016 Release Video
How much of this robot was made on your in house CNC router? Great looking robot by the way
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
The states are: [shoulder position; shoulder velocity; shooter position (relative to the base), shooter velocity (relative to the base), shoulder voltage error, shooter voltage error] The shooter is connected to the superstructure, but there is a coordinate transformation to have the states be relative to the ground. This gives us better control over what we actually care about. The voltage errors are what we use instead of integral control. This lets the kalman filter learn the difference between what the motor is being asked to do and what actually is achieved, and lets us compensate for it. If you work the math out volts -> force. |
Re: FRC971 Spartan Robotics 2016 Release Video
Easily one of the coolest robots I have seen yet. Could you expand some on closed loop driving? Also, what is the reasoning behind using two cameras?
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
We are currently just averaging the angles from the two cameras, but when we get a bit more time, we are going to work on using the pair of cameras to do stereo distance measurement. We have a proof of concept working on a laptop, but haven't made it work reliably yet on a robot. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
Also, what RPM and ball compression are you running? You shoot the balls out like bullets! |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
It looks like you have a 775 pro on the "elbow" gearbox, and maybe the shoulder too? No spring to balance the load either. If so, how are you holding position without burning out the motor? Is there a brake I can't see?
(It's my understanding that the 775 pros will melt in just a few seconds when stalled at more than 6V) |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
We don't leave the arm up for long periods, and land it on the bellypan when we are done shooting. This helps keep it cooler. The rest of the joints run cool and aren't a concern due to the low loads. |
Re: FRC971 Spartan Robotics 2016 Release Video
This robot is so fun to watch. Great job!
|
Re: FRC971 Spartan Robotics 2016 Release Video
This is one of the most thoroughly engineered robots I have seen yet.
|
Re: FRC971 Spartan Robotics 2016 Release Video
It appears to me every year that I see a new 971 robot it always impresses me tremendously. In particular there always seems to be a mechanism that blows me away. The pivoting of the shooter and arm assembly specifically this year, although I'm positive there's more to amaze.
Congratulations on your impressive win at Sacramento and best of luck to you all at SVR as well as Champs! |
Re: FRC971 Spartan Robotics 2016 Release Video
Are you guys going to make the CAD available anytime soon? We're dying out here.
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
There are a number of resources in the works that the team plans on releasing. We need a bit of time to get everything together. However, we have released pictures from the 2016 build season. This includes competition photos, prototyping/fabrication photos, and close ups of the robot. Hopefully this can provide some guidance while the team works to get our software and mechanical documentation ready for public viewing.
The pictures can be viewed on the team Picasa page, in folders marked "2016". https://picasaweb.google.com/117769834305511597729/ |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
We use Bazel to build code, Debian Linux as our development platform, Git, and Gerrit. Bazel lets us cross compile easily and provides a hermetic environment so we are very certain that everyone on the team is building the same bits. Officially, we don't take a position in the editor wars, but most of the students use what the mentors use, which is VIM and bash. |
Re: FRC971 Spartan Robotics 2016 Release Video
It was awesome getting to see this robot in person and getting to talk to team members about it! Unfortunately you were all quite busy the few times I visited your pit, so I couldn't ask too many questions.
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Our CAD is now available at http://frc971.org/cad
It takes the server a little over 10 seconds to start the download once you click the link so please be patient and don't hit the link twice. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
Michael |
Re: FRC971 Spartan Robotics 2016 Release Video
Wow, there are a lot of details about this robot that I hadn't noted previously! I have a lot of questions based on the cad I looked at, but I'll post the main ones here:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
The 2" tube welded solidly to the 1x2 in the intake adds a lot of stiffness. Also, we motion profile the intake so that will reduce the torsional load across the intake. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
One additional question: What prompted you to switch to chain drive this year? |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
I love the use of an actual ratcheting wrench....and the billion 775pros.
Also, I'm curious...what is the Encoder Shielding Chassis Ground Assembly for? Finally, what went into the design decisions of making your own gearboxes versus using something like the VersaPlanetary on some subsystems (like your intake)? |
Re: FRC971 Spartan Robotics 2016 Release Video
Thank you guys for releasing everything! Hopefully we can take a look at all of it and learn from the amazing things you guys do.
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
We had a number of pinched wires this year, so we'll be looking at revisiting that design. You'll see something like that on our robot next year though. Quote:
We've designed enough custom gearboxes that they aren't risky, and we can generally get exactly what we want when we design our own. For the intake, we've gotten really good at timing belt reductions, and the single reduction from there would have been required anyways since we needed to power the gearbox from the middle of the shaft anyways. The VP wouldn't have actually made it much simpler. For the arm (intake up/down, shooter angle, and shoulder angle), we wanted to control the backlash. The backlash at the end of the arm is about 1/16th of an inch, which is phenomenal. We were actually really trying to use a VP for our climber, but we couldn't get the packaging to work :( We've been running timing belt reductions as the first stage since 2013, and have really liked it. They are much quieter, and we don't see wear. |
Re: FRC971 Spartan Robotics 2016 Release Video
Would someone be willing to speak a bit on how power is managed and brownouts are prevented on this robot? Maybe it's a non-issue, but with the amount of motors on the robot and the large forces they (seemingly) must endure, it seems some kind of smart power management would be necessary.
Maybe the answer to this is related to that of the above, but what drove the decision behind which reductions and how many motors to put on each gearbox? This bot has truly gotten me excited to play with big machines and improve my CAD skills in college. I'm shamelessly jealous of how much 971's students must get to learn about machining and design before they even graduate high school. :yikes: |
Re: FRC971 Spartan Robotics 2016 Release Video
Any plans to release the cad of the first generation intake? It had some cool sheet metal features I would like to look at.
Also what performance gains (if any) where found by switching the drive and intake wheels for worlds. I had heard that they where switched for weight but the intake appeared to be a little faster at centering the ball as well. |
Re: FRC971 Spartan Robotics 2016 Release Video
I too am very interested in the brownout management.
I noticed looking through the pictures that you started out with a significantly different collector. Judging by the complexity and completeness of the robot, it looks like a pretty late switch to the mecanum style collector. If you could share your reasons and methods, I would love to hear them, and I think a lot could learn. I know I watched videos of your 2012 collector several dozen times a few years ago. Still one of the faster collector/sorter/columnizer mechanisms I have watched. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
Our initial intake worked well on the bench when prototyped. We tried lifting/lowering the rollers by an inch on the bench, and it seemed to work "ok". When we finally built it, we learned that pneumatic tires bounce even more than we thought, and we would drive up on balls too easily. That was compounded with it being heavy (~16 pounds), and a bit slower than we wanted. The weight was causing the chain to stretch way too fast and even start to yield when we were going over the bumps. (We learned this year to run 35 chain in more spots). It all added up to an intake which wasn't what we wanted. There was a video floating around somewhere on CD in like week 4 of a mecanum intake which worked, but wasn't as fast as we knew that it could be. That, the sheer simplicity of it, and 118 shipping with one made us switch over immediately after ship. We slapped together a prototype on our practice robot, worked out the ideal roller placement, and then built it. It took us a little bit over a week to pull the whole thing together from design to full implementation. It was during that time that we learned that a traction wheel in the middle would cause it to jam, but an omni wheel in the middle let it center nicely as the ball was coming into the robot. We figured that out by pulling dozens of balls into our prototype and high-speed videoing it while trying to jam it. Unfortunately, this meant that we needed a separate CDF/Portcullis mechanism, since our old intake could open them, which added more mechanisms and complexity. I think it was very effective and we will consider doing something similar in the future. I liked our 2012 intake slightly more than this one, but I really can't complain. 2012 (which I saw a number of teams do variations of) would have required some crazy folding geometry for going under defenses. There were very few times when we contacted a ball but didn't grab it. |
Re: FRC971 Spartan Robotics 2016 Release Video
Whats the purpose of have two different encoders in this gearbox:
![]() |
Re: FRC971 Spartan Robotics 2016 Release Video
Will a 2016 code snapshot be released as in years past?
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
The one on the right is an encoder. I know 971 goes out of their way to eliminate backlash as much as possible (like custom sized hex shafts), so putting it earlier in the reduction yields higher resolution (traded off against backlash, which in this case is minimized). |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
We hook up the index pulse on the encoder so we get a very accurate pulse once per revolution. That pulse triggers DMA to capture the encoder value at that point in time. This lets us figure out the encoder value very accurately. Unfortunately, there will be something like 30 of these pulses through the range of motion on the arm. A slow moving filter estimates which one of these 30 pulses we saw, and uses that to zero within 1 encoder tick. We started doing this in 2015, and haven't looked back. This takes all the hard work out of zeroing joints with hall effect sensors on our robot. We wrote the class to support this in 2015, and have been steadily improving it and adding features. All we need to do is to have the software exercise the joint until it passes an index pulse, or have a human move it past an index pulse while disabled, and we are then fully calibrated. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
Quote:
If that didn't turn out to be correct, we were ready to fix it in software. We would have current limited each control loop by looking at the velocity of the motor, backing out the BEMF voltage, and using that to limit the current. I think that was on the original plan, but wasn't an issue and got forgotten about. 4 CIMs in the drivetrain helps a lot as well. Quote:
https://docs.google.com/spreadsheets...it?usp=sharing We look at time to make a characteristic move (assuming that the motor is working against gravity but at steady state), and the holding voltage/power required to hold the arm at that set point. VP released awesome charts about motor life at various holding voltages this year. We targeted a peak of 4 volts holding voltage on all our joints. I'm thinking next year we should drop that down to closer to 3 volts since we had to add fans to the shoulder motor, and replace it a couple times. We like to target ~1/2 second max for motions. Too much longer and you end up waiting on the robot too much. We started out by putting 1 775 pro on each joint and looking at what that was going to mean in terms of power dissipation and speed. The analysis showed that everything was fast enough that way, and we didn't have to look any further. Over the past couple years (really starting in 2014), we've been working on iterating our designs to remove common and known failure modes and weaknesses. We've focused on trying to not burn out motors, rate belts, chains and gears for the required load, and put weight into places where we see consistent failures. Our goal is to go through a season where we perform to our fullest potential without failure on the field. One fascinating thing I learned this year is that for some subsystems, you should gain schedule your controller based on whether you are sourcing power from your motor and using that to drive your load, or pulling power out of your load with your motor. This flips the efficiency. If you assume that the efficiency reduces the torque of your motor by ~5% per reduction and hard-code that into your model, it essentially means that when the motor decelerates the load, the torque is reduced. The physics contradicts this. When you decelerate the load, the load is putting power into your motor, and the gearbox has losses during that transaction. The result is that accelerations reduce effective motor torque, and decelerations actually increase effective motor torque. I bring this up because we had a lot of trouble tuning the arm controller. The only way we could get smooth behavior when both lifting and lowering the arm was to design an "accelerating" controller and a "decelerating" controller and switch between the two depending on whether we were accelerating or decelerating. It was really cool to finally figure that out. I've seen this for probably close to a decade (I remember struggling in 2005 to tune a controller to go up and down nicely), but hadn't ever gotten fully to the bottom of the issue and had a good physics explanation for what was wrong. I'm not sure our switching logic is right, though it was better than no switching. This summer, I want to have someone analyze how we switch between the two controllers and make sure the transition is continuous. I've got summer project ideas to keep the students and myself busy all summer :) (yea, yea, we are working on releasing our code. We just finished the last code reviews, and are working on hosting it correctly. Code quality is important!) |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
We use a potentiometer and index pulse to zero each joint. We do not have any limit switches, and we've been known to not put in hard stops. In 2014, one of the hard stops was the cRIO... Let me try to write out an example with a pretend elevator. The encoder moves 0.1 meters per revolution. Someone went and calibrated the elevator and told you that at 0.0971 meters, they found an index pulse. This means that as you lift and lower the elevator, you will see index pulses at 0.0971 meters, 0.1971 meters, 0.2971 meters, 0.3971 meters, 0.4971 meters (I think you see the pattern). They also calibrate the potentiometer so that it reads out the approximate height. Also, pretend that it has like 0.02 meters of noise in the reading. So, if you are at 0.1 meters, you might see readings of 0.09, 0.1, 0.11, 0.12, 0.08. Welcome to real life. It sucks at times. So, we initiate a homing procedure by telling the elevator to move 0.2 meters towards the center of the range of travel. The procedure needs to be designed to not break your robot, but move at least 0.1 meters to find an index pulse. As we are moving, we see a pulse. We then go immediately look at the pot, and it reads 0.3100 meters. The closes index pulse is 0.2971 meters, so we now know that whatever the encoder value was at the index pulse, it really should have read 0.2971 meters. So, compute that offset, and you are homed! DMA is a really cool feature on the FPGA of the roboRIO where you can set up a trigger and cause sensors to be captured. We have configured it to trigger when an index pulse rises, and save the encoders, digital inputs and analog inputs. The FPGA does this within 25 nanoseconds. This lets us record the encoder and pot value at the index pulse. The fun part comes when the noise on your potentiometer is ~0.05 meters. We see this on our subsystems. If you get unlucky, you might pick the wrong index pulse, and be off by 0.1 meters (!). We can fix this by filtering. The encoder should read what the pot reads, with an offset depending on where the system booted. You can take (pot - encoder) as the "offset" quantity and average that over a long period (2 seconds is what we use). Add that filtered value back to the current encoder value, and, assuming Gaussian noise and all that jazz, you will have removed enough noise to make everything work again. More concretely, say we are sitting at 0.05 meters. We get the following encoder, pot readings. Encoder, pot 0.0, 0.0 0.0, 0.1, 0.0, 0.06, 0.0, 0.02, 0.0, 0.08 (I'm a horrible random number generator, FYI) From averaging it all together, it looks like the pot started out at a bit above 0.05, and the encoder is at 0. Then, we get the following measurement in: encoder, 0.05, pot, 0.16. Before, we would say that this is closer to the 0.1971 value, so we would round there. Now, we would say that since the encoder moved by 0.05, and we think the pot was around 0.05, we are likely at about 0.1. The nearest pulse is 0.0971, so that's the zero we actually saw. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Your CAD model is amazing!
A couple questions: How many students / mentors are doing CAD? At what point in build to you start fabrication? Are your students learning CAD outside of robotics? |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
http://frc971.org/content/2016-software |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
We orignially switched to the vex EDR mecanums because we needed the weight for the hanger, it ended up being somewhere around a pound or so lighter. The EDRs were a bit grippier; I didn't notice much of a difference in intaking performance between SVR and Champs, we didn't change our intake speeds. We also switched the drive wheels for weight purposes. We had a few issues with the drive wheels rubbing on our bellypan due to dents in the aluminum from the defenses, but we were also having some of those same problems with the first drive wheels. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
We send out our drivebase for sponsor manufacturing around week 2 and usually get a 2 week turn around on those parts. The rest of the in-house stuff we start after the completion of superstructure CAD, which is ideally the beginning of week 3, but often gets pushed back... Some of our students choose to participate in our summer third robot project, where a lot of the focus is on developing CAD skills (not sure if that counts as outside robotics, but it isn't during the season), other students have taken intern positions where they use their CAD skills, some are enrolled in our school's engineering class where they learn basic CAD, and some do projects on their own for fun or to specifically learn SolidWorks. |
Re: FRC971 Spartan Robotics 2016 Release Video
I had some questions about your closed-loop driving as it seems very interesting!
Sorry if any of the questions are strange or ignorant, I'm not super familiar with C++ and some of the more advanced syntax and features of it. Following your code has been somewhat difficult because of that. (That said, it is written very well and is pretty well commented.) |
Re: FRC971 Spartan Robotics 2016 Release Video
You stated earlier that you get 1/16" backlash at the end of the long arm. My calculations put that at around 0.1 degrees of backlash at your shaft. How are you able to achieve such stellar precision using only Vex gears and chain?
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
SSDrivetrain is used for more traditional driving (go 1 meter forwards). It has motion profiles on the inputs, which can be disabled if you want. This lets us send it a goal of +1 meter, and go work on other things while it does it. Or, it lets us feed the goal in directly when we are doing vision alignment and want the controller dynamics without any sort of profile. PolyDrivetrain runs the teleop driving. It is mostly using feed forwards, but has a proportional loop to do small corrections. It understands the robot's physics, and uses that knowledge to do constant radius turns. The combination of the feed forwards and the feed back makes the driving experience pretty connected. Both of these are fed by a 7 state Kalman Filter which estimates the positions, velocities, and disturbance forces of each side of the drivetrain. Controls can be split into 2 worlds, the estimation and control worlds. You need good sensors or algorithms to figure out what your system is doing, and then you can apply the algorithms. Once you've split the world this way, you can take a nice estimator, and use it to feed multiple controllers. Generally speaking, the controller ends up being a matrix to multiply into the error to get an output, which is stateless. Quote:
Quote:
We have 4 robots (assuming I can count...) all driving with the same code. There is a configuration structure passed into the drivetrain controller class for each robot which contains the physics model for each robot and other configuration bits. This means that the year specific code is 100 lines, all of it boilerplate. Take a look in //y2016/control_loops/python/ for the models of each of our subsystems. We have our own framework for designing robot code. Our code is broken up into somewhere around 10 processes, each responsible for one part of the robot. 1 process is Autonomous mode, 1 process is the joystick code, 1 process is the hardware interface, 1 process is the drivetrain, 1 process is the shooter, 1 process is the vision udp listener, 1 process is the superstructure code, etc. Each of those processes communicate with our own PubSub message passing code. That means, for example, that the drivetrain will listen for Goal and Position messages, and publish Output and Status messages. (look in //frc971/control_loops/drivetrain:drivetrain.q for the actual definitions). This lets us be resilient to crashes, and keeps the interfaces between modules very well defined. For example, with 0 changes outside the hardware interface layer, we switched from running all our code on a BBB in 2014 to it all running on the roboRIO. We also are able to generate simulated Position messages and listen for simulated Output messages in our unit tests so that we can exercise the code without risking the real robot. Quote:
We like the flexibility of re-calculating every time we want to move. To do this, we need to advance the requested position each cycle of the control loop. The only way to guarantee that is to do that in the control loop. (Last year, for our drivetrain, we had another process which was calculating the profiles. The added coordination overhead of interacting with that process was enough that we decided to push the profile down into the controller process.) This also means that the joystick code really just sends out goals when buttons are hit, and lets the underlying code do all the rest. //y2016/joystick_reader.cc has all the joystick code, and it's pretty easy to read. The motion profiles are cheap to calculate. The 7x7 matrix multiplies do add up though :P It turns out a large chunk of CPU on our robot goes into context switches between the various tasks. Our drivetrain code uses like 6% CPU, and our shooter uses like 3%. Most of the CPU on our robot either goes into the logger (20% ish), or into WPILib (50%). Quote:
If you can get a linux box set up, do try to run the tests. It's pretty cool to be able to exercise our collision detection code, zeroing code, and other test cases. (bazel test //y2016/control_loops/...) We are huge believers of code review and test driven development. I don't think we could do what we do without both of those, and it helps us involve students at all skill levels in the process while maintaining the quality and reliability we require of our code. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
We also run the first reduction as a well tensioned chain run. The chain has negligible backlash when well tensioned. You do need to tension it enough such that it doesn't go slack under acceleration and deceleration, or you add nonlinearities back into the control loops again... Apparently you can do similarly good things with a soda can as a shim, or some other thin metal. We haven't tried that ourselves. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Austin, are there any plans for getting the changes made in your bazel distribution from merged back upstream? The code builds correctly using the build of bazel from your custom package repos but fails when using bazel 0.2.3.
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
0.2.3 changed how runfiles work, and we haven't upgraded and fixed the issues. You probably need to go back to 0.2.2, and we'll work on upgrading soon. What we really should do is provide a //tools/bazel which pulls down the blessed bazel version. I think I sent you guys a pull request with that script in it. I'll see if we can get that merged into our repo. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
Now that I've gotten to take a better look at the code, I'm amazed (as usual) at the sheer amount of testing code present. 1335 lines of code in superstructure_lib_test.cc :ahh:! How are you able to get people to actually write automated test code? We've been trying to make unit testing a more important part of our development process, but this past year we weren't able to make that happen as much as we would have liked for two main reasons: a lack of programmer experience with tests and a general attitude that they are a chore to write. How do you go about training new programmers to write tests? Thanks for open-sourcing all of this so quickly - I probably spend more time looking over 971's code every year than I should, but there's just so much to learn from it. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
For others following along, Bazel builds a namespace sandbox for each build step, only providing the dependencies that were specified for each step. This makes it very hard (though not impossible) to write build rules which aren't deterministic and repeatable. I've built code on one laptop, deployed it with rsync, re-built on another laptop, and rsync told me there was no work to be done. Quote:
We are really big on testing as a team, and I think that helps. I view the season as a success if I can get the students to believe that testing is and should be a required part of development. When new students come in, the older students and mentors focus on testing. Heck, that's one of the ways we'll get new students to start to contribute. "Please write foo and add a test for it." isn't an unheard of request, or "I think there may be a bug here, can you test it to see?". Everyone writes tests (I probably write more tests than most), so that prevents it from being a new kid thing. We have mentors who have a lot of experience in industry, and help make sure the code is designed to be tested. We also look for tests as part of the code review process. I'm much more willing to merge a commit if it has tests. (There are a small subset of people who have the permission to do the final submission for code that goes on the robot. This helps keep the code quality up and keep the robots functioning.) A lot of that stems from us building complicated robots requiring complicated software. It is hard, if not impossible, to write complicated software without good testing. A lot of the bugs we've caught in testing would have destroyed our robot when we turned it on. We also start coding week 3, and finish assembling and wiring with only a couple days left in the build season. Good testing lets us start writing code before the hardware is available, and test out all the tricky corner cases that either rarely come up in real life, or are really hard to tell if they are performing correctly. I won't let the robot be enabled until we have tests verifying that all the traditional problem spots in the code work (zeroing, saturation, etc). The end result is pretty close to 100% line coverage, though we don't bother to measure it. This makes testing a required part of our robot code. Our intake this year took 0.35 seconds to move 90 degrees with 1/2 horsepower. If something goes wrong in that code, you can't disable it fast enough to save the robot. That's pretty scary, and really gets you to think twice about code quality. Honestly, one of my favorite days of the build season is the day when we run the code for the first time. There are normally a couple tuning issues, but nothing really major, and the code tends to "just work". It is a very deliberate process of verifying that sensors all work, then verifying that the motors all spin the right direction, calibrating all the hard stops, soft stops, and zero points, and then slowly bringing the subsystems up with increasing power limits. I like to make sure people come for the robot bringup, since it really shows off the power of good testing. My experience is that resistance/hesitation to test code comes from it both being hard to do, and something that isn't strictly required for small projects. If you want to write good tests, you need to design your code so that you can do dependency injection where needed, and expose the required state. This takes explicit design work up front. The problem is that for small projects, testing slows you down. You can run the 3 tests manually faster than you could write the test code. As the project size and complexity grows, testing starts to pay back off. FRC robots are on the edge of requiring tests. Integrating good testing into your team is as much a knowledge problem as a cultural problem. There's a classic story where a major web company was unable to make a release of their product for 6 months because they weren't sure that if they released it, it would work. They couldn't risk it. They fixed that by hiring people to turn the culture around, training everyone on how to test and the importance of testing. You need to have your mentors and leaders buy in to automated testing, and drive it. They need to lead by example. Take your code from this year, and figure out how to modify it to be testable, and then go write some tests for it. |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
|
Re: FRC971 Spartan Robotics 2016 Release Video
How did you guys go about the development of your 2 (side by side) wheeled shooter? From the outside looking in it looks fairly simple, but I would assume hours of tweaking went into it. Could you enlighten us as to how the shooter went through its development stages?
|
| All times are GMT -5. The time now is 05:44. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi