<?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>eclecticc &#187; spacepoint fusion</title>
	<atom:link href="http://eclecti.cc/tag/spacepoint-fusion/feed" rel="self" type="application/rss+xml" />
	<link>http://eclecti.cc</link>
	<description></description>
	<lastBuildDate>Sun, 20 May 2012 14:28:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Projecting Virtual Reality with a Microvision SHOWWX</title>
		<link>http://eclecti.cc/videogames/projecting-virtual-reality-with-a-microvision-showwx</link>
		<comments>http://eclecti.cc/videogames/projecting-virtual-reality-with-a-microvision-showwx#comments</comments>
		<pubDate>Sun, 09 May 2010 09:27:25 +0000</pubDate>
		<dc:creator>nrp</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[microvision]]></category>
		<category><![CDATA[projector]]></category>
		<category><![CDATA[showwx]]></category>
		<category><![CDATA[spacepoint fusion]]></category>
		<category><![CDATA[virtual reality]]></category>
		<category><![CDATA[wiimote]]></category>

		<guid isPermaLink="false">http://eclecti.cc/?p=551</guid>
		<description><![CDATA[http://www.youtube.com/watch?v=OvfT3TX_tn0 It&#8217;s bit of a stretch to call this Virtual Reality, in capitals no less, but I can&#8217;t think of another noun that fits it better.  This is the idea I have been hinting about, sprouted into a proof of concept.  By combining the stable positioning of the SpacePoint Fusion with the always in focus [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.youtube.com/watch?v=OvfT3TX_tn0&#038;fmt=18">http://www.youtube.com/watch?v=OvfT3TX_tn0</a></p>
<p><a href="http://www.youtube.com/watch?v=OvfT3TX_tn0&#038;fmt=18"><img src="http://img.youtube.com/vi/OvfT3TX_tn0/default.jpg" width="130" height="97" border=0></a></p>
<p>It&#8217;s bit of a stretch to call this Virtual Reality, in capitals no less, but I can&#8217;t think of another noun that fits it better.  This is the idea I have been hinting about, sprouted into a proof of concept.  By combining the stable positioning of the <a href="http://eclecti.cc/hardware/easy-absolute-orientation-pni-spacepoint-fusion-in-python">SpacePoint Fusion</a> with the always in focus <a href="http://eclecti.cc/computergraphics/evil-eye-microvision-showwx-as-a-face-tracking-eyeball">Microvision SHOWWX</a> picoprojector, one can create a pretty convincing glasses-free virtual reality setup in any smallish dark room, like the bedroom in my Bay Area apartment.</p>
<p><a href="http://eclecti.cc/files/2010/05/projecting.jpg"><img class="aligncenter size-large wp-image-566" title="Unfortunately shallow depth of field.  I couldn't hold the thing still enough to use a saner f-stop while getting a long enough exposure to see the projected image." src="http://eclecti.cc/files/2010/05/projecting-700x466.jpg" alt="Projecting Virtual Reality" width="700" height="466" /></a></p>
<p>This setup uses the SpacePoint to control the yaw, pitch, and roll of the camera, letting you look and aim around the virtual environment that is projected around you.  A Wii Remote and Nunchuk provide a joystick for movement and buttons for firing, jumping, and switching weapons.  All of the items are mounted to a Wii Zapper.  For now, it is annoyingly all wired to a laptop I carried around in a backpack.  Eventually, I&#8217;m planning on using a <a href="http://beagleboard.org">BeagleBoard</a> and making the whole projector/computer/controller/gun setup self-contained.</p>
<p>The software is a hacked version of <a href="http://cubeengine.com/cube.php4">Cube</a>, a lightweight open source first person shooter.  It&#8217;s no Crysis 2, but it runs well on Mesa on integrated graphics, and it&#8217;s a lot easier to modify for this purpose than Quake 3.  Input is via <a href="http://libhid.alioth.debian.org/">libhid</a> for the SpacePoint and <a href="http://abstrakraft.org/cwiid/">CWiid</a> for the Wiimote.  All in all, it actually works pretty well.  The narrow field of view and immersiveness (a word, despite what my dictionary claims) makes playing an FPS quite a bit scarier for those who are easily spooked, like yours truly.  There is some serious potential in the horror/zombie/velociraptor genres for a device like this, if anyone is interested in designing a game.</p>
<p>This is just the start, of course.  I know I say that a lot, and there are about a dozen projects on this blog I&#8217;ve abandoned, but I think this one will hold my attention for a while.  I hate showing off anything without source code, so even though it will likely not be useful to anyone, I&#8217;ve attached the patch against the <a href="http://sourceforge.net/projects/cube/files/cube/2005_08_29/cube_2005_08_29_src.zip/download">final release of Cube</a>.</p>
<p><strong>Download:<br />
<a href="http://eclecti.cc/files/2010/05/projecting.diff">projecting.diff</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://eclecti.cc/videogames/projecting-virtual-reality-with-a-microvision-showwx/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Easy Absolute Orientation: PNI SpacePoint Fusion in Python</title>
		<link>http://eclecti.cc/hardware/easy-absolute-orientation-pni-spacepoint-fusion-in-python</link>
		<comments>http://eclecti.cc/hardware/easy-absolute-orientation-pni-spacepoint-fusion-in-python#comments</comments>
		<pubDate>Mon, 01 Feb 2010 08:42:21 +0000</pubDate>
		<dc:creator>nrp</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[accelerometer]]></category>
		<category><![CDATA[imu]]></category>
		<category><![CDATA[magnetometer]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[spacepoint fusion]]></category>

		<guid isPermaLink="false">http://eclecti.cc/?p=414</guid>
		<description><![CDATA[My college roommate Donnie mentioned the PNI SpacePoint Fusion in comments of the HMC5843 post, and it seemed too good to be true.  A 9 DOF controller (3 axes each of magnetometer, accelerometer, and gyro) with a Kalman filter to calculate a smooth quaternion that interfaces as a USB HID device, all for under $100.  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://eclecti.cc/files/2010/01/spacepoint.jpg"><img class="alignnone size-large wp-image-439" title="That is the cel shading tutorial from Panda3D, with the character quaternion set by the SpacePoint Fusion." src="http://eclecti.cc/files/2010/01/spacepoint-700x525.jpg" alt="SpacePoint Fusion" width="700" height="525" /></a></p>
<p>My college roommate Donnie mentioned the <a href="http://www.pnicorp.com/products/all/spacepoint-fusion">PNI SpacePoint Fusion</a> in comments of the <a href="http://eclecti.cc/hardware/hmc5843-magnetometer-library-for-arduino">HMC5843 post</a>, and it seemed too good to be true.  A 9 DOF controller (3 axes each of magnetometer, accelerometer, and gyro) with a <a href="http://en.wikipedia.org/wiki/Kalman_filter">Kalman filter</a> to calculate a smooth quaternion that interfaces as a USB HID device, all for under $100.  I&#8217;d be surprised if PNI is making any profit on it.  I sound more like a shill than I&#8217;m normally comfortable with, but I&#8217;m truly impressed with this gadget.  I have some plans for it involving a <a href="http://www.microvision.com/showwx/">Microvision SHOWWX</a> that I&#8217;m quite excited about; I&#8217;ll write more on that when it&#8217;s available in a couple of months.</p>
<p><a href="http://eclecti.cc/files/2010/01/innards.jpg"><img class="alignnone size-large wp-image-442" title="There's a mini usb port inside too, how convenient!" src="http://eclecti.cc/files/2010/01/innards-700x525.jpg" alt="SpacePoint Fusion Innards" width="700" height="525" /></a></p>
<p>PNI provides some Windows only <a href="http://www.pnicorp.com/support/downloads/spacepoint-fusion">sample apps</a> that show off how weirdly stable and precise the SpacePoint Fusion is.  Luckily, since it&#8217;s a normal USB HID device (redundant, I know), and PNI provides <a href="http://www.pnicorp.com/files/SpacePoint%20Fusion%20Game%20Pad%20Application%20Note.pdf">application notes</a>, it&#8217;s easy to use on any platform.  I wrote a Python module that uses <a href="http://libhid.alioth.debian.org/">libhid</a> via python-hid to make it easy to prototype with in Linux.  The usage is pretty simple, as shown below.  Note that when plugging the device in, you need to keep it still for a few seconds while the gyros are calibrated.  After that, the quaternion, accelerometer, and button data can be updated 62.5 times a second.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">import</span> spacepoint
<span style="color: #66cc66;">&gt;&gt;&gt;</span> fusion = spacepoint.<span style="color: black;">SpacePoint</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #dc143c;">repr</span><span style="color: black;">&#40;</span>fusion.<span style="color: black;">quat</span><span style="color: black;">&#41;</span>
<span style="color: black;">&#40;</span><span style="color: #ff4500;">0.987518310546875</span>, -<span style="color: #ff4500;">0.04425048828125</span>, -<span style="color: #ff4500;">0.04119873046875</span>, <span style="color: #ff4500;">0.145294189453125</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #dc143c;">repr</span><span style="color: black;">&#40;</span>fusion.<span style="color: black;">accel</span><span style="color: black;">&#41;</span>
<span style="color: black;">&#40;</span>-<span style="color: #ff4500;">0.054016113354999999</span>, <span style="color: #ff4500;">0.018859863306999999</span>, -<span style="color: #ff4500;">0.89648437622400001</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #dc143c;">repr</span><span style="color: black;">&#40;</span>fusion.<span style="color: black;">buttons</span><span style="color: black;">&#41;</span>
<span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> fusion.<span style="color: black;">update</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #dc143c;">repr</span><span style="color: black;">&#40;</span>fusion<span style="color: black;">&#41;</span>
accel: <span style="color: black;">&#40;</span>-<span style="color: #ff4500;">0.054016113354999999</span>, <span style="color: #ff4500;">0.018859863306999999</span>, -<span style="color: #ff4500;">0.89648437622400001</span><span style="color: black;">&#41;</span>
 quat: <span style="color: black;">&#40;</span><span style="color: #ff4500;">0.97186279296875</span>, -<span style="color: #ff4500;">0.233428955078125</span>, -<span style="color: #ff4500;">0.030548095703125</span>, <span style="color: #ff4500;">0.005401611328125</span><span style="color: black;">&#41;</span>
 buttons: <span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span></pre></div></div>

<p><strong>Update on February 7, 2010:</strong> I emailed PNI about a bug in the firmware, and got the following response:</p>
<blockquote><p>Thank you for submitting the SpacePoint bug regarding libusb, Python, and Linux.  You&#8217;re right!  There is a bug in the SpacePoint FW that prevented opening interface 1 without opening interface 0 when using libusb under Linux.  While your work around was effective in allowing the device to operate normally, one should be able to open interface 1 directly without the work around.  We were able to use your Python source code to quickly diagnose and repair the bug.  Please see the attached for the modified Python script.  Please feel free to post this paragraph, the modified code, and all bragging rights on your blog (http://eclecti.cc/).</p></blockquote>
<p>Units being shipped now have the fix.  I modified the Python module to handle units both with and without the firmware fix and bumped the version to 0.2.</p>
<p><strong>Download:<a href="http://eclecti.cc/files/2010/02/spacepoint-0.2.tar.gz"><br />
SpacePoint Python Module</a></strong> or<br />
Standalone <strong><a href="http://eclecti.cc/files/2010/01/spacepoint.py">spacepoint.py</a></strong></p>
<h3>Setting udev rules to get the permissions right</h3>
<p>In most cases, the module will just work properly.  However, if you get the following error, you probably don&#8217;t have the right permissions to access the usb device.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">import</span> spacepoint
<span style="color: #66cc66;">&gt;&gt;&gt;</span> fusion = spacepoint.<span style="color: black;">SpacePoint</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
hid_force_open failed <span style="color: #ff7700;font-weight:bold;">with</span> <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">code</span> <span style="color: #ff4500;">12</span>.</pre></div></div>

<p>On most modern Linux distros, you can fix this by setting a <a href="http://reactivated.net/writing_udev_rules.html">udev rule</a> for the device.  In Ubuntu Karmic Koala, saving the following as <code>/etc/udev/rules.d/45-spacepoint.rules</code> , running <code>sudo service udev restart</code> , and then unplugging and replugging in the device should fix it:</p>

<div class="wp_syntax"><div class="code"><pre class="cmake" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># PNI SpacePoint Fusion</span>
SYSFS{idVendor}==<span style="color: #912f11;">&quot;20ff&quot;</span>, SYSFS{idProduct}==<span style="color: #912f11;">&quot;0100&quot;</span>, MODE=<span style="color: #912f11;">&quot;0664&quot;</span>, GROUP=<span style="color: #912f11;">&quot;admin&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://eclecti.cc/hardware/easy-absolute-orientation-pni-spacepoint-fusion-in-python/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.318 seconds -->

