33 posts

FRC Day 14 Build Blog

EmailParentsStudents#FRC Build Blog

Day 14: Intake and Drivebase Progress

Prototyping

Intake

Today, we made a prototype of the intake that had been CADed for use in the real robot, to confirm that everything was up to spec with how we had intended it. We laser cut and assembled it, but did not get through thorough testing yet. The initial testing, however, looks promising.

Inline image 1

Zipper Hopper

Today we worked on a zipper hopper/feeder prototype. We began by designing a belted feeder and floor in CAD, and rather than simply being 2 balls wide as the previous prototype, we made it 4 balls wide.This more accurately represents our actual robot. The hopper has a soft wheel between two of the 'lanes' for the balls, causing a zipper effect and a higher throughput. This system seemed to be relatively effective, but the polybelt on the hopper floor and on the feeder posed continual problems, Primarily, the belts were causing too much friction, were moving off of their crowns, and were causing the shaft to bend. We plan to switch to a roller driven design for our next iteration, as we still do not have our desired throughput and they should run more efficiently.

Inline image 2

Inline image 3

Testing:

Drivebase

Earlier, we had assembled the drivebase parts and sent them in for welding. The drivebase came back from welding today. We finished wire brushing and sanding the welds today, so we are sending it to Gilbert for powdercoating tomorrow morning.

Inline image 4

Programming

PIXY Camera Communication

Today, we began integrating undistortion algorithms into the SPI Driver for the PIXY Camera. It is pretty much incorporated into the SPI code, and should work, although it has not been tested yet. The undistortion algorithm has successfully removed the barrel distortion from our PIXY Camera after running OpenCV’s Calibrator to retrieve the distortion coefficients. Now we need to get the distortion constants directly from the output of the calibration file (it is saved as a .txt file) as opposed to defining them in the source code. The code for reading the .txt file is written, but it needs to be set up and integrated.

Prototyping and Testing

After the mechanical team finished the side-by-side backspin shooter on sunday, we were able to test it today. We tested with the SynchronousPIDF that we wrote, and we also tested with the Talon SRX’s on-board PID. From these tests we learned that the Talon’s averaging mechanism is useful, but when it is doing velocity PID, it does not run in voltage compensation mode. Our SynchronousPIDF uses the Talons in Voltage Compensation mode so that the throttle remains constant even if the battery voltage dips due to some other load. This is needed because when the feeder is activated, it drops the battery voltage significantly. We adjusted the constants to try to make up for the sudden dips, but we have not yet found an optimal configuration. Next time, we will try to fix the JRAD Controller that I talked about last time and then we will see how that affects the reliability of the prototype. Even if we perfectly optimize control, this prototype has some inconsistencies mechanically that have affected the trajectories and precision of each shooter.

FRC Day 12 & 13 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 12 and Day 13: Programming and Prototypes

Prototyping

A lot of things got done with prototyping today. We were able to assess the merits of topspin vs backspin, and we determined that the backspin shooter was better for the following reasons after extensive testing:

  • Balls do not jump out of the boiler like the balls with topspin do

  • The angle did not have to be adjusted as much as the topspin one did when we varied the distance

  • Easier packaging

We shot both the topspin and backspin prototypes at the same trajectory and distance to minimize variables, and we tested at three different distances. We did notice that the topspin shooter had a greater allowable RPM range which makes it easier for software control, but the difference was negligible when faced with all of the cons that come with the topspin shooter.

Backspin Flywheel Shooter

After we decided on using a backspin flywheel, we began prototyping a new version that has two channels side by side with a more robust gearbox. This setup shoot allow us to experiment with different variables to determine the best control loop to fire two rapid streams side by side and avoid mid-air collisions. We wanted to remove the inefficiency of the VersaPlanetary gearboxes from our prototypes, so we designed a belted gearbox. We wanted to replicate the 3:1 gearbox which we used for our prototypes, but due to part limitations, could only build an 8: 3 design. We decided that this was close enough to our previous designs and CNCed the parts. We assembled the gearboxes, implemented a polybelt feeder, and added an encoder onto the shooter shaft. After running the gearboxes, we found them to be slightly constrained, but they work and should better replicate our actual shooter. They currently have 4 775 Pros, but we can easily add or remove more motors (max 6). As soon as we get the programming sorted out, we should be able to tune and test this flywheel.

Inline image 10

Inline image 8
Inline image 9
Inline image 11
Testing:


Hopper Conveyor Belt

Today, we also worked on the hopper conveyor assembly. It is currently angled at 5 degrees and has a 3:1 reduction. Using polybelt, it feeds balls into the feeder leading up to the shooter. A funneling feature still has to be incorporated and the assembly itself may be changed depending on results from the hopper prototyping efforts.

Inline image 12

Feeder

Today, we worked on the feeder. Because we were unable to get the previous iteration of the feeder to run smoothly with the output holes, we decided to reduce that number to two and make a few other small modifications to the general design. This new version was then designed and constructed, but we found that the improvement was not as significant as we originally imagined it would be. In fact, we still had problems with the motors burning out and we really struggled to get a lot of balls to run through the system. In order to solve this problem, we tried a couple of things. First, we tried adding zip ties to some parts of the roller, but this simply caused jamming. Second, we tried increasing the spacing between the two output holes as making them significantly more defined. This, unfortunately, did not help that much. Finally, we tried using a drill with some wheels on the end to agitate the balls, somewhat like a KitchenAid mixer. This helped a bit more, but we still reached the conclusion that it was simply a bandaid to a bigger problem.

Inline image 13

Manufacturing

For these two builds, we manufactured all the parts for the drivebase and began assembly. Because of design changes, we manufactured all the parts for the bumper mounts on the manual mill. We also prepped the belly pan by countersinking the holes for the rivets and deburring it after getting it from the water jet.

Programming

Shooting Control

Today, we began to brainstorm better ways to control the flywheel, and we arrived at the following scheme (which we call the JRAD Controller):

v[t + dt] = kf + kj * dt * (kLoadRatio * setpointSpeed - curSpeed)

Where dt is measured cycle time, kj and kLoadRatio are tuned/calculated, and kf is set to some constant like 8 (Volts)

This equation represents the initial version of the JRAD controller (named after Jared, who made the equation). This version is actually incorrect, and next build we will be adding an additional term to make it an integrating controller as opposed to a proportional + constant term controller. This new equation will be:

v[t + dt] = kf * setpointSpeed + v[t] + kj * dt * (kLoadRatio * setpointSpeed - curSpeed)

Where v[t] is the previous cycle’s output in volts, and where kf is multiplied by the setpoint so that it works at more than one speed

What this controller does it that it anticipates the drop in RPM during a stream of balls, and increases the RPM set point accordingly. This adjustment is the kLoadRatio, which is the key feature of this controller.

To tune the controller, you would start with kLoadRatio at 1, kj at some nonzero small number, and kf also at zero (kf allows the controller to reach the steady state faster, but is never necessary). Here is the initial scenario:

Inline image 3

The difference between the dips when balls hit indicate that the controller is not tuned correctly. Each valley should be at the same height, even if it is below the steady state. KJ should be increased in the above scenario. If the valleys increase over time, then KJ should be decreased. Eventually the RPM vs Time chart should look like this:

Inline image 4


This is definitely better because the balls are consistently exiting at the same speed, however we aren’t getting to where we want to be when we shoot. When this is achieved, we can finally calculate KLoadRatio. To do this, we take the setpoint and divide it by the Lowest RPM, which should now be constant for every ball. This yields a number greater than 1. Now the output of the function looks more like:

Inline image 5

Notice that the steady state is now greater than the set point. This is because it anticipates that the RPM will decrease when a ball contacts the flywheel and it increases the speed before the ball hits so that the speed is correct when it actually is released from the shooter.

Here are videos of the testing we did.

Robot Vision

Today, we found the correct equation for using the camera matrix and distortion coefficients and undistorting an image. We found the equation in this Wikipedia article. This is working pretty well. Now we just need to implement it into the robot code, and it should be done.

We also discussed whether or not the PIXY Camera would be useful for the targets this year. Right now, the current plan is to use the pixy for the gear vision target, but not the boiler. We believe that the low resolution of the Pixy camera would lead to a high error in locating the boiler, and since the margin for error is so small for our shooter prototypes (see Prototyping section of this blog), we need to have a more accurate system. Thus, we resurrected the old vision system using smartphones from last year, and initial tests are promising. We need to tune the OpenCV, but we were able to get it to reliably filter the boiler target:

Inline image 6

Also, we refactored the SPI communication driver for the PIXY Camera so that it is better integrated into the codebase and so that it can support multiple cameras.

Autonomous Path Following

Today, we continued work on the autonomous pathing system. We finally got the code to the point where we were able to deploy it to a spare drivetrain and test. We began by tuning the PIDF constants for the drivetrain and setting constants for the wheel radius, drivetrain width, and several pathing parameters. We had to make many several bug fixes and changes to our code, including rewriting the circle function in out AdaptivePurePursuitController class. We also faced several hardware problems, like the encoders falling off and one of the gearboxes breaking.. However, by the end of build, we were able to get the robot to drive along curved and straight segments of the path with a decent margin of error. There is still much work to be done on the pathing system, including improving its accuracy and implementing turns in place.

FRC Day 11 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 11: Prototypes and Drivebase

Prototyping

Shooter

Today we worked on duplicating the single wheel backspin flywheel with 4" fairlane wheels. We wanted to test the accuracy and plausibility of two side-by-side flywheel shooters, so we built another shooter. We also altered the first backspin flywheel shooter by replacing the side plates, which allowed us to put both shooter motors on the same side. This alteration was made to make the two side-by-side shooters compatible

Hopper Feeder

Today, we began detailing the hopper feeding mechanism. The current plan is to have it powered by two 775 pros with a reduction and to power both the front and back rollers via friction with the polybelt. The feeder is slightly angled and will include a funnel consisting of two tubes angled towards the middle of the back roller. The feeder will also rotate on the same axis as the intake. Rotation will be necessary to access the electronics on the baseplate between matches (i.e. Switching batteries)

Shooter Feeding Trough

Today, we built a second trough and added 775 Pro motors with a 3:1 reduction on both. While running, a polybelt moves the balls at an estimated 18 balls per second.

Intake

Today we finished assembly of the new intake prototype without a ramp and tested it out. We found that there was too much compression between the intake rollers and the floor/bumper, so we adjusted the mounting of the intake accordingly. What we found was that the center drop of the robot was enough to upset the outer roller's compression such that when the robot leaned back, it would not pick up balls. Of course, this was a big problem, so we made the intake pivot around a point inside the robot, very similar to how the real one would. By having the intake itself able to pivot, we think that it'll be able to move up and down accordingly as we drive into dense clusters of balls, fixing the issue of the intake bogging down. We finished assembling the intake, but have yet to test it. Our first job on Friday will be to get more tests running, and we'll go from there.

Inline image 1

Manufacturing

Drivebase

A group of students started manufacturing the parts for the drive base so we can send it out for welding next week. We were milling the parts for the bumper mount on the mill and ran some other parts on the CNC.

FRC Day 10 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 10: Shooter Improvements & More

Prototyping

Backspin Single Wheel Flywheel

Today, we finished the 4" Fairlane Single Wheel Backspin Prototype that we started on Saturday. We tested for the entirety of the build and received great results. While single shot accuracy was consistent, when we started pushing in balls at a higher speed, we found that the shooter was somewhat inconsistent. In exploring other options for more consistent feeding, (and by consequence shooting) we decided to change the VersaPlanetary gearbox running the polybelt feeder from a 5:1 gear ratio to a 1:1 ratio. We found this speed to be much more efficient. At the end of the night, without pushing the balls (so solely gravity fed), we managed to shoot around 25~ balls. After missing the first shot or two, we managed to make every subsequent shot. While this only shot at around 2-3 balls per second, it is a first step towards proving our design. We found the precision to be incredible, but more importantly the rate of fire was impressive! This was most likely due to the extra mass of the wheel resulting in inertia to counteract fluctuations in rotational speed as balls compress against the wheel. We began making a second iteration of this prototype in an effort to put it next to the previous working one. We would then shoot them in the same direction and verify that two shooters side by side is a feasible option for accuracy and rate of fire. We finished laser cutting the new parts, acquiring the materials, and sorting out all the tools. We only need 2 more 3:1 VEX Planetary Gearboxes, and then we can assemble the prototype and test.

Inline image 1

Testing:

Intake

Today we worked on a new and improved design for the intake. We CADed new sidewalls with updated geometry, in order to get rid of the ramp and make the intake easier to deploy. We laser cut the sidewalls and are almost done assembling the new prototype. The plan for the future is to finish it early on Wednesday, then run tests to see how effective it is.

Intake Feeder

Today at the lab, we worked on the feeder for the intake. Unfortunately, the whole process took a long time because we struggled so get the vertical portion of the feeder to spin at all due to efficiency issues with the design. Once we did get it working, however, we modified the lower roller in order to increase the spacing between it and the vertical roller. Though this would be effective, but generally we found that the current design simply needs too many modifications, so it would just be easier to do a complete redesign. The next step is to look into other feeder systems that are potentially more efficient and faster.

Rope Climber

Today, the team working on the rope climbing switched the previous 775 pro motor for a CIM motor and succeeded in climbing the rope. We first laser cut a new piece of wood that would connect to a cross bar on the robot holding the motor and comb shaft. We moved the holder for the motor and shaft one inch up to provide clearance for the motor as well as give the comb more room away from the crossbar. After this, we assembled a CIM motor planetary gearbox in which we geared the motor 1:9 and this ratio was also later increased through the gears on the shaft to 1:45. This proved to be enough to lift the approximately 30 pound previous drive base of our 2015 robot, Deadlift. Without success, we found that undoing the rope on the comb proved to be very difficult and time-intensive, so went back to the drawing boards and found that a velcro design could work out well while taking less time to undo. We will assemble and test this during the next build.

Testing:

Programming

Testing Shooter Prototype

Today we made leaps and bounds with the shooter prototype. We were able to score 30 balls consecutively feeding into our dual-motor flywheel shooter prototype. To do so, we fine-tuned the PIDF constants in the robot code to ensure that motor speed would remain constant even with the load from the balls, which ensures more consistent, accurate shots. This is a breakthrough for our shooter prototypes, the first time where we’ve been able to make a majority of shots from a stream. We still have to improve the firing rate of our prototype; we were firing at ~3 balls per second.

FRC Day 9 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 9: Flywheel and Prototypes

Prototyping

Topspin Single Wheel Flywheel

The topspin shooter continued testing today with several small changes made throughout the build. We remade yesterday's prototype and varied the hood length to see how it affected accuracy. We started the day by testing the 4" flywheel with top spin. We took the working design, and redesigned the prototype to not be adaptable, and in doing so we also designed an integrated feeder. This design worked relatively well. We iterated on the optimal amount of wrap on the ball, starting with around 120 degrees, and going as far as 80 degrees, without testing further. As we iterated and continued testing, we realized the difficulty of packaging a topspin flywheel, so unless we are able to show that topspin is more consistent, it is unlikely that we will use it in the final design. We also tested a backspin 4" flywheel by simply rotating the shooter. The design worked, but needed further optimization. We set upon further iterating on this by CADing an entirely new design.

Inline image 1


Inline image 2

Backspin Single Wheel Flywheel

Today, we remade the single 2" Fairlane Flywheel prototype, but this time we fixed all the little bugs from before as well as added two more 2" wheels in the exit. This concept was to see if it would make the shot more accurate, but it didn't pan out. We reverted to the single wheel design, which worked beautifully. This backspin shooter was really consistent and accurate for the first successful iteration and it also makes packaging the shooter into our robot much easier. We also worked on designing a three-parallel-shooter prototype that would have three of these shooters side by side for maximum shooting rate..

Inline image 3

Drivebase CAD & Design

We continued work on drive frame detailed design. Other team members started exploring space claim models for the entire robot, including the hopper, shooter, gear mechanism and drive train. We also looked at possible packaging for the topspin shooter that was working well. We decided that for simplicity, the ball feeder chute on the rear of the robot should not deploy over the bumper, and that it is better for it to stay rigid for consistent ball feeding. We still plan to deploy the hopper on the front, and possibly sides, of the robot.

Inline image 4
Inline image 5

Field Construction

We cut plastics and installed the top of boiler so that more accurate shooter testing could proceed.

Manufacturing

We will be continuing our work on making drive gearboxes. We finished de-tabbing gearbox plates and started making gearbox standoffs. Several students continued on mill/lathe training with test parts.

Programming

We restructured the robot code to offload control of the drivetrain from the Drive subsystem file to the main Robot Java file. The Drive system’s code runs every 1 ms, while the robot’s code runs every 5 ms. The driver station sends and drive data every 5 ms, so moving the code saves considerable processing power. This also allows for other functions to be implemented in the Drive subsystem.

Following our all-hands meeting yesterday, we finished the autonomous routine visualizer, which allows us to design and visualize an autonomous routine using a series of points. We also finished a parser that turns the visualizer output into usable robot code. We also implemented an adaptive pure pursuit controller, which helps the robot correct any deviations and return to its pre-planned route. This requires an odometer to track the robot’s distance travelled and heading, which we also implemented. We are currently establishing the groundwork for the robot’s autonomous routine, which we will implement when we have a final robot.

Camera calibration

Today we finished camera calibration code. It works really well, and now outputs the distortion numbers to a .txt file for easy access. Now, we are working on incorporating that into the SPI code so the Roborio has access to the undistorted image data. We need to figure out how to undistort the image while keeping it in a RAW format.

In addition to receiving calibration results, we discussed how to then take these calibration constants and apply them to remap the raw image coordinates to adjusted ones that map to physical locations on the field. We consulted a handy opencv guide.

Here's the picture of our whiteboard discussion:

Inline image 6

Programming On The Prototypes

A lot of progress was made today with prototyping. We wrote new code to add a closed PID control loop to the feeder of the new overhand/backspin prototype and we returned constants to work with the new flywheel. In doing this, we discovered numerous bugs in the constant setting code and we have remedied many of them. Most of the time was spent supporting the prototyping effort with various control tweaks to maximize performance.

FRC Day 8 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 8: Flywheel

Prototyping

Topspin Single Wheel Flywheel

Today, we iterated on our flywheel prototype. We decreased compression by around a half inch, and found drastically improved results. Our first test had over 90% accuracy. We attached a second motor to be able to test high throughput shooting well. We made our feeder perpendicular to the shooter, and found some shot inconsistency from balls later in the feeder. We realized that a gravity fed shooter might not work well, and added a powered feeder shaft. Our shot-shot consistency improved greatly for high throughput testing, but still isn't excellent.

Inline image 1

Testing:

Backspin Single Wheel Flywheel

Today, we worked on a single 2" Fairlane wheel flywheel with 1/4" compression fed by a polybelt feeder, powered by a 1:1 VEX Planetary Gearbox and Motor. The wheel - powered by 2 Planetary Motors - had lots of power, but was very inconsistent. Moving forward, we will want to constrain the shot on the sides as to avoid inaccuracies from side to side (this will most likely be with 1/8" polycarb sheets double-stick taped on). To help the ball shoot more accurately as it exits, we will either shorten the hood so that the ball is in contact with the wheel right before it exits. We may also try to add rollers to improve the shot accuracy. We also had trouble with the polybelt feeder, as the polybelt (which had too much compression on the ball) would skip along the ball as it pulled it up, getting worn down and rendered virtually ineffective in the process. To fix this, we plan to move the feeder out slightly to get the right amount of compression and also have a curved backing so that there are no dead zones in the feeder system. We also plan to make another prototype with a similar design, but less inaccuracies in alignment of the wheel and feeder.

Inline image 2
Inline image 3

Fuel Intake

Today we made good progress on the intake. We added two motors (775 Pros) and changed the gear ratio to an overall 3:1. The results were significantly better than the previous test with 1 motor; now, driving at full speed into a dense pack of balls, we were able to pick up almost all the balls and hold them in our hopper. However, this current design uses a small incline right in front of the bumper to help pull the balls up and over, which we would like to get rid of for the final design, because it makes deploying the intake much more complicated. We created a new prototype that does away with the ramp by changing the bottom roller geometry relative to the bumper, and from initial testing, the results looked very promising. More prototyping is needed to see if the new design with no ramp is effective as the previous prototype; however, as the intake nears completion we may prioritize finalizing the shooters.

Inline image 4
Inline image 5

Testing:

Gear Intake

Today we tried out a completely new design for the gear intake. Instead of placing the pivot point for the hook very close to main body of the grabber, today’s version switched that pivot point to the very front part of the hook. Feel free to compare the picture below to the pictures from the last couple blogs to see the change in design.

Inline image 6

Inline image 7

Although we did not finish fully assembling the new design, we believe that this new version will give us a significantly better grip on the gear.. Unfortunately, our initial impression after assembling part of it at build tells us that this new design might actually take up even more space than the previous version, which might outweigh the extra grip. The next step in the development process with involve finishing the construction of this design and evaluate possible areas of improvement. Once we have multiple gear grabber designs working at their full potential, we will compare the different versions and begin designing a metal version for the robot.

Inline image 8

Drivebase

We made adjustments to the drivebase CAD by moving down the crossbar to be flush with the baseplate while cutting out slots for chain runs. We also changed the corners on the rear to have a 45 degree slant for better gear intake and made it with two pieces of 1x1 tubing. Moving forward, the last electronics (pcm, vrm) and pneumatics (solenoid/manifold, compressor) have to be finalized in addition to final dimensions.

Programming

Today, the programming subteam discussed robot motion control with Jared. Moving a robot from point A to B requires waypoints, curvature, and physical constraints of the robot. For instance, a robot cannot instantly accelerate from standstill to full speed, and it cannot instantly decelerate to a standstill without damaging its gearbox components or slipping the wheels. Motion profiling allows the robot to move in a controlled fashion, minimizing acceleration and deceleration.

We also discussed factoring in obstacles like slippage and wrinkles in the carpet. In techno-speak, we would maintain an “odometer” to track our robot’s total movement, then we would calculate the robot’s deviance from the actual path. We would then calculate the closest point on the path, calculate the distance from the robot to the point, then draw a circle using the point as the center and the distance as radius. This path would be used to bring the robot back on track.

We divided the programming subteam up into six projects: finishing the autonomous mode visualizer, creating a RoboRIO path reader that would parse the visualizer output, calculating the closest point, creating an odometer, a speed profiler, and a steering controller. Meeting minutes are in the picture below:

Inline image 9

For the PixyCam, we made significant improvements with the SPI interface. The interface works, but with a few bad bytes. We should be able to fix these kinks soon. Also, we’ve made leaps and bounds forward with camera calibration, and distortion is much less of a problem.

FRC Day 7 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 7: Shooter and Prototypes

Prototyping

Double Wheel Flywheel

Today, we added wooden bars to prevent the ball from moving back and forth, as well as moving the polycord to the outside to limit disturbance. We then tested it, and it was very consistent and accurate. After fine tuning for a time, we realized only one flywheel was getting powered in testing. We then connected the other flywheel and retested it. The shooter’s speed and accuracy was improved greatly with the change.

Inline image 2

Testing:

Single Wheel Flywheel

Today we worked on a single wheel flywheel, independent of Dropshot. We began by cutting a design built to be extremely modular. After assembling the design with a 3:1 gearbox and powering directly from a battery, we found it to shoot far too fast. We changed the gear ratio to a 5:1 to account for this, and it improved drastically. In the next step, we changed back to a 3:1 gearbox, and attached the prototype to a Roborio and speed controllers. The prototype had too much spin, and did not grab the hood. We added polyurethane strips onto the hood, and this improved the compression and grip. The 4" fairlane wheels we were using started to come apart, so we replaced them with the wheels we used on Dropshot last year. We tested those, but found there to be too much compression. Next build we will most likely continue iterate to iterate this design to find the most effective qualities and use those.

Inline image 3

Inline image 4

Testing:

Retrofitted Dropshot Shooter

During this build, we found that the retrofitting Dropshot with a shooter proved useless (the other single wheel flywheel proved much more viable) and unrepeatable, so we abandoned this effort.

Intake

Today we did our first testing session of the intake/hopper combo on the 2013 drivebase. After a few simple iterations (small geometry changes, etc.) we were able to intake balls pretty effectively, although not as fast as we would have liked. When we drove the robot at full speed into a dense cluster of balls, we knocked away a considerable amount of the balls because the intake couldn't keep up with the speed of the drivebase. We were unable to effectively speed up the intake by using less of a gear reduction, because the intake would brown out and trip its breaker when the hopper was filling up. To solve this issue, we plan to add a second motor to the intake and further decrease the reduction (to 3:1) in order to intake fast enough. If all goes well, we should have an intake that meets all our goals by Friday. As a refresher, the goals for the intake are to be able to drive full speed into a cluster of balls, and have any ball that touches the front of the robot be sucked in. It also needs to stay compact in terms of depth, so that we can maximize the hopper space with the limited volume we have.

Inline image 5

Inline image 7

Testing:

Programming

Camera Calibration

While working outside of the lab, some programmers achieved initial success with the camera calibration code and were able to view calibration frames from a webcam, but were unable to link that to the PIXY camera yet. The software to communicate with the camera has been developed separately, and will need to be linked in, and then finally some performance issues will need to be addressed.

Camera Communication

Today we continued work on interfacing the PixyCam with the Roborio over SPI. Now that we're reading actual data from the Pixy, the challenge was to start making sense of that data. For each frame, the Pixy sends a list of the bounding boxes of detected objects ("blocks"). The information for each block is in a regular, consistent format. However, after debugging the raw data from the Pixy, we found that blocks (and frames) seem to begin at arbitrary places in the stream of bytes, with zeros (00) filling the gaps between them. We've modified and build some new functionality behind the scenes to allow code to handle this; a little more debugging and the robot should be getting a consistent flow of vision information.

FRC Day 6 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 6: Shooter Prototyping

Prototyping

Double Wheel Vertical Flywheel

The design of this shooter is based around two rollers feeding into two wheels that spin rapidly, compressing and shooting the ball into the goal. When we tested this prototype, we found it shot very wildly. We figured we needed another wheel above the first two to act as an active hood in order to improve accuracy. We then cut into the plate to make room, and lasered new plates. This new design worked slightly better, but it needed more compression, so new plates were lasered and assembled; however, we ran out of time to test it and will test it next time we meet.

Testing:

Double Belt Shooter

Today, we worked on prototyping a polybelt shoot using a design which was designed outside of lab hours. We began by modifying the design to work alongside the polybelt, as the original design assumed that the center to center distance between shafts could change. After changing the design and cutting new plates, we assembled the shooter. We used a 775 Pro motor with a VersaPlanetery gearbox with a 5:1 reduction. After testing it and finding that the roller speed was too slow, we replaced the 5:1 with a 3:1 and found an immediate improvement. We also increased the compression on the balls on our feeding mechanism by adding polyurethane strips to our feeder plate. While our shooter was able to shoot balls, accuracy was low and there was a significant amount of variability between shots. We were not confident about what the issue was, but we now are sure that we need to provide more energy to the balls and in a more efficient manner.

Testing:

Retrofitted Dropshot Shooter

Early in the season we modified dropshot to shoot the fuel balls. We are now working on a new version that will have a powered feeder and new rails to shoot the ball. We haven't finished assembly yet.

Programming

Robot Programming

We debugged some code that was written last build and got it to run on our prototype drive base and we also fixed an issue on our other development board by replacing the radio. Also, the web configuration code that we used in 2015 was ported to this year’s code base for easy constants configuration. With all of the prototypes we were working on, the github started getting messy, so we cleaned it up by branching and adding more files to the gitignore.

Camera Calibration

Today we worked a lot on Camera Calibration. In the morning, we got some code that allows OpenCV (the library we use for calibration) to directly communicate with the Pixy Cam. Other than some small fuzziness at the bottom of the image, it seems to be working well. In the afternoon, we merged that code with the calibration code. Also, we mounted the dot grid that is used to calibrate the camera, on a piece of wood, so it is flat and can consistently calibrate all of the cameras.

Vision Targets

Today we started to build a 1/5 scale model of the high goal of the boiler. What we did was laser cut a CAD of a circle, twice. What we need to do next meeting, is put up the support beam in the middle, and wrap the whole thing in paper and reflective tape. This should be an accurate representation of the boiler that we can use.

FRC Day 5 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 5: Strides in Prototyping and Testing


Prototyping


Shooter

Today we worked on assembling and improving the shooter. After assembling a plethora of VersaPlanetary gearboxes, forming polycord, and machining new hubs for the flywheel, we managed to assemble the prototype. After testing it, we found the real world version to have varied from the CAD, and the compression on the flywheel to be too much. We recut the two shooter side plates to allow for more reasonable levels of compression. We then hooked the prototype up to a mock drivebase and speed controllers. When we tested it, we found that the shooting was inconsistent, most likely due to dead space between the feeder and the flywheels. We tried killing one side of the feeder and changing to a fixed plywood side to lower the variability. While the variability was removed, the spin increased so this plan was immediately scrapped. We then tried to add a makeshift barrel, around 6 inches in diameter and in length. This barrel significantly increased our shooting accuracy. Later, we will have to choose whether or not to have a wide shooter or multiple separate flywheels.

Fuel Intake and Hopper

Today we made great progress on the intake and the hopper. We assembled the updated design from yesterday, and it while it was better (faster, more balls made it over the bumper), we still had the issue of some balls becoming stuck in a "dead zone" and not fully clearing the bumper. To fix this, we decided to try putting 8 thick zip ties on the top roller with about two inches of uncut length, in order to kick the balls up and over the bumper when they got stuck. The results were fantastic: the intake overall worked much faster and balls never got stuck anymore. It seems like this is close to the design that will be implemented in the real robot later on.

After thoroughly testing the intake, we began work on a prototype hopper that would sit directly behind the intake and hold about 150 balls. This prototype has a sloped floor, which will help funnel balls to the back of the robot so we can continue to intake efficiently and feed into the back conveyor belt that will lead to the shooter. While the hopper was fully assembled and ready for testing, we did not get a chance to try it on the practice drivebase because it was being used for the shooter prototype. For the future, we will test the combination of the intake and hopper, and continue iterating those designs. We are also considering prototyping a hopper with a powered conveyor belt floor, to agitate the balls and feed them towards the back even faster.

Testing:

Gear Intake

Today’s build was essentially a continuation of what we did yesterday. We finished putting together the pieces that were CADed previously and fine-tuned the claw system so that it could consistently pick up gears and manipulate them in 360 degrees. One special feature of our design is that, even if one claw is out of position, the locking mechanism is still able to prevent the other individual claw arms from moving around. Although this design works extremely well as it is, the next step will be to condense it significantly so that it can meet the size constraints of the robot.

Drivebase

Today we nailed down an initial version of our drivebase which included the weldment, electronics baseplate, gearbox, and wheels. To finalize our design, changes may have to be made to the frame dimensions to accommodate both the ball and gear intake as well as the bumpers. Moving forward, our priorities are to pocket the baseplate and waterjet it out of 1/8" aluminum to save weight, design new mounting provisions/supports for the bumper rails for easy access, and potentially modify the main breaker placement which is currently positioned in the bumper rail.

Climber

After mounting the “comb” onto a shaft, we were ready to begin putting together the climbing prototype. However, we soon ran into some problems with the VersaPlanetary gearbox we constructed. After taking it apart and putting it back together (with a 10:1 gear ratio), we were ready to restart testing. At this point we ran into another problem as our setup proved to be unstable, making it impossible for the prototype to run smoothly.. We lasercut new, larger sidepanels and attached them to a 2x4 for stability. Next, we recut the metal bar we had used to stop it from interfering from the turning of the comb. Finally, we were ready to attach it to Dropshot’s drivebase, set up a hanging station, and start testing. While the prototype could successfully grab and hold onto the rope, it just did not have enough power to life the entire robot (even after changing to a 50:1 gear ratio in the VersaPlanetary). Looking toward the next build, we’ll have to find a way to increase the prototypes strength and speed.

Full Robot Mockup

The team created a quick mock up of the robot that features an intake on the front and shooter in the back. A large hopper made of polycarbonate pops out to over the bumpers to maximize its volume. A system of polycord or belts pulls the balls to the back of the robot then up into the shooter. It not a finalized design but serves as a start to get an idea of how much space subsystems like the bumpers and drivetrain take up so they can start being manufactured.

Programming

Robot Programming

Today, we fine-tuned a PID control loop for the intake. PID is a control algorithm that maintains a constant RPMs on a motor, regardless of motor loads. For example, a ball launcher’s motors may slow down when balls are inserted due to the increased load. PID would keep the motor’s RPM constant when a load like a ball is inserted.

We also rewired the encoders to connect to the RoboRIO instead of from the CAN Talon. At the moment, we are running our PID + feed forward loops off the RoboRIO (instead of the CAN Talon) and need the encoders to connect to the RoboRIO. While we can get encoder values from the CAN Talon, we need perfect time synchronization for the control loop on the RoboRIO, which we can accomplish by connecting the encoder to the RoboRIO.


Camera Connectivity

Today, we continued on the previous build's progress, and decided to continue working on SPI. First, we connect the PixyCam to an Arduino and used the Arduino library to see if it worked correctly with the Arduino, as it hadn't been working with the RoboRIO. Our test was successful, and the PixyCam worked as expected with the Arduino, leading us to conclude that there was a problem in the communication between the PixyCam and the RoboRIO. We connected the RoboRIO and Pixy pins to an oscilloscope to ensure that data was being transmitted correctly. After a few minutes of trying to get proper data, we realized that the PixyCam only broadcasted data when it saw an object; when no objects were detected, it would only send null bytes. This was the reason for the issues yesterday; when we got null bytes, we thought there was a communication error with the Pixy, as the documentation did not indicate that no data would be transferred when no objects were detected; we expected frame separators, but none were sent. After realizing this, we put a ball in front of the camera, which had been programmed to recognize balls, and updated our RoboRIO program to search for objects in a loop. At last, we were able to successfully retrieve object metadata, but we encountered connectivity issues between our driver station and the RoboRIO and were not able to finish our code. This build, we were able to get our program to parse the Pixy's object broadcast data. Next build, we plan to finish our SPI driver by parsing the frame separator indicators, so we can recognize when there are multiple recognized objects in a single frame.

FRC Day 4 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC#FRC Build Blog

Day 4: Iteration of Prototypes

Prototyping

Double Wheel Vertical Flywheel

As we proved this flywheel could attain a high throughput, we transitioned today to begin testing different wheel types and compression as well as the conveyor system. In the process of setting up the next prototype, we found we lacked enough polycord pulleys, and machined more out of some delrin stock. We scavenged the 3:1 VersaPlanetary gearboxes from our previous prototype. While we did not have enough time to finish developing the prototype, we have all of the pieces and can finish it quickly tomorrow.

Fuel Intake

Taking the intake design from yesterday using two polyurethane rollers, we laser cut and assembled it, discovering that while it was able to pull balls up and over the bumper, the balls sometimes got stuck. the compression was too little on top of the bumper and it sometimes got stuck. The compression seemed to be too little at the top of the bumper because we didn't account for the bumper compressing alongside the ball, so we went back in CAD and redesigned the geometry of the upper roller to have increased compression. We are still in the assembly stage of the new and improved version, so we will see tomorrow how well it works with the improvements. For the future, we still have to see how effective the new design is before we CAD the real intake for the robot, but it is likely that this will be the preferred design because of the simplicity of having just 2 rollers.

Gear Intake

Throughout the course of the build today, we worked on constructing the 3D CAD design that one of the students made the day before. This worked out well because we were able to get the whole thing laser cut and fully constructed relatively quickly. Although this design seemed to be very similar to the previous version, a new key feature was added: A locking system for the claws while they are grabbing onto the gear. Although we were not able to fully test the design today, these improvements should theoretically allow us to manipulate the gear in 360 degrees, something we were not able to do previously. At the build tomorrow (Saturday), the main focus will be to finish building the prototype and look at potential ways of packaging the design give the tremendous size constraints presented.

Drivebase

Today we finalized the CAD Design for the Drive Gearbox, which is now almost ready for manufacturing. We started by pocketing the gearbox plates, a method used to reduce weight while maintaining the structural integrity of each plate. Our two gear ratios are 15:48 and 28:35. We decided to have a two stage gearbox with a dog shifter in anticipation of heavy defense, allowing the robot to have speed and maneuverability based on the situation. We also added spacers, an intermediate shaft, and designed a new front gearbox plate. Through the design of the gearbox plate, we were able to save 0.04 pounds in a game where the robot weight is inversely proportional to its speed.

Regarding the drivebase weldment, We modified it to have a cut out in the back. The gearboxes will sit in the two cutouts in the back corners and the gap in the middle will be for a gear intake mechanism..

Climber

Today, the rope-climbing project finished prototyping a “comb” to grab the rope as well as housing to connect the comb to the robot for testing. We completed the comb by measuring the diameter of the string to find the distance between each prong of the comb. After this, we cut these parts out and tested it by ensuring that rope with knots would successfully hook onto the comb. Besides this, we also created the housing by attaching a VersaPlanetary enabled motor to a wood structure. We then connected the motor to a shaft by using gears and bearings. At this point, we just need to attach the comb to the shaft in order to finish assembly and begin testing.

Programming

Camera Calibration:

After manually calibrating one camera with limited success, we decided to automate the process to make calibration quicker and more accurate. The goal of the project is to have the OpenCV calibration code to read the camera input automatically so that we can see what angles will work for calibration before we take the picture. Today we downloaded all the necessary software needed to run the calibration program (OpenCV, Eclipse C/C++, MinGW, etc.); however, we did not finish this. Needed for next build is to set up Eclipse with a compiler and Download all the premade libraries for OpenCV. After that, we can edit the code to make it more user friendly, by having it connect directly to the Pixy Camera, and improve calibration.

Camera Connectivity:

Today, we deployed multiple test programs to an old RoboRIO to test our serial driver. Unfortunately, we ran into many issues early on. We then created another program to dump raw SPI input data to attempt to diagnose the issue: we noticed that we were only receiving null bytes (0x00), perhaps due to an SPI protocol error. We found that this occurred because the SPI connection hardware had a loose contact issue between the RoboRIO’s pins and the header pinout; after this was fixed, we received (0xff) bytes. Unfortunately, even after attempting to replicate the protocol according to the description, we could not get the PixyCam to send us anything other than (0xff), which was oddly not documented in the protocol information page. However, we suspected that the issue may stem from WPILib’s abstraction of the SPI interface itself; thus, we plan to implement a PixyCam SPI driver in C/C++ based on a low level library that accesses the serial port directly. In addition to working on SPI, we also worked on our `libpixyusb` interface, attempting to run the sample program. Unfortunately, we received an error about a failure to transmit/receive data over USB; we traced down the issue in the libpixyusb source code to the low level USB handshake. Getting `libpixyusb` to work reliably on the RoboRIO will likely be extremely difficult, possibly even requiring custom drivers and a kernel patch; the exact same code works as expected on an Intel x86 laptop, but when cross-compiled onto a RoboRIO with the FRC C/C++ toolchain, it encounters this unexpected error. After evaluating the pros and cons of both methods of connectivity, we decided to continue to pursue SPI rather than USB.

Robot Programming

Last workday, we tried deploying robot code to the RoboRIO but ran into problems deploying the code due to conflicting libraries for the CAN Talon motor controllers. After removing the conflicting drivers, we were able to successfully deploy the robot code. These changes are reflected in the latest commit on Github.

We then successfully deployed the code for the shooter prototype to the RoboRIO, but faced problems with maintaining a constant RPM. We used a basic feed-forward controller, which should set a near-constant RPM, but we measured drastic fluctuations in the RPM. We hypothesize that this is because the encoder is returning data at a different rate than the robot is running, leading to discrepancies in the measured RPM. To fix this, we will try connecting the encoder directly to the RoboRIO’s digital inputs instead of to the CAN Talon.

Waypoint visualizer:

We worked on an autonomous mode path simulator. The app lets a user enter waypoints and speeds and plots out a path that the robot will take. The app also supports animating the robot's movement. We also worked on implementing a radius feature into the program that would allow the robot to round corners. This app is a vast improvement over the current method of programming paths which require trial and error. With a helpful web interface, we will be better equipped to plan auto routines before we even test them, which allows us to develop before the robot is built. It’s not done yet, but we have made a lot of progress: