12 posts

FRC Day 16 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 16: Zipper Hopper and Intake

Prototyping

Zipper Hopper

Today we solved the problems of the previous designs by removing the polycord and replacing it with chain. While disassembling the prototype, we found another link of the polycord which melted onto the delrin hub, so in the future we’ll definitely avoid using polycord in this type of situation. The chain increased efficiency so much, that we actually ran into problems with our feeder roller. As a result, we found that it needed a second CIM to drive it efficiently without burning out. After testing it, we decided to iterate on the zipper wheels themselves. Changing from an active to passive solution, we changed one side to metal wheels with little traction. Specifically, our intake wheels from 2015, without any polyurethane. On the other side, we added a second mounting hole and added two chain run rollers. We found that this worked well,and we need to continue to iterate and finalize the hopper design.

Inline image 8
Inline image 9

Intake

Today for the intake we worked on the side plates and made the geometry match that of the currently-functional prototype. We tried to make them look good and then we pocketed them.

We chose a piston and have a preliminary extra plate that mounts via small brackets to the 3/16" bolts in the drivebase bumper-support tubes. We had to change the motor mount plates so the standoffs would avoid hitting the many paths of belts.

We still need to finalize the packaging of the intake into the overall superstructure and integrate it with the hopper and feeder.

We also need to figure out how to get the polycarbonate ramp to deploy because currently it doesn't fit within the starting configuration when the intake is raised.

Inline image 5

Inline image 3

Inline image 4

Programming

Computer Vision

Today we began work on modifying the Android vision tracking app, used in last year’s challenge to aim at the goal, for the boiler target. The underlying thresholding code, which isolates the illuminated (green) retroreflective tape from the rest of the image, will remain the same, but the processing code will need to be changed.

We use OpenCV, the de facto open-source computer vision library. We began with a thresholded picture of the goal that shows only the retroreflective tape on the target. Then, we created a contour, or an outline of the “area of interest.” We initially experimented with this using GRIP, an application that allows one to interact with OpenCV using easy drag-and-drop blocks, but we quickly realized GRIP’s limitations. We then moved to Python for prototyping purposes, and we were able to draw an outline of the contours.

Finally, we also discussed using the pinhole camera model to determine the robot’s distance from from the goal, which determines how fast/hard we launch the ball (Wikipedia Article). Given the actual object height (in inches/cm), the camera’s focal distance (in pixels), and the height of the object in the camera (in pixels), we’re able to calculate the distance from the object. The exact means by which we implement this are to be determined.

If you’d like to help with computer vision, please set up OpenCV for Python (64 bit!) using these instructions.

Thresholded image:

Inline image 1

Thresholded, with contours highlighted in green (by the OpenCV program):

Inline image 2

Autonomous Code

Today we worked on cleaning up and documenting the autonomous pathing code. As part of the cleanup process, we reworked the pathing code's coordinate system. The old coordinate system was a left handed system, with positive x values to the right and positive y values moving downwards. This placed the origin at the top left hand corner of the field. However, angles still moved counterclockwise, making the whole system convoluted and confusing. The new coordinate system we implemented today is much more straightforward. Positive x is right and positive y is up, while angles increase as they move counterclockwise. This new system makes trigonometric functions far easier to use, as with the old one we would always have to invert any y values.

FRC Day 15 Build Blog

2017 FRC Build SeasonEmailParentsStudents#FRC Build Blog

Day 15: Drivebase, Prototypes, and Program

Wiring for Drivebase

Today we began wiring the drivebases. We have all of the Talon SRXs done and we have installed most of the components. We have a lot more work to do, and we will be working hard to get it done as soon as possible.

Inline image 4

Inline image 5

Zipper Hopper

We worked on developing a new zipper hopper. We disassembled the old one, and built a new one with rollers. We built the rollers using aluminum tubes with a 7/8" OD and surgical tubing around them. The hubs are VEX Pro 1/2" hex spacers malleted into the shafts. We beveled the shafts so that the 'plugs' would be as colinear as possible when stuffed into the shafts. We also ran the floor and feeder with polycord rollers. We quickly discovered that after running it for a short period of time, the polycord would break or just slip. We also found that at high RPMs, the amount of friction caused so much heat that the polycord pulleys we were using melted. We then had to transition to belts and pulleys, which fixed some of our problems. After our testing, we found that the rollers would "hot-dog" and sometimes not feed the balls. While it was better than the polycord, it still was not good.

Inline image 6

Intake

Today the intake was remade and retested to finalize geometry before it's fabricated out of metal, and we found that the design maintained a good amount of compression on the balls throughout. We did not get a chance to fully test it yet due to some mistakes in the prototype that led to it being remade once more, but it is almost ready to go for thorough testing tomorrow.

Inline image 7

Programming

Camera Calibration

Today, we calibrated all six Pixy cameras. We altered our code, so depending on which camera we are using, the code reads the camera matrix specific to that number Pixy. We saved all of these in .txt files in a new folder called resources. The next step is to add this folder to the JAR file (Java ARchive) so that it is deployed onto the robot. Currently, the fps (frames per seconds) in which the calibration program is running at is really low. We sped it up, but that crashed the program, and the calibration wasn’t as good, so we changed it back. We also had some trouble with Pixy #4. There was a black splotch in the top left corner of the image. After unscrewing the lens, we found a speck of dust that we blew away using compressed air from the pneumatic hose. This fixed the camera. Under FRC-2017/camera-calibration/ there is a file titled README.md which contains instructions for calibrating the cameras.

Here is a sample applet which shows how we take an image (shown on the left) and undistort it (shown on the right).

Inline image 2

As you can see, the dot grid is significantly straighter in the right image..

Prototyping

We continued to adjust the Talon SRX’s controller to see if we could the PID tuned. Results were not yet conclusive, and there is still more to test and evaluate.