Team Eight/Final Paper

From Maslab 2015
(Difference between revisions)
Jump to: navigation, search
(Software)
(Advice for Next Year)
Line 36: Line 36:
  
 
The controller on our robot was an Intel Edison on an Arduino Breakout Board with an added on PWM shield. To communicate with the hardware, our firmware used libmraa. We then wrote classes for all of the actuators and servos that used the lower-level commands provided for us.
 
The controller on our robot was an Intel Edison on an Arduino Breakout Board with an added on PWM shield. To communicate with the hardware, our firmware used libmraa. We then wrote classes for all of the actuators and servos that used the lower-level commands provided for us.
 
== Advice for Next Year ==
 
 
-Have multiple programmers and don't underestimate the importance of vision.
 
-This is a software game. We had CNC milled precision aluminum pieces all toleranced to within .001", waterjet-cut aluminum plate, and titanium sheet metal on our robot. The winning robot was made predominantly out of cardboard, and they schooled us because they had wicked good vision processing.
 
-Get vision going ASAP, it is your most important tool. Also, use interlocks, as in, don't stay in one state/task for too long, set a timer, this prevents you from chugging into the fall indefinitely.
 
  
 
== Hardware==
 
== Hardware==

Revision as of 04:43, 4 February 2015

Contents

Software

All of the software was written in C++. The code can be found here[1].

High Level

State Machine

We had 7 states: initializing, searching for stacks, driving to stacks, lifting the stacks, searching for the platform, aligning with the platform, and dropping our stack on the platform. Each state first took in the sensor data, determined the next state, then either returned a different state or ran a process (such as turning a few degrees to find a stack).

Image Processing

We used OpenCV to identify stacks and the platform using similar algorithms. All of the colors were identified by material properties found experimentally. After filtering by color, we used the findContours methods to identify the stacks, then we applied size filters to get rid of noise. Once we identified the stacks or platforms, we calculated the angle to the object to feed back to the robot for driving.

Low Level

Sensors

Distance: We used 3 medium range IR sensors (rated for 10-80 cm) to get our distance from walls and stacks. We had one on the very front of our robot and one on either side. We could use the front and any one of the sides to follow walls around the field, and we also used the front one to determine if we were lined up with a stack or the platform. These were decently accurate within the specified range and worked for our purposes.

Orientation: We used a gyroscope to determine our angle and turn towards the stacks and platforms. The gyro was very accurate and allowed us to turn to precise angles very nicely.

Breakbeams: We had two IR breakbeams on the interior of our robot to detect when our lift mechanism was at either of its two extremes. These were extremely reliable once the hardware was lined up to trip them correctly.

Alliance Switch: Finally, we had a switch on the side of our robot that deteremined whether or not we would search for a stack that had a red or green cube on top. This was important because we needed the top cube to be our side's color to get the points on the scoring platform.

Actuators

Motors: There were 3 motors on our robot, all with encoders. Two of them drove the wheels and one was used to drive the lift. Although we could read the encoder values, we did not end up using them.

Servos: There were 4 servos on our robot, two to actuate the front doors and two to grab the cubes.

Interface

The controller on our robot was an Intel Edison on an Arduino Breakout Board with an added on PWM shield. To communicate with the hardware, our firmware used libmraa. We then wrote classes for all of the actuators and servos that used the lower-level commands provided for us.

Hardware

Our robot revolved around the lift and horn assembly that captured and lifted cubes into the robot. The lift and other related mechanisms worked together to capture, condition, grab, lift and store the cube stacks.

Our robot had two identical servo-actuated doors that could turn 180 degrees, from pointing in the motion of travel to fully folded backwards. These doors had two main purposes, capturing and conditioning cube stacks. When seeking a cube stack, the doors opened partway, forming a large V-shaped funnel at the front of the robot, compensating for some inaccuracy in vision. The doors increased the capture cross-section of the robot, helping us get stacks easier. Once the stack was captured, we had to condition it to orient it properly with respect to the robot. We accomplished this by gently turning gently back and forth, knocking the cubes into alignment with several nudges.

The lift mechanism on our robot supported 2 servos which gripped the bottom cube of a stack. Once the cube was in position, the servo horns swung towards the cubes, holding it by the hole. The lift then raised the stack into the horn assembly. The lift was made from precision milled aluminum blocks with hardened steel shafts and high quality bronze flanged bushings. The lift was powered by a 30:1 polulu gearmotor with an encoder. The torque of the motor was transmitted to the the lift carriage (the part that moved) via a MXL (.08" pitch) 6mm wide timing belt. The timing belt was attached to the carriage with a waterjet "comb" of aluminum with little cutouts that matched the valleys of the timing belt. This provided accurate positioning and strength. Although the lift was equipped with an encoder, counting encoders counts was not accurate enough to keep the carriage from hitting the top or bottom of the lift. In order to prevent damage to the motor and lift, we used two infrared photogates (breakbeams) to tell the Edison when the lift has reached its maximum travel.

Horn Design

We decided to design a horn to hold the cubes that we lifted. This way, once we made it to the platform, we could place the cubes on the platform without allowing the other team to potentially knock the stack over. The horn was designed such that all 15 cubes on the game field could be stacked and stored inside. Near the end of the round, we would drive to the platform, release the lift and score our points. The horn mounts to the robot on top of the top layer with tabs, and underneath the third layer with more tabs. At the bottom of the horn we 3D-printed a flange to funnel any misaligned cubes into it. We also lined the inside of the horn with slippery tape to facilitate easy movement up and down.

The horn was decorated appropriately with money symbols running up and down it, and the words “Do You Even Lift?” on the back. It was certainly an obnoxious design.

Personal tools