Posts tagged ‘first robotics’

How exciting!

Today’s vision meeting totally made my day. Now that the batteries are fully charged, we can proceed: the camera works, it works beautifully, and it works simply. We got it to work with the software that FIRST gave us. We got it to work with the software developed at CMU. We got it to work with a Python script David and I wrote last week. Kick ass! We got it to move the servos, capture images, track different colors around the image, and move the servos to center the camera on a swath of color. The next step, I feel, is to get the robot’s processor to interface with the camera and do all of this (we’re currently doing it from a desktop computer). The cool thing is that the hard part of this has already been solved by this awesome dude online; we just need to look through the code and figure out how he interfaces with the TTL stuff, and we should be good to go.

Some of the robotics kids have expressed interest in learning to program the processor on the robot but have no prior programming experience. Consequently, today I held a meeting about learning C (the only language with a compiler for our processor). If you think Mudd was like drinking from a firehose, you got nothing on me. In 2 hours, I attempted to teach three kids and a mom nearly all of C. We covered

  • compiling code before running it
  • basic syntax: semicolons, curly braces, and their ilk
  • built-in types: int, bool, char, short, long, unsigned
  • variables, and declaring and defining them
  • if statements, and for and while loops
  • boolean logic: && || ! == etc.
  • creating functions, including arguments and returning values
  • header files and the actual .c files
  • scoping
  • precompiler commands like #include and #define
  • structs, though we only covered these briefly
  • pointers, including pointers to pointers, dangling pointers, and the array/pointer duality (again, kinda briefly, except their utility in affecting things outside the current scope)
  • cout and cin, though again only briefly (not really necessary for programming a robot that lacks both of these)
  • compiler errors
  • other odds and ends that were mentioned in the sample robot drivers (extern, static, and other keywords like that)

We’ll see how much of this actually stuck, but at the time the kids seemed to understand a lot of the stuff we covered.

Looking back on it, it took me months to get the hang of all of this! Though to be fair, I was supposed to be learning this stuff and applying it to tricky situations (creating my own hash tables, memory allocators, etc) at the same time.

Protected: Boo, Bureaucracy!

This content is password protected. To view it please enter your password below:

Mac, eat your heart out!

Behold! It turns out that if you start with the proper background knowledge, this sort of thing is trivial, but no one seems to know where to begin learning about stuff like this.

Also, I’m going to be mentoring a high school robotics team this summer! Whee! I’m apparently going to be doing stuff on the software/vision side of things. They have really nice equipment, including a CMUCam2. It turns out that a $30,000 budget can buy a lot of neat toys.