Showing posts with label robotics. Show all posts
Showing posts with label robotics. Show all posts
Unknown
There's a depressingly low amount of advice online on how to communicate with your iRobot Create robot on Mac OSX, so here's my tech tip of the day.

First there's connecting to your Create over bluetooth. This isn't too hard, simply open the Bluetooth Explorer, find the Create (it'll have a name like ElementSerial), pair and then connect. Easy. Of course, don't forget to plug the BAM bluetooth adapter into your Create and turn it on before.

Next there's the issue of sending commands. iRobot recommends that you use RealTerm, but unfortunately that's not an option for us Mac users. So I went through a series of free options. The one that I wanted to like the most was using the screen command in the terminal. Unfortunately, I could connect but I couldn't type and send commands once I was connected. This happened when I tried some other free programs too (including the every popular ZTerm), so that was a bust.

The key was trying Serial Bridge. Now this isn't a free program, and I really wanted a free program, but it had a 30 day trial, so I figured I'd try it out. It's actually a combination of Serial Bridge + Apple's Apple Script. This, after some configuration, worked out perfectly! As an added bonus, Apple Script is super easy.

  1. Download SerialBridge, fill out the form to get the code for a free trial, and Install. This is a dmg so it's pretty straightforward.
  2. Open SerialBridge and go to File to create a new connection. I just called mine New Connection.
  3. Make sure the settings are 57600 baud, 8 data bits, 1 stop bit, 0 flow. Save and you're now connected!
  4. Next I worked off one of the example files that came in SerialBridge. Just edit the byte list to one of the examples that come with your Create. For example, byte list = {128, 132, 139, 2, 0, 0} turns on the Play LED on the Create and turns off all the other LEDs. You can delete or comment out the rest of the file, comments are pairs of (* and *).
  5. Now, press the run button in the Apple Script editor. Success!
Once I got this working, this got me thinking that there must be a free way to send Apple Script files over a serial port connection. Do you know of any? I've fiddled around with a couple of stuff but nothing's worked so far.
Unknown
OK, this is just awesome, you can now have wifi on your Lego NXT Robot (found here). This is so cool, kind of how I imagined a 3rd party wifi sensor would be built too, clearly more work than I thought it would take [typical, I'm always underestimating].



So....can I buy one? I mean I love that you have such clear instructions, but I just want to buy one.

Edit: I just realised there's an update to the first post about the WifiBlock. Still looking to see if it's for sale.
Unknown
This video was part of my inspiration to pick up robotics as a hobby and ultimately as a career!



The music is so 90s!
Unknown
I'm finding an interesting application of operating systems to coding and debugging my little robot -- tentatively named HAL 0.

Interestingly, the NXT not only supports multithreading, it can have up to 255 threads. NXC (Not eXactly C) calls these threads tasks. We also have to deal with mutexes, which is necessary when you consider the consequences of having parallel threads all trying to control the motors.

My understanding thus far is that
(1) You always have a main task. This task is executed first, sets what sensors are connected to which ports, and can determine the order in which the other tasks are started.
(2) If you want task 2 to start after task 1, you can start it off with a Follows(task 1) command. I suspect, however, that this is part of the problem I'm having with switching mutexes between tasks. Unfortunately the StartTask command doesn't seem to work and since NXC is kinda like C, I can't use a StartTask(task 2) command in task 1 because task 2 hasn't been defined yet. Oh the joys of C.

In the course of writing this post, I've had a bit of an epiphany, so I may edit this post later today...
Unknown
My newest project is playing with LEGO's - every child's dream! Or at least mine. I find it really satisfying to come in every day and work with LEGO's. I want to properly document my progress, so I'll update this from time to time with little things I've figured out, videos, etc. For example, as soon as I find a satisfying way to use NXC on a Mac, it'll be here on this blog.

For now, here is a picture of my little robot - I-Bug. It is a differential drive robot with two touch sensors and a light sensor. I'm currently working on boundary following, and as soon as that's up and running, I'll do a video.


If any of you know of a good solution to NXC + Mac OS X, let me know!
Unknown
ICRA has begun and ended. Here are my highlights from the IEEE International Conference on Robotics and Automation, 2009. Located in Kobe, Japan, there were definitely perks to being able to present at this year’s ICRA.
IMG_915907Japan 002
07Japan 009 07Japan 006 IMG_9172IMG_9171