Team Three/Journal

From Maslab 2009

Jump to: navigation, search

Contents

Day 0: Sunday January 4th

MASLAB begins tomorrow. We've been trying to get a head start on some basic design principles. We have a preliminary design for our robot based on the information we've been given so far.

Robot Design Goals

Our team has been debating what the best strategy is for overall robot design over the past month. We've made the following decisions:

  • We will implement a differential drive system, not omni-wheels
  • To collect balls, we will lift them up to a sorting chamber, which will use a photodiode to sort them into two storage bins.
  • Balls will be released at the front of the robot.
    • We're currently debating whether both colored balls can be released from the center of the robot, or if it is better to keep the ball storage on the sides of the robot (this is pictured below).
    • Other mechanical design considerations:
      • Two-faced bot with rollers on both sides, meaning that the robot changes orientation by 180 degrees for each type of ball it retrieves. This design required an extra servo dedicated to rotating the webcam and also necessitated that the differential turning motion be synced with the webcam turn during 180 turns.
      • Central carousel for sorting, where balls funneled into the middle of the bot fell into slots in a circular carousel. Balls are then released through the rear with a servo-powered mechanism that only shoots balls out if the ball is the correct color. As with the previous idea, it seems that having more than 1 opening just complicates things too much.
  • We will attempt to perform SLAM (Simultaneous Localization and Mapping). This may be too ambitious.
    • Odometry sources include Wheel Encoder Quadrature, Visual Localization from Webcam & Internal Map, and IR Range Finders.
    • We will recognize landmarks such as goals, barcodes, and even the shape of the walls.
    • Combining relatively accurate odometry data with the (uncorrelated) visual & IR data may allow us to "learn" the map.
    • If we cannot use visual data to decrease the error in our odometry, we may introduce another uncorrelated source of odometric data: optical mice.

TEAM3 - Initial Cad Design - Front.gif TEAM3 - Initial Cad Design - Back.gif TEAM3 - Initial Cad Design - Divider.gif


Here is our current plan for sensors points:

  • Small motor / modified servo for conveyor belt: 5
  • Servo for ball sorter: 5
  • Servo for ball gates: 5
  • Photodiode for ball sorting: 1
  • 3 IR sensors: 12

Total: 28 If possible, we'd like to add one more IR sensor.

Vision Code

Using some pictures from previous years, we've started writing basic visual functions. Functionality so far includes:

  • Color Filtering System
    • Allows definition of a color via a function which takes as input the RGB value and returns either True or False. Of course the function may perform transformation to the HSV color space if desired. We may find that such conversion is unnecessary (to save computation power).
    • Lists filters in order of priority. For example, say we want to consider very dark colors Black -- even if our definition of Blue might have considered the color to be Blue, if Black appears higher in the filter list, the pixel will be considered Black and not Blue.
    • Currently, we're detecting the following colors (in order of priority): Black, White, Blue, Red, Green, Yellow.
  • Blob Detection
    • Developed algorithm with runtime linear in the number of pixels in the blob.
Shape Detection Example
  • Shape Detection
    • Developed algorithm to fit shapes to blobs. For example, the goal is defined by four points with three connecting lines. Seems to work well even at fairly extreme angles
  • Filter Out Area Inside Goals
    • Example coming soon.
  • Filter Out Area Above Wall
    • Example coming soon.

Further Mechanical Design Considerations

Tips from previous years' wikis:

  • gear-like wheels for better traction on the carpet floor (reflected in the CAD drawings above)
  • round shape so that corners don't get stuck while turning
  • large ball entry so that bot's centering/positioning doesn't have to be as precise
  • roller for ball acquisition as opposed to actuated arms or grabbers
  • KISS

Effects of this years' rule change

  • It was fine before to store the balls en masse. Having to sort the balls presents a whole new challenge.
    • Previous years' machines could make do with just singer roller or one-way gate
    • Balls could be stored just in area underneath the bot
  • Effectively, a bottleneck in ball acquisition has to be made in order to sort the balls
    • Balls have to be collected, sorted, then stored
    • Sorting done one at a time
  • Two main ways to do this:
    • Collect the balls, sort within the bot, redirect balls to separate storage bins
      • Minimizes dependence on path traversal and bot motion
      • Space limitations become more important
      • Generally would require more actuators, which limits the number of sensors that the bot can have
    • Sort the balls before collection
      • More heavily dependent on camera (instead of photodiode) to identify ball prior to acquisition during the bot's approach to the ball
      • Can be done by only going after balls of a single color (giving the bot more specific 'missions' than in past years)
      • Can also be done by having completely independent ball acquisition systems for each ball color, but this approach also would likely require more actuators than available

Day 1: Monday January 5th

We spent today looking over the parts in the kit and getting some simple code running through the eeePC. The parts are entirely new this year, so some of the dimensions we assumed for our early CAD designs are slightly off. Luckily, the battery is a lot smaller than we thought, which makes some of our space constraints a bit more flexible.

We had some problems getting the OrcBoard to work due to soldering and power issues, but everything worked out in the end, and we feel we're working at a good pace.

We hope to finalize our initial design within the next few days and get as fast a start on fabricating the parts as possible. Hopefully we'll have a full list of parts we need at least by the end of the day tomorrow.

Day 2: Tuesday January 6th

The mysteries of the orc board continue to confound us. Assignment two was completed as fast as can be, but ethernet troubles kept us in lab 2-3 hours longer than anticipated. That sucks. Don't think anyone knows what exactly is wrong with it.

Otherwise, our secret behind the scenes team member continues to churn out code at a ridiculous rate, and we're finalizing our design. The design from our Day 0 post was modified a good amount so that the space is utilized better and so that the bot can hold more balls.

In working with the IR sensors, it seems that using our own calibration and the AnalogInput class might work better than the IRRangeSensor class as suggested by the TAs. The IRRangeSensor's getRange() function doesn't seem to be very accurate, and short range sensors unfortunately return a 0.0m value for surfaces that are out of range. Since the IR sensors could be used to trigger actions once the range has decreased beyond the certain value, the 0.0m out of range value could screw up the code. It seems it would be better to use the voltage, as out of range surfaces would result in a very low voltage, which wouldn't accidentally trigger anything in our code.

Day 3: Wednesday January 7th

Since it was our day to clean up the lab, we went in rather late (~7pm), but with most of our code finished and ready to go. Using Skype and allowing remote desktop, we were even able to actively involve our off-campus coder, who worked on debugging our code from outside the state. We like to think we're the first group in the history of Maslab to have team members simultaneously working on a robot across two different time zones.

Again, we had troubles with connecting to the orc board. It sometimes requires resetting the connection over and over. Not sure why that is. We also got a chance to run our bot through the makeshift playing field for the first time and trying to figure out how the camera should be configured. Our code initially set the camera to ignore everything in the top 30% of the view. We're not entirely sure yet if it would be better to keep this so that the code searches through less pixels or to position the webcam so that all possible views only contain images of the field below the tops of the walls. We're also still unsure if we'll be using the barcodes for localization (though our short-term impulse is to lean towards no).

In driving the robot towards the ball, it seems that the setPWM() command works so slow that we can't get the bot to move straight initially. We get a jerking motion in one direction as one motor fires up before the other. This would suck if the problem persists. Hopefully it's either just a board problem or the TAs will mention possible solutions in future lectures.

Construction has also begun. The mechanical/aero-astro engineers on the team are overjoyed. The two EECS members don't know what the big fuss is about.


(What fuss? ;) -Dan)

Day 4: Thursday January 8th

Today assignment 3 was due (assignment 3 involves having the robot spin around in a circle until a red ball comes into view of the camera. Then the robot should stop spinning and move so that the ball is positioned in the center of the camera image). This involves many of the basic functions that will be essential to our success during Maslab. We'll need our vision code working quickly enough to provide feedback to the motors, and we'll need control code to tell the robot how to move to position the ball in the center of the camera image. We had a pretty good start on this task from yesterday, however we need to improve the performance of the image processing code in order to process images quickly enough to enable smooth control.

We were able to significantly speed up our image processing, although it is apparent that this will be one of the most important problems we'll face. Our image processing will be more complicated in the end than just detecting red balls, so our programmers are planning on spending a lot of time (already have spent a lot of time) on optimizing that code. Our EECS guys finished assignment 3 without too much trouble while our 16/2 guys worked on the waterjet. We finished assignment three without much trouble, and made good progress on creating the base for our robot.

Day 5: Friday January 9th

Not much happened today in terms of building our robot because the waterjet was queued up and then broke down. Today was also our first "check up" assignment with the staff. After some difficulties getting into the meeting location, we dutifully presented our robot's features, design, and work schedule. Looks like we're still on the right track! Afterwards, we met to further solidify the mechanical design of the robot. To the relief (and dismay) of our team, we settled on using wood for the base and structure. We pondered a bit on where to acquire all the necessary materials and tools, and then called it a day.


Day 5: Monday January 12th

We rejoiced today by the knowledge that our secret 4th team member would finally be joining us tonight. In lab, we made considerable progress towards the construction of the final bot. The base and central shaft were cut and assembled. There was some complaining about a shortage of nuts, but all and all everything went well and we got to see the first physical skeleton of our robot.

Today was also the first mock competition. Although we did not have a fully functional robot capable of roaming the playing field, we did take the opportunity to test our camera and vision code in this new arena. As expected, the lighting conditions in 26-100 weren't ideal meaning we'll have to make some adjustments, but we were happy to see that our vision algorithms seem to be working.

Day 6: Tuesday January 13th

The mysterious 4th team member finally appears. He wasn't as good looking as the rest of us had envisioned, but luckily has also not yet made any moves to disrupt our precarious team dynamic. The lathe at Edgerton and LMP got a workout today as we machined the rollers for our conveyor mechanism.

Coding is taking a temporary hiatus as we wait for the waterjet/laser cutters on campus to free up so that we can make wheels with the encoder slits built into them. Instead of 2 separate sets of slits, we're going just a single set of slits and just offsetting the sensors. This should give the same result.

A lot of the wiring was also done, as we took the time to prep the whisker switches and IR sensors.

Still need: beefy motor, conveyor material (carpet?), dual ramp setup, 1-way gate

Day 7: Wednesday January 14th

Had a funky day, as most of the team members were busy with UROPs or meetings or other classes at some point or another. The rollers for our conveyor mechanism was finally completed. Much thanks to the LMP staff for not kicking our course 2 guy out for making a valiant effort at ruining one of the lathes during one of the cuts. Unfortunately, we discovered later at night that the rollers would have to be mounted much lower than we anticipated. This forces us to drive our conveyor with a motor mounted on the top of our robot, which was the very scenario that we wanted to avoid.

Also hit a couple of snags for encoding wheel rotations. We had hoped to cut slits directly into the wheels and use break-beam sensors for wheel encoding. However, due to some water jet limitations and the fact that the break-beam sensors we have are a tad smaller than needed, we might just break bank and purchase the custom encoders that fit directly onto our motors.

The coding team is super excited about implementing mouse sensors for mapping.

The mechanical team is super excited about our neato waterjet wheels and cutting random holes into slabs of wood to mount our conveyor rollers.

We're so different. It's a miracle we get along at all.


Day 8: Thursday January 15th

A pretty productive day today, it looks like our robot will be able to sport a pair of optical mice as we managed to get the mouse odometry code working pretty well. Our robot's body is also becoming more and more defined as our many custom-made, custom-measured parts continue to roll in fresh from the machine shop. Ideas for conveyor belt material and solutions to our encoder problem keep coming. Things are looking up!

Day 9: Friday January 16th

Mock competition today! Although we had made significant progress on our robot, due to unfortunate limited access to the waterjet and other cutting tools, we still do not have all the parts we need. Oh well...hopefully we can get them made soon. Today we decided to try and use the provided quadrature wheel encoders, just to see if they could be made to work. They couldn't. Just their assembly proved unbelievably frustrating. Soldering the tiny resistors and capacitors onto the board was a painstaking process and losing/finding components somewhere in the working area even more so. Even when we thought we were done, some weak bits of wire and loose connections forced us to continue to effort.

When the time for the mock competition came around...we realized it was time for the mock competition. We threw together some extremely basic wall following code and then set off to the arena. Amazingly, despite out robot comfortably finding a nice closed loop around which to forever continue going around in circles....we managed to acquire one ball in our robot's underside somewhere during its random meandering, giving our team 1 point!

Back in lab we marveled at our positive score and continued to discuss some strengths and weaknesses of our bot up until it was time to leave.

Day 10 Tuesday January 20th

Dinner, albeit delicious (mmmm Thai) and informative (chatting with sponsors), stood right in the way of our great working momentum.

Day 11 Wednesday January 21st

Surely something happened today. Something related to bot-building. Possibly debugging. More than likely cursing too.


Day 12 Thursday January 22nd

Today was yet another mock competition. Unfortunately, just an hour before the call time, our code was unable to be debugged. Our optical mice odometry, which had worked so well on hard surfaces, generated too much error on the carpet, and we did not have time to fix it up. We had to resort back to our basic wall following test code from before. Alas, when put on the carpet, our casters had been set too high and our nice geared wheels turned helplessly just above the carpet. We returned to the lab with new resolve. Back in lab, we accomplished much. We tuned out conveyor belt, remounted our casters and optical mice stands, mounted almost everything on the actual robot, and got our ball sorting mechanism working very well. Now we need to polish up the image processing code and mount the IR sensors so that our wall following code can be tuned correctly. We also ordered food. So all is well.

Day 13 Friday January 23rd

Everything was mounted today! Then we tested it...and found that the front casters were getting stuck on the carpet's notorious bumps and ridges. Unabashed, we removed said front casters to see what would happen. Our robot became front heavy...and tipped over. After many minutes of complaining and pondering, we grudgingly went to remount the driving wheels in a more suitable position. We surely hope this new design modification won't falter before the vicious playing field.

Day 14 Saturday 24th

Team member 1 went to see about a girl. Team member 2 studied for an 18.06 ASE. Team member 3 fled to an undisclosed location for a "meeting." This left team member 4, armed with a hot glue gun, to attach previously unattached components of the robot to prep for testing. All principles of 2.007 were thrown to the side as a hot/stick, adhesive liquid (hey, get your mind out of the gutter) replaced nuts/bolts as the preferred final solution. Hopes are still high that the bot will last through the competition. The battery placement is even higher, guaranteeing our team the illustrious glory of having the tallest robot.

Day 15 Sunday 25th

Chinese New Year. The more asian members of the team refused to work. The other two members, lost and confused, didn't know what to do with guidance from the Chinese.

Year of the Ox.

Day 16 Monday 26th

Last Mock Contest. Our robot still got caught on the carpet. Sweet.

One-way gate attached, new claws attached. Motors were fixed and re-fixed. Encoders finally arrived, so our code can actually work now!

We're cutting it really close here. Should be a ridiculous few days ahead before impounding.

Day 17 Tuesday 27th

We are resolved to make sure our robot is capable of doing something. Yes, anything. And with this in mind, we tuned up our robot. Repositioned some features to offer more precision in our measurements. Re-soldered some key components. And hot-glued everything else. Now we just gotta make sure our code is in good shape. Looks like we still have quite a lot of work to do in that respect. Hopefully our supply of charged batteries won't dwindle.

Day 18 Wednesday 28th

The big day. The day before impounding. The day during which the lab is open 24 hours. Awesome, we finally saw that our robot was capable of following a wall. We continued to be amazed by how it quietly sees then stalks a ball before finally 'pouncing' at it victoriously. Our conveyor motor stopped working...what?! We ended up learning a lot about what motors look like on the inside. Afterwards we assembled everything again, and it all seems to still be in working condition. We labored long through the hours of the night...and subsequent morning before finally calling it a night(morning?) at 4:30 am. It was cold. We were sleepy. And our robot was still a robot.

Day 19 Thursday 26th

Work up extra early today. Got to lab and commenced fixing things up once more. Hurriedly we tried to fine-tune the goal locating and positioning code. All the while making sure each different thread was capable of merging together in a more or less seamless fashion. Our robot is still big so it should have no problem storing any and all balls that happen to be eaten by it. The actual big day is tomorrow...we did all we could and let's hope for the best.

Personal tools