<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>toxicsoftware.com &#187; SpaceNavigator</title>
	<atom:link href="http://toxicsoftware.com/tag/spacenavigator/feed/" rel="self" type="application/rss+xml" />
	<link>http://toxicsoftware.com</link>
	<description>RANDOMIZE USR 0</description>
	<lastBuildDate>Sun, 01 Aug 2010 17:49:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SpaceNavigator controlled Lego Mindstorms NXT</title>
		<link>http://toxicsoftware.com/spacenavigatornxt/</link>
		<comments>http://toxicsoftware.com/spacenavigatornxt/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 02:50:04 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Lego]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Mindstorms]]></category>
		<category><![CDATA[NXT]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[SpaceNavigator]]></category>

		<guid isPermaLink="false">http://toxicsoftware.com/spacenavigatornxt/</guid>
		<description><![CDATA[It&#8217;s my second year of coaching a First Lego League team. The experience has been fantastic, I&#8217;m teaching 4th and 5th grade children about robots and computers, and teaching them to build and program their own robots. This year the &#8230; <a href="http://toxicsoftware.com/spacenavigatornxt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s my second year of coaching a <a href="http://www.firstlegoleague.org/">First Lego League</a> team. The experience has been fantastic, I&#8217;m teaching 4th and 5th grade children about robots and computers, and teaching them to build and program their own robots. This year the kids are going to be learning how to use the new <a href="http://www.amazon.com/gp/product/B000E4FDAE?ie=UTF8&amp;tag=toxicsoftware-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000E4FDAE">Lego Mindstorms NXT</a> robot; therefore I happen to have an NXT robot in the house. One of the cool features of the NXT is that it can communicate to a Mac (or even another NXT robot) via Bluetooth. So I thought it might be fun to take the <a href="http://www.amazon.com/gp/product/B000LB41BM?ie=UTF8&amp;tag=toxicsoftware-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000LB41BM">3Dconnexion SpaceNavigator</a> controller device I used in my <a href="/the-intersection-of-cool-and-awesome">previous blog post</a> and use it to control an NXT Robot. Here is the result:</p>

<p><a href="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorNXT.mp4"><img src="http://toxicsoftware.com/wordpress/uploads/spacenavigatornxtpreview.png" alt="SpaceNavigatorNXTPreview.png" border="0" width="320" height="248" /></a></p>

<p>Although the SpaceNavigator support six degrees of freedom, I&#8217;m only using two (Y axis for forwards/reverse and RZ for turning), that leaves plenty of room for expansion (perhaps hooking up a third motor to another controller axis).</p>

<p>Although the video doesn&#8217;t show it too well, the SpaceNavigator does allow for very fine grained control over the robot (as long as the robot has fresh batteries!). The controller is extremely sensitive and with practice the robot can be controlled quite delicately.</p>

<p>Currently only one axis is dominant at a time (that&#8217;s actually a preference in the SpaceController System Preferences screen) but it is be possible to control robot steering and speed/direction at the same time. I&#8217;ll be trying that out soon.</p>

<p>There doesn&#8217;t seem to be much in the way of Mac OS X APIs for controlling NXT via Bluetooth, so I&#8217;m putting my code onto my <a href="http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_743/Projects/NXTTest/">public subversion server</a> and releasing it (like everything else in my public repository) under the <a href="http://en.wikipedia.org/wiki/Bsd_license">BSD License</a>. The code is Leopard only (although all I&#8217;m using are some <a href="http://developer.apple.com/leopard/overview/tools.html">Objective-C 2.0</a> features, such as properties and the new for loop). The code uses Cocoa bindings/KVC and has a rather simple interface:</p>

<pre><code>robot = [[[CNXTRobot alloc] init] autorelease];
((CNXTMotor *)[robot.ports objectForKey:@"B"]).power = (int)(theMotor1 * 100.0);
((CNXTMotor *)[robot.ports objectForKey:@"C"]).power = (int)(theMotor2 * 100.0);
</code></pre>

<p>The sample NXT project relies on my <a href="http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_743/Frameworks/ToxicWarped/">ToxicWarped</a> framework. ToxicWarped was originally created for my <a href="/">Geode</a> project and is designed to help write simple but flexible Object Oriented protocol stacks.</p>

<p>The NXT code is barely a day old, so it is very rough and ready but I&#8217;ll be tinkering with the NXT and SpaceNavigator code over the next few weeks (in my spare time) but if anyone has a use for the code and would like to contribute back that would be fantastic.</p>

<p>Update: Couldn&#8217;t stand awful <a href="http://www.youtube.com/watch?v=H4zct49Dv6Y">Youtube</a> image quality any longer. Videos are now on amazon s3.</p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/spacenavigatornxt/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
<enclosure url="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorNXT.mp4" length="2233920" type="audio/mp4" />
<enclosure url="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorNXT/SpaceNavigatorNXT.mov" length="296" type="video/quicktime" />
		</item>
		<item>
		<title>The Intersection of Cool and Awesome</title>
		<link>http://toxicsoftware.com/the-intersection-of-cool-and-awesome/</link>
		<comments>http://toxicsoftware.com/the-intersection-of-cool-and-awesome/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 17:37:24 +0000</pubDate>
		<dc:creator>schwa</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[3Dconnexion]]></category>
		<category><![CDATA[Acorn]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Flying Meat]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[SpaceNavigator]]></category>

		<guid isPermaLink="false">http://toxicsoftware.com/the-intersection-of-cool-and-awesome/</guid>
		<description><![CDATA[3Dconnexion (a division of Logitech) produces the coolest named device ever: The 3Dconnexion SpaceNavigator . This is a 3D input device with 6 degrees of freedom, meaning you can move and rotate it through the X, Y and Z planes. &#8230; <a href="http://toxicsoftware.com/the-intersection-of-cool-and-awesome/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.3dconnexion.com/">3Dconnexion</a> (a division of <a href="http://logitech.com/">Logitech</a>) produces the coolest named device ever: The <a href="http://www.amazon.com/gp/product/B000LB41BM?ie=UTF8&amp;tag=toxicsoftware-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000LB41BM">3Dconnexion SpaceNavigator</a>
. This is a 3D input device with <a href="http://en.wikipedia.org/wiki/6_Degrees_Of_Freedom">6 degrees of freedom</a>, meaning you can move and rotate it through the X, Y and Z planes. I bought it originally on a whim (hey only 50 bucks!) for use with <a href="http://sketchup.google.com/">Google Sketchup</a> and <a href="http://earth.google.com/">Google Earth</a>. It took about twenty minutes to get competent with the device and I was soon whizzing around Manhattan inside Google Earth. The device is designed to use in your off hand with a mouse in your primary hand. This gives you a fantastic level of control in 3D applications.</p>

<p><img src="http://toxicsoftware.com/wordpress/uploads/3dx-spacenavigator.jpg" alt="3dx_spacenavigator.jpg" border="0" width="207" height="208" /></p>

<p>The software that comes with the SpaceNavigator is functional, but like a lot of hardware related software is rough around the edges. You can provide customised settings for specific applications or use global settings. You can set up macros to fire when either of the SpaceNavigator&#8217;s two buttons are pressed. Understandibly the SpaceNavigator will not appear to applications as a standard input device, so 3Dconnexion provide an <a href="http://www.3dconnexion.com/docs/3DxMacWareSDK.dmg">API</a> to allow 3rd party developers to use the device. This opens up a host of opportunities for 3rd party developers. The Space Navigator could be used in third-party applications as a jog wheel, kind of like the <a href="http://www.griffintechnology.com/products/powermate/">Griffin Powermate</a> and also as a 2D scroll wheel at the same time.</p>

<p>This leads me onto <a href="http://flyingmeat.com/acorn/">Acorn</a>, Acorn is <a href="http://gusmueller.com/">Gus Mueller&#8217;s</a> newest application. It is an awesome 2D image editor, with a healthy list of features. I consider it to be a &#8220;Photoshop for the rest of us&#8221;, and has quickly become my image editor of choice. Like Gus&#8217; <a href="http://www.flyingmeat.com/voodoopad/">VoodooPad</a>, Acorn also supports a <a href="http://flyingmeat.com/acorn/plugin.shtml">plug-in architecture</a>. This allow developers to extend the applications in ways Gus wouldn&#8217;t have dreamt of (although considering Gus wrote FlyGesture I&#8217;m sure he has some pretty funky dreams). I&#8217;ve created a plug-in for Acorn that uses the SpaceNavigator API to zoom and scroll around the image you&#8217;re editing. Rotating the SpaceNavigator causes the image to rotate (using the CoreImage affine transformation filter). This just touches the surface of the cool things you can do with the SpaceNavigator and an application that supports plug-ins.</p>

<p>Now for the money shots, two movies of the plug-in in action:</p>

<p><a href="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorAcorn.mp4"><img src="http://toxicsoftware.com/wordpress//uploads/spacenabvigatoracornpreview.png" alt="SpaceNabvigatorAcornPreview.png" border="0" width="293" height="248" /></a></p>

<p><a href="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorAcorn2.mp4"><img src="http://toxicsoftware.com/wordpress//uploads/spacenabvigatoracorn2preview.png" alt="SpaceNabvigatorAcorn2Preview.png" border="0" width="277" height="248" /></a></p>

<p>Source code for the plug-in is on my Google public repository <a href="http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_743/Projects/Acorn/AcornSpaceNavigator/">link</a>, I&#8217;ve also written a Cocoa wrapper for the 3Dconnextion API (required by the Acorn plug-in): <a href="http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_743/Projects/SpaceControllerTest/">link</a>. My Cocoa wrapper provides a much simpler interface to the device, and also provides more functionality (such as emulating a scroll wheel). I&#8217;ll be working on the wrapper more in the future.</p>

<p>All this code is a work in progress and you will probably need to massage the Xcode project to get it to compile. You&#8217;ll also need the 3Dconnexion API (and of course a SpaceController).</p>

<p>And hey look &#8211; I&#8217;m blogging again!</p>

<hr />

<p>Update: I got daringfireballed, so I&#8217;ve moved the movies onto youtube &#8211; quality sucks, but now the server seems responsive again. Links to source code fixed.</p>

<hr />

<p>Update: Movies now on Amazon S3. Youtube quality sucks so much. (videos still on Youtube <a href="http://www.youtube.com/watch?v=mad0UJOlo9Y">here</a> and <a href="http://www.youtube.com/watch?v=SQKb4qM3D5U">here</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://toxicsoftware.com/the-intersection-of-cool-and-awesome/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
<enclosure url="http://toxicsoftware.com/wordpress/uploads/SpaceNavigatorAcorn.mp4" length="2489441" type="video/mp4" />
<enclosure url="http://toxicsoftware.com/wordpress/uploads/SpaceNavigatorAcorn2.mp4" length="870846" type="video/mp4" />
<enclosure url="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorAcorn.mp4" length="2489441" type="audio/mp4" />
<enclosure url="http://s3.amazonaws.com/uploads.toxicsoftware.com/SpaceNavigatorAcorn2.mp4" length="870846" type="audio/mp4" />
		</item>
	</channel>
</rss>
