Trackmate :: Portable Plexi Cliffhanger

19,821

74

37

Posted

Introduction: Trackmate :: Portable Plexi Cliffhanger

The Portable Plexi Cliffhanger is one of the most simple, cheap, and portable Trackmate systems. It can be setup in under 5 minutes, costs less than $40 (plus a webcam), and fits easily in an over-the-shoulder bag.

Trackmate is an open source initiative to create an inexpensive, do-it-yourself tangible tracking system. Using the project's Tracker software, any computer can recognize tagged objects and their corresponding position, rotation, and color information when placed on the imaging surface.

Using a system like the one shown here, you can track physical objects on a surface and use them to control and manipulate spatial applications on your computer. Since objects are each uniquely tagged, they can easily be mapped to particular actions, information, or relationships. See the LusidOSC project for more details about spatial applications.




Step 1: Gather All the Parts

You will need:
- a 12 inch x 12 inch x 1/4 inch clear acrylic or plexi sheet (often sold as a table protector)
- two 2 inch C clamps
- two thin adhesive-backed rubber feet (in a pinch, just use a few pieces of tape)
- a clamp light (found in most hardware stores)
- a 13W (60W equivalent) compact fluorescent bulb
- a mini camera tripod (found in camera stores, or online)

And finally, you need a webcam. I recommend the PS3 Eye since it is a very nice camera for the price (~$33) and there are now drivers for Windows and Mac. But any decent quality webcam that allows manual functionality (i.e., exposure control and focus) should work with this setup.

You can find most of the parts at your local hardware store (and save the cost/time of ordering online). The parts are also available via Amazon.com; here is an amazon.com list to help you find everything you need.

Step 2: Modify Some Things

Add two rubber feet to both C clamps. This keeps the clamp from making marks on the table and helps it to grip the plexiglass sheet better.

Optionally, you can make the top side of the acrylic sheet frosted by sanding is lightly with fine sandpaper. This helps to diffuse light and makes the surface feel a little less-grippy (this can be nicer for sliding objects on top).

Step 3: Set It Up

Everything is packed up in an over-the-shoulder bag. The first couple images show all the contents together (including a laptop).

Pull out the acrylic sheet (if frosted, make sure the frosted side is facing up) and the C clamps.

Clamp the sheet to the table with about 2-3 inches of overlap to ensure a solid mount.

Place the clamp-light to the bottom of one of the C clamps under the table. Always be careful with where the light is mounted as a hot bulb next to paper, fabric, the table, etc. can start a fire. Using a low-wattage fluorescent bulb makes things a lot safer, but still be careful.

Setup the tripod under the table. Place the webcam on top of the tripod pointed up towards the overhanging plexiglass (the camera should be as close as possible while still being able view all of the illuminated area). Try to align the camera square with the table.

Mounting the camera to the tripod can be a bit tricky. Experiment with different brackets and clamps. I found that a simple twist-tie holding the camera's cord tightly worked as a strong-enough mount for the PS3 Eye camera (although a custom bracket would be even better).

Step 4: Start Tracking!

Once you have all of the hardware setup, run the Trackmate Tracker and place one of the Trackmate layout guides on the surface. The layout guides make it easy to quickly configure the Tracker and make sure the entire surface is being read correctly.

For a complete walkthrough showing how to setup the Tracker software, see the Cliffhanger Walkthrough on the Trackmate wiki.

Your Portable Plexi Cliffhanger is now ready to use. Plug in the camera and get started with Trackmate!

Share

    Recommendations

    • Science of Cooking

      Science of Cooking
    • Microcontroller Contest

      Microcontroller Contest
    • Spotless Contest

      Spotless Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    37 Comments

    hi, can it be connected to parallel port?

    okay does the glass have to be frosted to a certain degree? cause i have a very frosted glass desk and a sheet of not at all frosted glass from an aquarium would either of these surfaces work??

    If the thickness of the frost is thin, such as a lightly sanded surface, it should work just fine. The important thing is to make sure the surface is only frosted on one side and that the frosted side is up (making the distance between the tags and the frosted layer should be as close to zero as possible).

    Well I'm excited by this and made some good progress today.

    First I installed the "macam" drivers (download and copied the library into "/Library/Quicktime" and then ran the accompanying application and 'viola the webcam was working great!

    Then I printed Trackmate tags and started up trackmate and it found the right camera no problem!

    After the calibration (great walkthrough by the way) I was able to cut up some of the tags from one of the other scaling templates and it was tracking!! One comment on the tag generation is that I generated a tag file (with just 4) and they're like 4" in diameter! Would be nice if the program could scale them for you. (Actually, since the "tags" were too big I cut up some of the tags from the 3x3 scaling sheet).

    I'd looked around like crazy to figure out how to read the lucidOSC data and finally realized that on Trackmate it prints "OSC output on: localhost 3333" ... I don't know if there's a way to change this but that would be nice.

    But at first I was still confused because I didn't realize it was UDP (yay netcat) and then I was still confused because I kept trying to connect to that addy & port and wasn't getting anything.

    Eventually it dawned on me to _LISTEN_ and then I saw data packets flying! YAY!

    Now for the 'bad' news, I was completely unable to find the "LusidOSC_BasicApp.pde" processing app that's mentioned a few times but from the readme that came with the LusidOSC processing bundle I quickly put this one together:

    import lusidOSC.*;
    LusidClient lusidClient;

    void setup() {
    lusidClient = new LusidClient(this);
    }

    // called when an object is moved
    void updateLusidObject (LusidObject lObj) {
    println("update object: "+lObj.getUniqueID());
    println(" location = ("+lObj.getX()+","+lObj.getY()+","+lObj.getZ()+")");
    println(" rotation = ("+lObj.getRotX()+","+lObj.getRotY()+","+lObj.getRotZ()+")");
    println(" data = ("+lObj.getEncoding()+","+lObj.getData()+")");
    }

    void addLusidObject(LusidObject lObj) {
    println("add object: "+lObj.getUniqueID());
    println(" location = ("+lObj.getX()+","+lObj.getY()+","+lObj.getZ()+")");
    println(" rotation = ("+lObj.getRotX()+","+lObj.getRotY()+","+lObj.getRotZ()+")");
    println(" data = ("+lObj.getEncoding()+","+lObj.getData()+")");
    }

    // called when an object is removed from the scene
    void removeLusidObject(LusidObject lObj) {
    println("remove object: "+lObj.getUniqueID());
    }

    When I run it, I start to get data like:

    LusidOSC :: Version 1.0 :: Feb. 2, 2009
    LusidOSC :: listening for messages on port 3333
    add object: 0x1FBF763F7BFA
    location = (28,28,0)
    rotation = (0.0,0.0,0.017453292)
    data = (trackmate,0xFFFFFF,0xFFFFFF,0xFFFFEF,0xFFFFE8,0xF7F4EE,0x6D5F47)
    add object: 0x018101810101
    location = (-31,30,0)
    rotation = (0.0,0.0,4.6774826)
    data = (trackmate,0xFFFFFF,0xFFFFE7,0xFFFFD7,0xFFFFFC,0xFFFFFF,0x242216)

    But then no matter how much I move the tags around or add / remove objects from the field I don't get any further output.

    The protocol also seems to be very chatty... even with nothing on the plexi I got lots of packets like this:

    live#bundle(/lusid/1.0,siiifseq>K/lusid/1.0,salive#bundle(/lusid/1.0,siiifseq?K??/lusid/1.0,salive#bundle(/lusid/1.0,siiifseq@K?8/lusid/1.0,salive#bundle(/lusid/1.0,siiifseqAK??/lusid/1.0,salive#bundle(/lusid/1.0,siiifseqBKb?/lusid/1.0,salive#bundle(/lusid/1.0,siiifseqCK y?/lusid/1.0,salive#bundle(/lusid/1.0,siiifseqDK

    Easily more then 1 a second.

    Regardless I'm super excited to have gotten this far so quickly, so (a) thanks and (b) any help would be much appreciated!

    Thanks for the detailed reply! I'm glad to hear you got things up and working.

    I just downloaded the LusidOSC Processing Bundle, and when you decompress the .tar.gz file, it should contain folders for 9 different LusidOSC example applications (one of which is the LusidOSC_BasicApp; that's strange that you didn't have it). The full bundle can be downloaded from here:
    http://lusidosc.svn.sourceforge.net/viewvc/lusidosc/src/LusidOSCSpatialApps/LusidOSCProcessingBundle.tar.gz?view=tar

    LusidOSC is a protocol layer on top of OSC (open sound control), which is a thin layer on top of UDP. The LusidOSC protocol specifies that each frame data is sent over OSC that describes the time, frame number, and each object present (with ID, position, rotation, meta data, etc.). Even though it may look chatty when printing the output, the total number of bytes is very small, especially for the capabilities of UDP.

    I'm not sure what is causing Processing to not correctly see your tags. It's calling the "addLusidObject()" method, which is a very good sign, but I'm not entirely sure why things are not being updated after that. Make sure there is not a conflict on the port you are using (for example, don't have the LusidOSC simulator open at the same time as the Trackmate Tracker, or they will both be trying to push data to the same location).

    You can change the LusidOSC HOST and PORT configuration (just added to version 09.06) manually in the setting.txt file. On Mac, this file can be located if you Ctrl+Click on the application and select "Show Package Contents". Then goto the subdirectory "Contents", then "Resources" and there you should find setting.txt (if you don't see it, try saving your setting once in the Tracker application by pressing {!}, the exclamation point).

    As you can probably guess, the setting.txt file is a simple plaintext file that contains saved configuration variables (such as thresholds, size information, etc.). Toward the end, you should see two lines that say "localhost" and "3333" you can change those if you want to send the data somewhere else (to another machine across the network by IP address) or on a different port. Just save the file and restart the Tracker to have your settings take effect.

    Hope that helps. Happy hacking!

    also, make sure you print tags out such that they are all 1x1inch in size. When the tags are created, you can select the DPI (dots per inch) and you'll want to make sure you print them at the same resolution. Most image printing applications scale the image to fit the page (which can give HUGE tags), so play with your settings a bit.

    I'll look into getting the Tagger to allow for saving directly as a PDF, since that file format carries with it scale information and would help to ensure proper sizing.

    Some additional details about Trackmate tags can be found on the wiki:
    http://trackmate.wiki.sourceforge.net/Trackmate+Tagger

    Yea, I think the PDF format might be good. I was using Seashore on the mac to rescale the tags but my printer ran out of ink @ an inopportune time so that's why I cut up some from the 3x3 baseline instead. Thanks not only for the SW but for being so responsive, beyond software that works and an open protocol that's the most exciting thing for me! :D

    Nice, that was quick! I showed this off to a friend of mine and he was impressed at how quickly it setup (though I'm still learning how to align the camera) and that the demos actually worked / integrated so smoothly!!! His next question was "how do we make a table for this" and I had to explain that it looks like it's somewhat limited in size right now, based on the field of vision / clarity of one webcam. So you may want to think about stitching multiple cameras together cause a full tabletop implementation sounds awesome!

    I agree that a larger tracked spaced would be really nice. Stitching cameras is a great idea, although I think it would add a lot of overhead for building a Trackmate system. The main focus is currently for smaller tabletops that work alongside a user's computer, but there's no reason it couldn't be scaled up with some additional software and hardware! If you give it a try, let us know how it goes.