<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>nxt &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/nxt/</link>
	<description>Feed of posts on WordPress.com tagged "nxt"</description>
	<pubDate>Mon, 28 Dec 2009 11:27:49 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[RoboHand Prototype]]></title>
<link>http://emebler.wordpress.com/2009/12/21/robohand-prototype/</link>
<pubDate>Mon, 21 Dec 2009 23:36:16 +0000</pubDate>
<dc:creator>emebler</dc:creator>
<guid>http://emebler.wordpress.com/2009/12/21/robohand-prototype/</guid>
<description><![CDATA[This is a video of my RoboHand Prototype.  The RoboHand series is literally built on the fact that m]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is a video of my RoboHand Prototype.  The RoboHand series is literally built on the fact that my brother has only one hand (perfectly normal, no sharks or amputations involved).  The RoboHand is an NXT machine that slips onto his arm and in a way replaces his missing hand.  It isn&#8217;t perminant, but it&#8217;s interesting to work on just the same.  Not many people are able to &#8220;experiment&#8221; on their brothers <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   <span id='plh-loop-video-embed-0' class='hidden'>done</span><ins style='text-decoration:none;'>
<div class='video-player' id='x-video-0'>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="266" id="video-0" standby="NXT RoboHand Prototype">
  <param name="movie" value="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" />
  <param name="quality" value="best" />
  <param name="seamlesstabbing" value="true" />
  <param name="allowfullscreen" value="true" />
  <param name="allowscriptaccess" value="always" />
  <param name="overstretch" value="true" />
  <param name="flashvars" value="guid=LJouvEmT&amp;javascriptid=video-0&amp;width=400&amp;height=266&amp;locksize=no" />
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" data="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" width="400" height="266" standby="NXT RoboHand Prototype">
    <param name="quality" value="best" />
    <param name="seamlesstabbing" value="true" />
    <param name="allowfullscreen" value="true" />
    <param name="allowscriptaccess" value="always" />
    <param name="overstretch" value="true" />
    <param name="flashvars" value="guid=LJouvEmT&amp;javascriptid=video-0&amp;width=400&amp;height=266&amp;locksize=no" />
  <!--<![endif]-->
  <img alt="NXT RoboHand Prototype" src="http://cdn.videos.wordpress.com/LJouvEmT/robohandfirstgenvideo_std.original.jpg" width="400" height="266" /><p><strong>NXT RoboHand Prototype</strong></p><p>This movie requires <a rel="nofollow" href="http://www.adobe.com/go/getflashplayer">Adobe Flash</a> for playback.</p>
  <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object></div></ins></p>
<p style="text-align:center;">no brothers were harmed in the making of this film</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Building the NXT]]></title>
<link>http://thelegogroup.wordpress.com/2009/12/20/building-the-nxt/</link>
<pubDate>Sun, 20 Dec 2009 18:21:42 +0000</pubDate>
<dc:creator>alexiskrysten</dc:creator>
<guid>http://thelegogroup.wordpress.com/2009/12/20/building-the-nxt/</guid>
<description><![CDATA[        Lego Mindstorm NXT is a programmable robotic. The brain of the robotic is a brick-shaped com]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3 style="text-align:left;"> <a href="http://thelegogroup.wordpress.com/files/2009/12/building-1.jpg"></a>      <span style="color:#339966;"> Lego Mindstorm NXT</span> is a programmable robotic. The brain of the robotic is a brick-shaped computer called the NXT Intelligent Brick. All of our programs are downloaded from the computer and compiled in the brick.</h3>
<p style="text-align:center;"><a href="http://thelegogroup.wordpress.com/files/2009/12/the-brick.jpg"><img class="aligncenter size-full wp-image-13" title="NXT Intelligent Brick " src="http://thelegogroup.wordpress.com/files/2009/12/the-brick.jpg" alt="" width="240" height="180" /></a></p>
<h3>We had a lot of fun building our two NXT vehicles. With <a href="www.mindstorms.lego.com " target="_blank">Lego Robotics</a>, you can build “humanoids”, “animals”, “machines”, or “vehicles.</h3>
<h3>     Even though we meet every day, we only meet for forty minutes of the day. It took a couple of weeks to build both robots for the club.</h3>
<h3 style="text-align:center;"><a href="http://thelegogroup.wordpress.com/files/2009/12/building-11.jpg"><img class="aligncenter size-full wp-image-15" title="building 1" src="http://thelegogroup.wordpress.com/files/2009/12/building-11.jpg" alt="" width="180" height="240" /></a></h3>
<h3 style="text-align:center;"><a href="http://thelegogroup.wordpress.com/files/2009/12/building-2.jpg"><img class="aligncenter size-full wp-image-16" title="building 2" src="http://thelegogroup.wordpress.com/files/2009/12/building-2.jpg" alt="" width="180" height="240" /></a></h3>
<h3> </h3>
<h3>       <span style="color:#339966;">Also</span>, it is important that before you start building your robot that you organize all of your materials into the organizer Lego provides with the kit. It will help save a lot of time for you and your faciliatator!</h3>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[NXT Type-bot]]></title>
<link>http://emebler.wordpress.com/2009/12/19/nxt-type-bot/</link>
<pubDate>Sat, 19 Dec 2009 19:13:45 +0000</pubDate>
<dc:creator>emebler</dc:creator>
<guid>http://emebler.wordpress.com/2009/12/19/nxt-type-bot/</guid>
<description><![CDATA[This is a movie of my latest NXT robot, the Type bot.  Designed to type out keys on a computer, type]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is a movie of my latest NXT robot, the Type bot.  Designed to type out keys on a computer, type bot uses many motors and sensors to push the individual keys.  After months of building and programing, the final version is able to type over 35 different keys, inculding space, enter and all the number keys.  It is a slow robot though, so the movie is sped-up 4x so that it&#8217;s just over a minute long.<span id='plh-loop-video-embed-1' class='hidden'>done</span><ins style='text-decoration:none;'>
<div class='video-player' id='x-video-1'>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="266" id="video-1" standby="Type-bot Movie">
  <param name="movie" value="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" />
  <param name="quality" value="best" />
  <param name="seamlesstabbing" value="true" />
  <param name="allowfullscreen" value="true" />
  <param name="allowscriptaccess" value="always" />
  <param name="overstretch" value="true" />
  <param name="flashvars" value="guid=iYOi21Te&amp;javascriptid=video-1&amp;width=400&amp;height=266&amp;locksize=no" />
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" data="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" width="400" height="266" standby="Type-bot Movie">
    <param name="quality" value="best" />
    <param name="seamlesstabbing" value="true" />
    <param name="allowfullscreen" value="true" />
    <param name="allowscriptaccess" value="always" />
    <param name="overstretch" value="true" />
    <param name="flashvars" value="guid=iYOi21Te&amp;javascriptid=video-1&amp;width=400&amp;height=266&amp;locksize=no" />
  <!--<![endif]-->
  <img alt="Type-bot Movie" src="http://cdn.videos.wordpress.com/iYOi21Te/nxt-type-bot-movie-faster.original.jpg" width="400" height="266" /><p><strong>Type-bot Movie</strong></p><p>This movie requires <a rel="nofollow" href="http://www.adobe.com/go/getflashplayer">Adobe Flash</a> for playback.</p>
  <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object></div></ins></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[An Introduction to the NXT]]></title>
<link>http://emebler.wordpress.com/2009/12/19/an-introduction-to-the-nxt/</link>
<pubDate>Sat, 19 Dec 2009 19:13:16 +0000</pubDate>
<dc:creator>emebler</dc:creator>
<guid>http://emebler.wordpress.com/2009/12/19/an-introduction-to-the-nxt/</guid>
<description><![CDATA[The NXT is a Lego robotics product that uses many special sensors to interact with it&#8217;s enviro]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The NXT is a Lego robotics product that uses many special sensors to interact with it&#8217;s environment.  Touch, sound, light, and ultrasonic &#8220;eyes&#8221; are just a few of the available sensors, yet it is an easy system to use.  This movie shows some of the simpler robots I&#8217;ve built, as well as a robotics competition I visited.  If you would like to know more about the NXT, click on this link:  <a href="http://mindstorms.lego.com/eng/Overview/default.aspx" target="_blank">http://mindstorms.lego.com/eng/Overview/default.aspx</a><span id='plh-loop-video-embed-2' class='hidden'>done</span><ins style='text-decoration:none;'>
<div class='video-player' id='x-video-2'>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="266" id="video-2" standby="">
  <param name="movie" value="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" />
  <param name="quality" value="best" />
  <param name="seamlesstabbing" value="true" />
  <param name="allowfullscreen" value="true" />
  <param name="allowscriptaccess" value="always" />
  <param name="overstretch" value="true" />
  <param name="flashvars" value="guid=LX6MCGOo&amp;javascriptid=video-2&amp;width=400&amp;height=266&amp;locksize=no" />
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" data="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" width="400" height="266" standby="">
    <param name="quality" value="best" />
    <param name="seamlesstabbing" value="true" />
    <param name="allowfullscreen" value="true" />
    <param name="allowscriptaccess" value="always" />
    <param name="overstretch" value="true" />
    <param name="flashvars" value="guid=LX6MCGOo&amp;javascriptid=video-2&amp;width=400&amp;height=266&amp;locksize=no" />
  <!--<![endif]-->
  <img alt="" src="http://cdn.videos.wordpress.com/LX6MCGOo/the-fututre-of-robots.original.jpg" width="400" height="266" /><p><strong></strong></p><p>This movie requires <a rel="nofollow" href="http://www.adobe.com/go/getflashplayer">Adobe Flash</a> for playback.</p>
  <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object></div></ins></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Blender, Vue, Z-Brush and more!]]></title>
<link>http://dkor.wordpress.com/2009/12/16/blender-vue-z-brush-and-more/</link>
<pubDate>Wed, 16 Dec 2009 13:11:51 +0000</pubDate>
<dc:creator>dkor</dc:creator>
<guid>http://dkor.wordpress.com/2009/12/16/blender-vue-z-brush-and-more/</guid>
<description><![CDATA[A post just to share with you information about new releases and new products I find interesting to ]]></description>
<content:encoded><![CDATA[A post just to share with you information about new releases and new products I find interesting to ]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover, Ultrasonic low pass filter continued]]></title>
<link>http://nxttime.wordpress.com/2009/12/15/freerover-ultrasonic-low-pass-filter-continued/</link>
<pubDate>Tue, 15 Dec 2009 09:16:38 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/12/15/freerover-ultrasonic-low-pass-filter-continued/</guid>
<description><![CDATA[In my last post I did some experimenting with a low pass filter in Excel. But then there is reality.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://nxttime.wordpress.com/files/2009/12/lowpass3.jpg"><img class="alignright size-medium wp-image-118" title="lowpass3" src="http://nxttime.wordpress.com/files/2009/12/lowpass3.jpg?w=300" alt="" width="300" height="200" /></a>In my last post I did some experimenting with a low pass filter in Excel. But then there is reality. The US sensor is a slow sensor, I can&#8217;t use the sample rate I experimented with. I found out that RobotC, my programming environment, reads the US sensor about every 70 ms. This is a lot slower than the 4 ms I used in my experiment. As a result the filter responds far too slow as you can  see in the first image. FreeRover would hit a wall  ansd still be thinking it was over 20 cm away. If I increase Alpha the filter reacts faster but it will not be as effective as a filter. I needed something else.</p>
<p>The filter described in my last post and above is a first order filter, meaning it uses the current reading and the previous result. Second order filters also use the two previous readings. I started experimenting with a second order filter. Here is an image of the results.</p>
<p><a href="http://nxttime.wordpress.com/files/2009/12/lowpass2.jpg"><img class="alignnone size-full wp-image-120" title="lowpass2" src="http://nxttime.wordpress.com/files/2009/12/lowpass2.jpg" alt="" width="1024" height="634" /></a></p>
<p>Again, the red line represents raw readings, the green line is the result of a first order filter, the blue line is the result of a second order filter. Thetime axis has changed scale as I use a sample rate of once every 0,070 ms. There are five scenario&#8217;s. Scenario 1 and 3 are faulty readings of zero. Scenari 4 is a faulty reading of 255. I won&#8217;t go into much detail of these scenario&#8217;s, but notice that the second order filter is about as responsive as the first order filter but is more effective in filtering out spike errors.<br />
Scenario 5 is the most interesting one. Here, the robot drives into a wall at a speed of 100 cm/second. This is quite fast for a robot, almost the speed of a walking man. Both filters respond with some delay, this means that the real distance to the wall is less then one might think based on filtered values. Upon hitting the wall the first order filter gives a distance of 5,5 cm, the second order gives 6,3 cm. The size of the lag can be altered by altering alpha and beta but will also depend on the speed of the robot.</p>
<p>I conclude that it is important to know the sensor, the kind of errors it gives and the sampling rate it can handle. It also is important to know the robot, how fast it will go. And it is important to tune the filter. This is best done in a spreadsheet at first.</p>
<p>Here is my code for a second order low pass filter for a US sensor.</p>
<pre class="brush: csharp;">
float lowPassUS;

task SonarLowPass()
{
  // sensor reading speed
  int  deltaT=70;
  float alpha=0.2, beta=0.18;
  float US0=0,US1=0, US2=0;
  // Start main loop of the task;
  while(true)
  {
    wait1Msec(deltaT);
    // low pass value of US sensor
    US0=(float)SensorValue[sonar];
    lowPassUS=US1+alpha*(US0-US1)+beta*(US0-US2);
    US2=US1;
    US1=lowPassUS;
  }
}
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover, UltraSonic sensor low pass filter]]></title>
<link>http://nxttime.wordpress.com/2009/12/14/freerover-ultrasonic-sensor-low-pass-filter/</link>
<pubDate>Sun, 13 Dec 2009 23:54:10 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/12/14/freerover-ultrasonic-sensor-low-pass-filter/</guid>
<description><![CDATA[Today I decided to enhance US sensor output. Why? Sometimes I had the impression the car changed beh]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Today I decided to enhance US sensor output. Why? Sometimes I had the impression the car changed behaviour. I suspected this had something to do with faulty readings from the Ultrasonic sensor. I decided to make a low pass filter for the US sensor. This should eliminate random faulty readings. But first I had to understand low pass filters. Coding a low pass filter isn&#8217;t too hard. There is an explanation on Wikipedia. Basicly it&#8217;s just one line of code:<br />
lowPassUS=lowPassUS+alpha*(SensorValue[sonar]-lowPassUS);<br />
The filtered value is calculated from the raw value and the previous filtered value. There is one parameter, alpha, that controls the filter. I wanted to understand how the value of alpha changes the behaviour of the filter. That is why I did some experiments in Excel. Here is an example. The red line represents unfiltered values, the green filtered values. The horizontal axis represents time. <br />
<a href="http://nxttime.wordpress.com/files/2009/12/lowpass.jpg"><img class="alignnone size-large wp-image-109" title="lowpass" src="http://nxttime.wordpress.com/files/2009/12/lowpass.jpg?w=1023" alt="" width="1023" height="687" /></a></p>
<p>The alpha factor does one thing, it controls how fast the filter adjusts to a new situation. The smaller the alpha, the quicker the filter reacts. In the plot it means that the green line follows the red line more closely. The downside is that less noise is filtered out.<br />
There is one other thing that is important to realise. Alpha doesn&#8217;t control the <span style="color:#339966;">time </span>the filter takes to adjust, it controls the number of <span style="color:#339966;">steps </span>(iterations) the filter needs to adjust. This means that there is a relation between sample rate, how often the output from the US sensor is read, and alpha. With a higher sample rate and constant alpha, the filter adjusts quicker in real time. But also, if the sample rate is changes one also needs to consider to change the alpha.</p>
<p>The graph above shows four scenario&#8217;s. At t=1 the sampling starts, the filter needs time to adjust. One should give the filter time to settle, or, one should initialize the filtered value to the unfiltered value.<br />
Around t=0,3 I tested another scenario. The reading of the Sensor changes because an object is in sight. In this example it takes about 0,1 second for the filter to adjust to the new situation. Is this quick enough, for me it is.<br />
Around t=0,46 there is an faulty reading, the filter dampens the reading but for a short time (0,06 seconds) the objects seems further than it is.  In my case, The damping needs to be enough so that the filtered value  not exceeds treshhold. I need more real life testing to find out the damping is enough. Also I do know i get faulty 255 values sometimes, but I don&#8217;t know if I also get faulty zero values. These will affect behaviour more often, as they can influence collision detection.<br />
Around t=0,6 the last scenario is shown.  Here an object at 60 cm dissappears and and a background object at 90 cm appears. But this time the objects doesn&#8217;t dissappear at once but during a short time it is sometimes sen and at other times it is not seen. Here the filter really smoothens out the jitter.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover, behaviour]]></title>
<link>http://nxttime.wordpress.com/2009/12/04/freerover-behaviour/</link>
<pubDate>Fri, 04 Dec 2009 22:10:20 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/12/04/freerover-behaviour/</guid>
<description><![CDATA[FreeRover is an autonomous robot. This means it acts by itself without human intervention. This post]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>FreeRover is an autonomous robot. This means it acts by itself without human intervention. This posts handles the way its behaviour is implemented.</p>
<p>First I&#8217;ll discuss what I want FreeRover to do. Then I&#8217;ll describe its sensors and actuators that are used to make it behave. Then I&#8217;ll describe the design paradigma I used to implement behaviour. After that I&#8217;ll discuss some implementation details.</p>
<p>FreeRover must wander around on its own avoiding obstacles on its way. If it gets into trouble (get stuck) it should be able to free itself. I also want it not to be too repetitive.</p>
<p>In this post I&#8217;ll simplify FreeRover a bit. This helps in understanding the behaviour of FreeRover. I will assume that there are only 3 sensors, one for obstacle detection, one to detect if it got stuck and one to find out how far it has been driving. Also, we will discuss only two actuators, one for driving and one for steering.<br />
In reality, FreeRover is more complicated. To find out if it got stuck FreeRover combines information from a US sensor, a touch sensor, motor power consumption and the motor encoders.</p>
<p>As FreeRover has only one kind of behaviour &#8211; it just drives around &#8211; I choose a <a href="http://en.wikipedia.org/wiki/Hierarchical_control_system">hierarchical control system</a>. In this design paradigma behaviour is modelled into nodes, each node reresenting a different kind of behaviour. Only one node executes at any given time. Complex nodes can be constructed from simpler lower level nodes. In FreeRovers case there is one top level node, representing the &#8220;wander around&#8221; behaviour. Below that thee are different lower level nodes: &#8220;drive straight&#8221;, &#8220;make a corner&#8221;, and &#8220;get out of trouble&#8221;. The &#8220;get out of trouble&#8221; node consists of several &#8220;make a corner&#8221; nodes.<br />
Each node can have input parameters that change the behaviour of the node a bit. There are two kinds of input parameters. The first kind tells the node how to behave while executing the node. Speed and steering angle are examples of this. The seconds kind of input tells a node when to finish executing, for example after driving 40 centimeters. Circumstances can prevent nodes from finishing their task. In this post I&#8217;ll only discuss one such circumstance, this is when FreeRover gets stuck. When a node finishes it returns to the parent node if it finished on the stop condition or due to circumstances.  This information is used by the parent node to select new behaviour.<br />
Here is some pseudo code for FreeRovers behaviour.</p>
<p><code><span style="color:#339966;">// Top level node for behaviour<br />
// Drive straight until close to an obstacle<br />
// then turn until there is a free path right in front<br />
// repeat forever<br />
// But when got stuck, try to escape</span></code></p>
<p><code><span style="color:#3366ff;">WanderAround()<br />
  start loop forever<br />
    ReturnParameter=DriveStraight(until close_to_an_obstacle, forward)<br />
    If ReturnParameter=succes then ReturnParameter=DriveCorner(until no_obstacle_close_by, someDirection, forward)<br />
    If ReturnParameter=got_stuck then Escape()<br />
  end loop forever</span></code></p>
<p><code><span style="color:#339966;">// Drive in a straight line (forward or backward)<br />
// halt function when stop condition is met or when stuck</span></code></p>
<p><code><span style="color:#3366ff;">DriveStraight(stopCondition, direction)<br />
  setSteeringAngle(noAngle)<br />
  setSpeed(direction)<br />
  loop until stopCondition<br />
    If TestForErrors()=true then return got_stuck<br />
  end loop<br />
</span>  <span style="color:#3366ff;">return succes</span></code></p>
<p><code><span style="color:#339966;">// Drive in a circle, clockwise or counterclockwise, forward or backward<br />
// halt function when stop condition is met or when stuck</span></code></p>
<p><code><span style="color:#3366ff;">DriveCorner(stopCondition, angle, direction)<br />
  setSteeringAngle(angle)<br />
  setSpeed(direction)<br />
  loop until stopCondition<br />
    If TestForErrors()=true then return got_stuck<br />
  end loop<br />
  return succes</span></code></p>
<p><code><span style="color:#339966;">// Try to escape from being stuck<br />
// make a backward clockwise turn and then a forward clockwise turn<br />
// repeat this sequence until a free path straight in front</span></code></p>
<p><code><span style="color:#3366ff;">Escape()<br />
  loop forever<br />
    ReturnParameter=DriveCorner(until 10 cm, toLeft, backwards)<br />
    ReturnParameter=DriveCorner(until no_obstacle_close_by, toRight, forward)<br />
    If returnParameter=succes then return succes<br />
  end loop</span></code></p>
<p>It is amazing how only a few nodes like this can result in nice and efficient behaviour. If only I could make a proper video. But usually I work on my robot at night and then poor light conditions prevent my from making a video.</p>
<p>I found out that a bathroom is a good place to test robots. There is not too much rubbish in it to disturb your robot. Also, the floor is smooth and most objects in the bathroom have a hard surface and are easily detected by the US sensor.</p>
<p>Here is the robotC code dealing with behaviour. Please note that there is also a rest behaviour I didn&#8217;t discuss in the post.  Also the main task implements the top level node for behaviour.</p>
<pre class="brush: csharp;">
typedef enumWord
{
  brcSucces   = 0,
  brcTouch    = 1,
  brcSonar    = 2,
  brcStall    = 3,
  brcStuck    = 4
} TbehaviourRC;

typedef enumWord
{
  stopOnProblem   = 0,
  stopOnSonar     = 1,
  stopOnDistance  = 2,
  stopOnButton    = 3
} TstopCondition;

typedef enumWord
{
  STrest=0,
  STdrive=1,
  STturn=2,
  STescape=3
} Tstate;

Tstate state=STrest;

/***************************************************************************************************\
*  Behaviour: goStraight                                                                            *
*  Purpose: Allow the car to go straight                                                            *
\***************************************************************************************************/

TbehaviourRC goStraight(int speed, TstopCondition condition, int stopValue)
{
  float startPoint=getDistance();
  if (speed==0)
    speed=50+random(50);
  setSteer(0);
  setSpeed(speed);
  while (true)
  {
    // check for normal termination
    switch (condition)
    {
    case stopOnSonar:
      if (SensorValue[sonar]&#60;stopValue) return brcSucces;
      break;
    case stopOnDistance:
      if (abs(getDistance()-startPoint)&#62;stopValue) return brcSucces;
      break;
    default:
    }

    // Check for error conditions
    if (hitSomethingNew()==true) return brcTouch;
    if (stall()) return brcStall;
    if (speed&#62;0 &#38;&#38; SensorValue[sonar]&#60;10) return brcSonar;
  }
}

/***************************************************************************************************\
*  Behaviour: driveCorner                                                                           *
*  Purpose: Allow the car to drive a corner                                                         *
\***************************************************************************************************/

TbehaviourRC driveCorner(int speed, int steer, TstopCondition condition, int stopValue )
{
  float startPoint=getDistance();
  if (speed==0)
    speed=40+random(20);
  setSpeed(speed);
  if (steer==0)
    steer=100*sgn(random(10)-5);
  setSteer(steer);
  while (true)
  {
    // check for normal termination
    switch (condition)
    {
    case stopOnSonar:
      if (SensorValue[sonar]&#62;stopValue) return brcSucces;
      break;
    case stopOnDistance:
      if (abs(getDistance()-startPoint)&#62;stopValue) return brcSucces;
      break;
    default:
    }

    // Check for error conditions
    if (hitSomethingNew()) return brcTouch;
    if (stall()) return brcStall;
    if (speed&#62;0 &#38;&#38; SensorValue[sonar]&#60;10) return brcSonar;
  }
}

/***************************************************************************************************\
*  Behaviour: goEscape                                                                              *
*  Purpose: Try to escape from a trapped situation                                                  *
\***************************************************************************************************/

TbehaviourRC goEscape()
{
  int angle, speed, distance=150,i=0;
  TbehaviourRC result;
  while(true)
  {
	  i++;
	  if (desiredAngle&#60;0)
	    angle=100;
	  else
	    angle=-100;
	  if (desiredSpeed&#60;0)
	    speed=40;
	  else
	    speed=-40;
	  setSteer(angle);
	  setSpeed(0);
	  distance+=10;
 	  wait1Msec(300);
	  result=driveCorner(speed, angle, stopOnDistance, distance);
	  if (result==brcSucces &#38;&#38;  (i % 2 ==0) &#38;&#38; SensorValue[sonar]&#62;60) return brcSucces;
	  if (i&#62;20) return brcStuck;
  }
}

/***************************************************************************************************\
*  Behaviour: goRest                                                                                *
*  Purpose: Stop the car                                                                            *
\***************************************************************************************************/
TbehaviourRC goRest(TstopCondition condition, int stopValue)
{
  while(true)
  {
    // check for normal termination
    switch (condition)
    {
    case stopOnSonar:
      if (SensorValue[sonar]&#60;stopValue) return brcSucces;
      break;
    case stopOnButton:
      if (nNxtButtonPressed==stopValue) return brcSucces;
      break;
    default:
    }
  }
}

/***************************************************************************************************\
*  Behaviour: Main, top level behaviour                                                             *
*  Purpose: Allow the car to behave                                                                 *
\***************************************************************************************************/

task main()
{
  TbehaviourRC result;
  init();

  while (true)
  {
    //nxtDisplayCenteredBigTextLine(1, &#34;%d&#34;, state);
    //nxtDisplayCenteredBigTextLine(3, &#34;%d&#34;, result);

    switch (state)
    {
    case STrest:
        result=goRest(stopOnButton, 3);
        if (result==brcSucces)
          state=STdrive;
        else
          state=STrest;
      break;
    case STdrive:
        result=goStraight(0, stopOnSonar, 70);
        if (result==brcSucces)
          state=STturn;
        else
          state=STescape;
      break;
    case STturn:
        result=driveCorner(0, 0, stopOnSonar, 75);
        if (result==brcSucces)
          state=STdrive;
        else
          state=STescape;
      break;
    case STescape:
        result=goEscape();
        if (result==brcSucces)
          state=STdrive;
        else
          state=STrest;
      break;

    default:
    }

}

  StopAllTasks();
}
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[NXT Turing machine]]></title>
<link>http://hackaday.com/2009/11/30/nxt-turing-machine/</link>
<pubDate>Mon, 30 Nov 2009 14:00:03 +0000</pubDate>
<dc:creator>Jacob Woj</dc:creator>
<guid>http://hackaday.com/2009/11/30/nxt-turing-machine/</guid>
<description><![CDATA[This interesting use of Lego popped up on the mailing list of the University of Bergen. Build by a g]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/cYw2ewoO6c4&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/cYw2ewoO6c4&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p><a href="http://legoofdoom.blogspot.com/">This interesting use of Lego</a> popped up on the mailing list of the University of Bergen. Build by a group of <span style="text-decoration:line-through;">Norwegian</span> Danish students, it&#8217;s a simple computer that implements <a href="http://en.wikipedia.org/wiki/Turing_machine">Alan Turing&#8217;s design</a> from 1937. Having both read and write functions, it implements its own (somewhat inefficient) medium of non-volatile memory. What we find interesting is that rather than move the &#8216;tape&#8217; through the machine, the machine rolls over the tape. Thanks to [Thorsten] for the tip.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to Impress Your Parents With Lego]]></title>
<link>http://brickbuilt.wordpress.com/2009/11/29/how-to-impress-your-parents-with-lego/</link>
<pubDate>Sun, 29 Nov 2009 20:26:15 +0000</pubDate>
<dc:creator>The Lego Obsessionist</dc:creator>
<guid>http://brickbuilt.wordpress.com/2009/11/29/how-to-impress-your-parents-with-lego/</guid>
<description><![CDATA[TFOLs (Teen/Tween Fans Of Lego) and UFOLs (Underage Fans Of Lego [9 and under]) are often disappoint]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>TFOLs (Teen/Tween Fans Of Lego) and UFOLs (Underage Fans Of Lego [9 and under]) are often disappointed by their parent&#8217;s reaction to the latest cool creation they either build or find online.  Non-Lego fans simply do not understand the rules of Lego and the effort that goes into any creation.  I cannot blame them&#8211;you cannot fully appreciate Lego unless you have built Lego yourself.  But still we want out parents to be amazed by the wonders of amazing Lego creations.  This guide highlights some types Lego creations and qualities found in Lego creations that cause a parent&#8217;s increased awe.  If you are a TFOL or UFOL and have your parent nearby, I suggest you invite them to read this post with you.  I will include an example of each item.</p>
<p><strong>1. Brickfilms</strong></p>
<p>Stop-motion animation with Lego is very popular.  Parents love the idea and think it is amazing that you can make a <em>movie, </em>of all things, with Lego.  Here is an old example built by <a href="http://www.youtube.com/user/rymdreglage" target="_self">rymdrelage</a> to promote the song &#8220;8- Bit Trip&#8221;:</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/4qsWFFuYZYI&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/4qsWFFuYZYI&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span> </p>
<p>You should probably stop for a moment now to pick your mom or dad&#8217;s jaw off the floor.</p>
<p>Thanks to <a href="http://lmotd.blogspot.com/" target="_self">Fasinating Lego Model of The Day</a>.</p>
<p><strong>2. Robotics/Motion</strong></p>
<p>You can find hordes of robotic creations online if you know where to look.  Most are made from the Mindstorms or NXT Lego robotic kits, but if that is out of your price range (NXT 2.0 costs $279.99) you can buy Power Functions Motors. </p>
<p>Robots and vehicles are great, but think out-of-the-box like NeXTORM:</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/IkDsre1ltvk&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/IkDsre1ltvk&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p>Amazing, right?</p>
<p>Thanks to <a href="http://www.brothers-brick.com/" target="_self">The Brothers Brick</a>.</p>
<p><strong>3. Huge Size</strong></p>
<p>Anything is more impressive if it&#8217;s gigantic.  Although most people don&#8217;t have enough bricks to make something the size of this model of the battleship <em>Yamato</em>, by Jumpei Mitsui, you can always build something impressive with what elements you do have.</p>
<p><a href="http://brickbuilt.wordpress.com/files/2009/11/yamato_001b.jpg"><img class="aligncenter size-medium wp-image-186" title="Battleship Yamato" src="http://brickbuilt.wordpress.com/files/2009/11/yamato_001b.jpg?w=300" alt="" width="399" height="294" /></a></p>
<p>Statistics:</p>
<li>Length: 6.6 meters (22 feet) from bow to stern</li>
<li>Width: 1 meter (3 feet) at the widest point midship</li>
<li>Scale: 1/40</li>
<li>Time to complete: 6 years, 4 months</li>
<li>Parts: 200,000 LEGO elements</li>
<li>Weight: 150 kilograms (330 pounds)</li>
<p>Thanks to <a href="http://www.brothers-brick.com/" target="_self">The Brothers Brick</a>.</p>
<p><strong>4. Creative and Original Build</strong></p>
<p>Think: is a Toa really anything new?  Is a spaceship truly noteworthy?  Haven&#8217;t you built lots of custom minifigures before?  Parents may tire of seeing the same old type of creation over and over again.  But a Bionicle lobster?  They&#8217;ve never seen <em>that</em> before.</p>
<p><a href="http://brickbuilt.wordpress.com/files/2009/11/lego-lobster-and-lps-025.jpg"><img class="aligncenter size-medium wp-image-172" title="Bionicle Lobster" src="http://brickbuilt.wordpress.com/files/2009/11/lego-lobster-and-lps-025.jpg?w=300" alt="" width="300" height="225" /></a></p>
<p>So there you have it- the basics on how to impress your parents with Lego.  Now go forth and build!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[2009 FLL Tournament]]></title>
<link>http://ryanspace.wordpress.com/2009/11/21/2009-fll-tournament/</link>
<pubDate>Sun, 22 Nov 2009 03:04:29 +0000</pubDate>
<dc:creator>Ryan</dc:creator>
<guid>http://ryanspace.wordpress.com/2009/11/21/2009-fll-tournament/</guid>
<description><![CDATA[I just came back from Safeway. Before that, I was eating dinner. Before that, I was at the 2009 FIRS]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I just came back from Safeway. Before that, I was eating dinner. Before that, I was at the 2009 FIRST Lego League Qualifying Tournament.</p>
<p>At the tournament, you have to program a NXT Mindstorms robot to do certain missions that you pick. You also get scored on your teamwork, robot design, and project that has to be based on the theme. (By the way, this year&#8217;s theme was about safe ways to get to places. Basically, transportation.) On the practical part (the missions), we got 9th place out of 12. The good part? We were the first team in our region to finish a round on the red bridge. That was kinda cool.</p>
<p>We didn&#8217;t get any awards or anything, but all in all, it was fun. The red bridge thing was even more cool. </p>
<p>Learn more about the FIRST Lego League, the NXT Mindstorms kit, and everything else at:<br />
http://www.usfirst.org/roboticsprograms/fll/ &#60;&#8212;&#8211;FLL Site<br />
http://mindstorms.lego.com/ &#60;&#8212;&#8211;NXT Mindstorms Site</p>
<p>Ryan</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover, front wheel drive]]></title>
<link>http://nxttime.wordpress.com/2009/11/21/freerover-front-wheel-drive/</link>
<pubDate>Sat, 21 Nov 2009 21:10:04 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/11/21/freerover-front-wheel-drive/</guid>
<description><![CDATA[I wanted free rover to have front wheel drive. Why? I might want to use odometry, the art of knowing]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I wanted free rover to have front wheel drive.<br />
Why? I might want to use odometry, the art of knowing where you are, later on. The path of front wheels is more easy to calculate than the path of the back wheels, so I wanted encoders on my front wheels to tell me how much they have rotated. Also, I wanted to explore the various aspects of front wheel drive.</p>
<p>I could have used a single motor for driving and a differential to divide power to both wheels. But I choose to drive each of the wheels with its own motor.<br />
Why?<br />
I want more power for driving, two motors give more power than one motor. Also, differentials are weak. Also, why use mechanics if there is software.</p>
<p>So, I developed a drive train where aech of the front wheels is driven by a motor. There is a 5/3 gear ratio in the drive train, this will make FreeRover a bit quicker. Both driving motors are on the outside and on top of the car. I think it looks nice.</p>
<p>As i discussed before, both front wheels rotate at different speed while cornering. This has to be reflected in motor speed. It can be calculated how much different the speeds of the motors should be, given the turning radius of the car. Turning radius itself can be calculated from the angle the front wheels make. And this can be calculated from the number of encoder ticks the steering moter is from its center position. The math isn&#8217;t comlicated if you know how basic trigonometry.</p>
<p>My program doesn&#8217;t set motor speed directly. Instead it uses a function that translates the desired car speed to left and right motor speed and sends this to the motors. The steering position is constantly monitored and when the angle of the steering changes corrections in motor speed are made.</p>
<p>Everything seems to work fine. Without corrections the inner wheel would jitter in corners. With corrections both wheels drive smoothly.</p>
<p>It is time I gave credit to RobotC. It has the opportunity to set motor speed. Normally you would set motor power, you would not know how much speed this would give you. Not in robotC though. This took a lot of work from me.</p>
<p>However there is one thing to consider. My software solution assumes a perfect world. The steering angle must be perfectly corrleted to the radius of the turn and so on. Well, this is not always the case. A car can slip for example. A differential doesn&#8217;t suffer from this. It reacts to a real world instead of to a mathematical world. So, unless I take real world measurements in account, my solution is inferior to a differential. For now it doesn&#8217;t take the real world into account. I&#8217;m still considering some ways to do so. Also, I have not yet decided if it is worth the trouble.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover steering, Ackermann ]]></title>
<link>http://nxttime.wordpress.com/2009/11/21/freerover-steering-ackermann/</link>
<pubDate>Sat, 21 Nov 2009 11:59:39 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/11/21/freerover-steering-ackermann/</guid>
<description><![CDATA[My steering geometry was square. The steering wheels were always parallel to each other. However, if]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="alignleft" src="http://upload.wikimedia.org/wikipedia/commons/7/70/Ackermann_New.jpg" alt="" width="527" height="719" />My steering geometry was square. The steering wheels were always parallel to each other. However, if a car is cornering the outside wheel is making a large circle, the inside wheel is making a small circle. So, the steering angle of the outside wheel should be less than that of the inside wheel. This can be achieved with a steering geometry called <a href="http://en.wikipedia.org/wiki/Ackermann_steering_geometry">Ackerman steering geometry</a>. See the image I took from Wikipedia.</p>
<p>I wanted Ackermann steering. This forced me to redesign the steering mechanism and to recalculate some of the cars properties. The biggest challenge turned was to make the design sturdy. On the run I also managed to get rid of some of my previous design errors. Although I introduced some new ones.</p>
<p>As both front wheel have a different angle this could further complicate calculations. To overcome these complications I now base all calculations on a fictional front wheel that is placed exactly between the two real ones and that has an angle that is the average of the to real ones.</p>
<p>Here are two new pictures of FreeRover. One showing the steering mechanism. The other showing FreeRover in its current state. You might notice the red handle bars. These are intentionally red as the remind me to use them while handling the car. Before that I used to grab the driving motors while carrying FreeRover. Sometimes this would cause the cables to disconnect.</p>
<p>I had to compromise on sturdyness and cornering. It turns more slowly than it used to. Was it worth it? I don&#8217;t know.</p>
<p><a href="http://nxttime.wordpress.com/files/2009/11/img_0246.jpg"><img class="alignnone size-large wp-image-49" title="IMG_0246" src="http://nxttime.wordpress.com/files/2009/11/img_0246.jpg?w=1024" alt="" width="1024" height="768" /></a></p>
<p><a href="http://nxttime.wordpress.com/files/2009/11/img_0247.jpg"><img class="alignnone size-large wp-image-50" title="IMG_0247" src="http://nxttime.wordpress.com/files/2009/11/img_0247.jpg?w=1024" alt="" width="1024" height="768" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover steering, some pidfalls]]></title>
<link>http://nxttime.wordpress.com/2009/11/20/freerover-steering-some-pidfalls/</link>
<pubDate>Thu, 19 Nov 2009 23:57:35 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/11/20/freerover-steering-some-pidfalls/</guid>
<description><![CDATA[Last week I implemented autocalibration using pid control. I found out it worked well, but only if t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Last week I implemented autocalibration using pid control. I found out it worked well, but only if the miscalibration wasn&#8217;t too big. It worked to about half the maximum error. After some attempts to improve tuning I concluded it must be something else.<br />
Pid controllers only work for lineair systems and my steering function isn&#8217;t. The output, rotational speed, is not linear related the the input, being number of encoder ticks for the steering motor.</p>
<p>This gave me two questions. Why does it work for small errors? And can i rewrite my steering function to be lineair?</p>
<p>I only have some suspicion about the answers to these questions. So if you have them please post&#8217;em.</p>
<p>I think my steering system behaves almost lineair if the steering angle is small. This being my answer to my first question.<br />
I also believe it is possible to write a lineair steering function. But if an error factor is added it will no longer behave lineair. As the error in rotation speed is not lineair to the error in the steering.</p>
<p>So I concluded that my pid function only works for small errors and that is of no use to try to improve it.</p>
<p>And still, i love to see my car calibrate itself all the time. Also, I&#8217;ve managed to reduce the distance needed for calibration to aboout 25 cm.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover steering, continuous auto calibration]]></title>
<link>http://nxttime.wordpress.com/2009/11/15/freerover-steering-auto-calibration/</link>
<pubDate>Sun, 15 Nov 2009 22:49:09 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/11/15/freerover-steering-auto-calibration/</guid>
<description><![CDATA[For the steering to work correctly, the steering mechanism has to be calibrated. One needs to know w]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>For the steering to work correctly, the steering mechanism has to be calibrated. One needs to know when the steering is centered. The easiest way is to do it by hand, remove the 12 tooth pinion, center the steering and put it back on. I used this method until today.</p>
<p>Today, I had a day of from work and family. I used it to make the car calibrate its steering while driving.</p>
<p>Calibration is done everytime the car has to drive a straight line. It then uses it&#8217;s gyro and a PID controler to drive straight. If the steering is miscalibrated this will take some time. But once FreeRover drives straight, it stores the current encoder value as steering centre. Thus calibrating the steering.</p>
<p>Writing a PID controller is not very difficult, but it needs to be tuned before it works well. Tuning is difficult. It took me some time to tune the PID controller but now it&#8217;s working like a blast.</p>
<p>The autocalibration calibrates within a meter, but well before that it corrects for an offset steering. For FreeRover autocalibration is very usefull because the steering gets lots of strain from collisions, the front wheel drive system and design errors. As a result, it gets miscalibrated very easily.</p>
<p>Here is the robotC code dealing with autocalibration. Note that calibration is done if the absolute value of past errors is below a certain treshhold. This treshhold is then decreased to allow for even bettter calibration. The treshhold is reset every time the car starts driving straight.</p>
<pre class="brush: csharp;">
// PID controller using the gyro to tune the car for driving straight
task driveStraight()
{
  float Kp=1.6, Ki=0.008, Kd=0.2, memory=0.6;
  float error=0, integral=0, absIntegral=0, derivative, lastError=0, sumError, calibrationOffset=32;
  int i, dT=80,x=0, q=0 ;
  while (true)
  {
    wait1Msec(100);
    calibrationOffset=32;
    q=0;
	    while(state==STdrive)
	    {
	    // Read the gyro 20 times (to eliminate noise) and calculate the error;
	    sumError=0;
	    for (i=0;i&#38;lt;20;i++)
	    {
	      sumError+=(float)HTGYROreadRot(HTGYRO);
	      wait1Msec(4);
	    }
	    error=(-sumError/20);

	    // Test again, for gyro loop took some time
	    if (state==STdrive)
	    {
		    // If the sum of last errors is below a treshold then the car is driving straight steadily.
		    // Calibrate the center steering
		    if (q++&#38;gt;20 &#38;amp;&#38;amp; absIntegral&#38;lt;calibrationOffset)
		    {
		      nMotorEncoder[steer]=0;
		      calibrationOffset=calibrationOffset/2;
		    }
		    else
		    {
		      // Calculate the values for PID
			    integral=memory*integral+(error*dT);
			    absIntegral=memory*absIntegral+(abs(error));
			    derivative=(error-lastError)/dT;
			    // calculate the steer correction value (it will be picked up by the steering task
			    steerCorrection=clip(Kp*error+Ki*integral+Kd*derivative,-80,80);
			    lastError=error;

			    // Plot the sum of the last errors.
			    /*
			    nxtEraseLine(x, 0, x, 50);
		 	    nxtSetPixel(x, absIntegral);
			    if (x++&#38;gt;99) x=0;
			    nxtDrawLine(x, 0, x, 47);
			    nxtDisplayTextLine(0, &#38;quot;E:%4.2f&#38;quot;, error);
			    nxtDisplayTextLine(1, &#38;quot;I:%4.2f&#38;quot;, absIntegral);
		      */
		    }
  	  }
    }
  }
}
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover steering, some calculations]]></title>
<link>http://nxttime.wordpress.com/2009/11/15/freerover-steering-some-calculations/</link>
<pubDate>Sun, 15 Nov 2009 22:47:36 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/11/15/freerover-steering-some-calculations/</guid>
<description><![CDATA[Steering of FreeRover is done by means of a rack and pinion system. The rack is made out of 2 worm g]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Steering of FreeRover is done by means of a rack and pinion system. The rack is made out of 2 worm gears. The pinion is a 12 tooth gear that is connected to a NXT motor through a gear train. I want FreeRover to be symetrical. That is why the NXT motor is placed along the length axis of the car.</p>
<p>There are two things I need to know . First, what is the maximum amount of rotation the NXT motor can make (number of encoder ticks) without the pininion (wheel gear) loosing touch with the rack. And second, what is the angle of the front wheels given the amount of rotation of the steering motor.</p>
<p>The maximum rate of freedom of the steering rod with the 2 worm gears is about 2 studs from the center to either left or right. At its maximum the pinion (12 tooth gear) begins to loose touch with the rack (2 worm gears), beond this point the pinion does not have any contact with the rack and all control over the steering is lost. That is why I need to know how much I can make the NXT motor rotate. Let&#8217;s start with the rack. Each worm wheel has 5 teeth (the singel spiral makes 5 turns around the axis), so 5 teeth is the maximum for the rack. The pinion has 12 teeth. It&#8217;s maximum rotation is 5/12. The pinion is connected to a 20 teeth gear, it&#8217;s maximum is also 5/12. This gear is driven by a 12 tooth gear. The maximum rotation of this gear is 20/12* 5/12. From there on, I used only 24 tooth gears to the motor, these can be ignored. So the maximum rotation of the motor equals 20/12*5/12*360 = 250 encoder ticks. If the steering mechanism is pointing straight forward and I rotate the motor for 250 ticks it will be pointing full left (or right).<br />
<a title="A nice tutorial about lego gears can be found here " href="http://sariel.pl/2009/09/gears-tutorial/">A nice tutorial about lego gears can be found here.</a></p>
<p>Based on this calculation I coded a function that takes an angle as input and drives the steering motor accordingly.</p>
<p>I also want to know what angle the wheels are making given a number of encoder ticks. The length of the steering arm is given (2 studs). The steering rod goes one stud sideways for each 125 encoder ticks of the steering wheel. This gives us the length of two sides of an imaginary triangle, the hypothenuse (2) and the opposite (encoderticks / 125). The angle of the steering wheel equals the arc sinus of encoders ticks / 250.</p>
<p>I made a function that returns the angle of the front wheels.</p>
<p><img class="alignnone size-large wp-image-29" title="IMG_0241" src="http://nxttime.wordpress.com/files/2009/11/img_0241.jpg?w=1024" alt="IMG_0241" width="1024" height="768" /></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Sensores Robots Lego Mindstorm NXT]]></title>
<link>http://nosoyfriky.wordpress.com/2009/11/15/sensores-robots-lego-mindstorm-nxt/</link>
<pubDate>Sun, 15 Nov 2009 19:53:39 +0000</pubDate>
<dc:creator>rantamplan87</dc:creator>
<guid>http://nosoyfriky.wordpress.com/2009/11/15/sensores-robots-lego-mindstorm-nxt/</guid>
<description><![CDATA[Otro trabajo para TAR que comparto con vosotros. Lo de siempre, un trabajo cutre de 1-2 páginas. Un ]]></description>
<content:encoded><![CDATA[Otro trabajo para TAR que comparto con vosotros. Lo de siempre, un trabajo cutre de 1-2 páginas. Un ]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover steering, an introduction]]></title>
<link>http://nxttime.wordpress.com/2009/11/14/steeringan-introduction/</link>
<pubDate>Fri, 13 Nov 2009 23:22:36 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/11/14/steeringan-introduction/</guid>
<description><![CDATA[First I want to discuss steering. FreeRover has front wheel drive. Each of the two wheels is driven ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>First I want to discuss steering.</p>
<p>FreeRover has front wheel drive. Each of the two wheels is driven by a physically independent motor. The car has rack and pinion steering, steering is driven by a third NXT motor. Rack and pinion steering means that each wheel rotates around a different axis. Also, this gives the car a fixed wheel base, therefore it is very stable. In corners, the inner wheel rotates more slowly than the outer wheel. So the motors that drive the front wheels have to turn at different speeds. How much different? That can be calculated with a little math. It does make the software rather complex. A good software design is critical. These three aspects, car design, math and software will each be discussed in later posts.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FreeRover]]></title>
<link>http://nxttime.wordpress.com/2009/11/11/freerover/</link>
<pubDate>Wed, 11 Nov 2009 14:42:48 +0000</pubDate>
<dc:creator>Aswin</dc:creator>
<guid>http://nxttime.wordpress.com/2009/11/11/freerover/</guid>
<description><![CDATA[The first project on this blog will be my autonomous rover called FreeRover. It&#8217;s goal is just]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The first project on this blog will be my autonomous rover called FreeRover. It&#8217;s goal is just to drive around and avoid obstacles. I know, it has been done before and it has been done better. </p>
<p>The setup of this NXT robot is different from most I have seen around. It is like a normal car, with four wheels, front wheel steering using a pinion and rack lay-out and front wheel drive.</p>
<p>There are some challenges for me in this project, each of them will get at least some attention here:</p>
<ul>
<li>Steering</li>
<li>Obstacle detection</li>
<li>Behaviour</li>
</ul>
<p>Here are some pictures of the rover in it&#8217;s current state.</p>

</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Belajar Lego Mindstorms NXT (1)]]></title>
<link>http://munadiakrom.wordpress.com/2009/10/31/belajar-lego-mindstorms-nxt-1/</link>
<pubDate>Sat, 31 Oct 2009 14:19:33 +0000</pubDate>
<dc:creator>munadiakrom</dc:creator>
<guid>http://munadiakrom.wordpress.com/2009/10/31/belajar-lego-mindstorms-nxt-1/</guid>
<description><![CDATA[Sebenarnya artikel ini cocok untuk adik-adik yang berusia mulai dari 7 -12 tahun, tetapi kalau teman]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Sebenarnya artikel ini cocok untuk adik-adik yang berusia mulai dari 7 -12 tahun, tetapi kalau teman-teman ada yang mau belajar ya tidak masalah…kan ngejar ilmu sampai ke negeri tirai bambu…begitu kata petuah orang tua kita.</p>
<p>Sebenarnya saya membeli Lego Mindstorms NXT awalnya hanya untuk mencoba mengalihkan perhatian anak saya si Omy yang berusia 3 tahun dari hobby membeli dan mengoleksi berbagai tipe mainan mobil-mobilan! Selain itu agar dia interested ke mainan robot dan sekaligus meningkatkan stimul daya logikanya…begitu kata para psikolog kalau berbicara di seminar. Dan yang jelas…ini tidak ada pesan dari sponsor!</p>
<p>Ketika saya akan membelikan  Mindstorms NXT untuk si Omy, saya sempat menelpon dan bertanya beberapa distributor di Indonesia yang aku kenal. Versi Lego Mindstorms NXT ada dua tipe, yaitu :<br />
1. NXT 8257<br />
Versi ini memang untuk retail dan jumlah komponennya lebih sdikit dibanding versi yang satunya.<br />
<img src="http://munadiakrom.wordpress.com/files/2009/09/11.jpeg" alt="11" title="11" width="114" height="114" class="aligncenter size-full wp-image-496" /><br />
<!--more--><br />
2. NXT 9797<br />
Versi ini sangat support untuk education version. Jadi terserah ke Anda bila mau membeli.<br />
<img src="http://munadiakrom.wordpress.com/files/2009/09/2.jpeg" alt="2" title="2" width="114" height="114" class="aligncenter size-full wp-image-497" /></p>
<p>Ketika saya bertanya harga, distributor di Bandung membandrol harga :Rp. 4,8 jt untuk versi NXT 9797, sedangkan distributor Surabaya dengan harga Rp 5,4jt untuk versi NXT 8257. Semuanya belum termasuk ongkos kirim. Wah kok lebih mahal harganya bila dibandingkan di internet, maka kuputuskan saja beli langsung di internet. Saya beli di US dengan harga Rp. 3 jt  sudah termasuk ongkos kirim untuk versi NXT 8257.<br />
<a href="http://munadiakrom.wordpress.com/2009/10/31/belajar-lego-mindstorms-nxt-1/p1010327/" rel="attachment wp-att-557"><img src="http://munadiakrom.wordpress.com/files/2009/10/p1010327.jpg?w=300" alt="P1010327" title="P1010327" width="300" height="225" class="aligncenter size-medium wp-image-557" /></a></p>
<p>Mindstorms NXT memang didesain untuk anak-anak sehingga tidak menyulitkan mereka. Sama saat kita belajar robot, Mindstorms NXT pun sudah dilengkapi dengan beberapa bagian, antara lain :<br />
1. Otak (mikrokontroller),<br />
2. Sensor (ada sensor suara, jarak, dll)<br />
3. Penggerak (servo motor)<br />
4. Software<br />
5. Perangkat penunjang lainnya<br />
Belajar menjalankan Mindstorms NXT sangat mudah karena semua sudah dibuat simple, sangat berbeda saat kita belajar membuat robot dengan mikrokontroler yang harus mengerti tentang bahasa pemprograman.</p>
<p>Oke…introductionnya mungkin cukup sekian dulu…ntar saya sambung ke munu inti belajarnya.</p>
<p>Salam,</p>
<p>Munadi A</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Team Meeting Wrap-up 10/4/09 ]]></title>
<link>http://jumpingjellybeansfll.wordpress.com/2009/10/05/team-meeting-wrap-up-10409/</link>
<pubDate>Tue, 06 Oct 2009 00:33:56 +0000</pubDate>
<dc:creator>Buchman Richard</dc:creator>
<guid>http://jumpingjellybeansfll.wordpress.com/2009/10/05/team-meeting-wrap-up-10409/</guid>
<description><![CDATA[(Thank you again Gretchen for the summary) Hi everyone, We had another great meeting today! The kids]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">(Thank you again Gretchen for the summary)</p>
<p style="text-align:justify;">Hi everyone,</p>
<p style="text-align:justify;">We had another great meeting today!</p>
<p><strong><em>The kids were well prepared</em> and we accomplished a lot.</strong> We decided upon our team t-shirt and started building the legos for our missions.</p>
<blockquote>
<h3><span style="color:#0000ff;">Because there are many Lego parts to build we have decided to hold a meeting this coming Thursday night, Oct. 8th, from 6:30-8:00 pm. at Mitra&#8217;s house.</span></h3>
</blockquote>
<p style="text-align:justify;"><em><strong><span style="text-decoration:underline;">We have also decided to meet a little earlier next Sunday Oct. 11th. If your child can meet at 2:30 and stay until 5:30 for the Sunday meeting that would be great.  </span></strong></em> After this meeting we should have a better idea of how much more we will need to get done.</p>
<p style="text-align:justify;"><strong><em>Meena has ordered the robot and we should have it this coming week.</em></strong></p>
<h3 style="text-align:justify;"><span style="color:#ff0000;">Please email Gretchen if your child can make it to Mitra&#8217;s this coming Thursday night.</span></h3>
<p style="text-align:justify;">Thanks,</p>
<p style="text-align:justify;">Gretchen 303-443-9676 home, 720-841-6015 cell</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Basket ball avec Lego Mindstorms]]></title>
<link>http://ubik75.wordpress.com/2009/10/05/basket-ball-avec-lego-mindstorms/</link>
<pubDate>Mon, 05 Oct 2009 19:33:00 +0000</pubDate>
<dc:creator>Thierry</dc:creator>
<guid>http://ubik75.wordpress.com/2009/10/05/basket-ball-avec-lego-mindstorms/</guid>
<description><![CDATA[Jouer au basket ball avec le Mindstorms: sur la brique Lego, on sélectionne Gauche ou Droite par int]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="alignleft size-full wp-image-125" title="NXT_ICON" src="http://ubik75.wordpress.com/files/2009/06/nxt_icon.jpg" alt="NXT_ICON" width="40" height="40" />Jouer au basket ball avec le Mindstorms: sur la brique Lego, on sélectionne Gauche ou Droite par intervalle de 15 degrés. La validation se fait avec le bouton, on sélectionne ensuite la puissance de tir avec la télécommande, on valide avec le bouton et panier.</p>
<p>Une petite vidéo pour illustrer le fonctionnement:</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/WI3823_fXAA&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/WI3823_fXAA&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p><!--more-->Quelques photos du Mindstorms basket ball:</p>
<p><img class="alignnone size-medium wp-image-181" title="DSCN1776" src="http://ubik75.wordpress.com/files/2009/10/dscn1776.jpg?w=300" alt="DSCN1776" width="300" height="225" /></p>
<p><img class="alignnone size-medium wp-image-182" title="DSCN1780" src="http://ubik75.wordpress.com/files/2009/10/dscn1780.jpg?w=225" alt="DSCN1780" width="225" height="300" /></p>
<p>La télécommande au premier plan est composée d&#8217;un moteur et du bouton tactile.</p>
<p><img class="alignnone size-medium wp-image-183" title="DSCN1781" src="http://ubik75.wordpress.com/files/2009/10/dscn1781.jpg?w=225" alt="DSCN1781" width="225" height="300" /></p>
<p>Le panier de basket les points sont comptabilisés avec le capteur de lumière. Une partie compte 5 tirs, à la fin le score apparait sur l&#8217;écran de la brique.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[In case you're wondering...]]></title>
<link>http://jumpingjellybeansfll.wordpress.com/2009/09/28/in-case-youre-wondering/</link>
<pubDate>Mon, 28 Sep 2009 02:37:46 +0000</pubDate>
<dc:creator>jordy1588</dc:creator>
<guid>http://jumpingjellybeansfll.wordpress.com/2009/09/28/in-case-youre-wondering/</guid>
<description><![CDATA[Hello people! Welcome to the site of the First Lego League team The Jumping Jelly Beans. Here we sho]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hello people! Welcome to the site of the First Lego League team The Jumping Jelly Beans. Here we show our success tops and flops complete with picture, video, and maybe the once in a while sound file! So just put what you think and have fun!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Team Meeting Wrap-up  9/27/09]]></title>
<link>http://jumpingjellybeansfll.wordpress.com/2009/09/27/team-meeting-wrap-up-92709/</link>
<pubDate>Mon, 28 Sep 2009 00:17:34 +0000</pubDate>
<dc:creator>Buchman Richard</dc:creator>
<guid>http://jumpingjellybeansfll.wordpress.com/2009/09/27/team-meeting-wrap-up-92709/</guid>
<description><![CDATA[(Thank you Gretchen for writing this up..) Hi everyone, We had a good meeting today and it was nice ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>(Thank you Gretchen for writing this up..)</strong></p>
<p>Hi everyone,</p>
<p>We had a good meeting today and it was nice meeting with your children. For our first meeting we discussed some of the core values, and expectations of First Lego League. We emphasized the importance of working together as a team, and exhibiting &#8220;good behavior&#8221; by respecting ourselves and others. We watched a short video of different teams at a competition.</p>
<p><strong>Some core values to discuss with your child:</strong></p>
<p>1. We are a team.<br />
2. We do the work to find solutions with guidance from our coaches/mentors.<br />
3. We honor the spirit of friendly competition.<br />
4. What we discover is more important than what we win.<br />
5. We share our experiences with others.<br />
6. We display gracious professionalism in everything we do.<br />
7. We have fun.</p>
<p><strong>There are 2 separate challenge parts to Lego League; the <em>&#8220;Project&#8221;</em> and the <em>&#8220;Robot Game.&#8221;</em></strong> (The challenge is based on a set of real-world problems facing scientists and engineers today). In the Project, our team will research a real-world problem in the field of &#8220;Transportation,&#8221; create an innovative solution, and share their findings in their community. In the Robot Game our team will design, build, program, and test robots that must perform a series of tasks or missions. They will present both the Project and the Robot Game to judges in November when we go to the competition.</p>
<p>Today we also discussed the design for our team t-shirt and decided upon our team name. The children chose &#8220;Jumping Jellybeans&#8221; for the team name. For Homework we have asked the children to design a logo for the t-shirt. Have them bring their design for the t-shirt to our next meeting so we can vote on this.</p>
<p>Also, for homework have them <span style="text-decoration:underline;">identify a real-world problem in their community related to transportation</span>. <em>They should come to our next meeting ready to share their ideas and how they might solve this problem related to transportation</em>.</p>
<blockquote><p>For example, one group today came up with the idea of the problem of pick up time at High Peaks Elementary. They discussed the safety issues during this time of the day and the problems of the drive through pick up circle, and also how people speed down Aurora Ave. disobeying the speed limit when the yellow lights are flashing. We also discussed the transportation issues of shipping food across the country/world to grocery stores by trucks/boats/planes and all the fossil fuels it takes to do this. (The children can go to the FLL website for ideas).</p></blockquote>
<p><strong><span style="color:#003300;"><span style="color:#00ff00;">Thanks again to Mitra and her family for allowing us to use their home!</span> </span></strong></p>
<p><strong><span style="color:#003300;"> </span><span style="color:#ff0000;">Parents, we welcome your thoughts and ideas. Please spend time with your child going over this and have them bring their homework to our next meeting on Sunday Oct. 4th, at 3:30.</span></strong></p>
<p><strong><em>Next week we will begin to work with the Lego parts.</em></strong></p>
<p>We will schedule an outdoor break at each meeting for the kids so they can get their energy out.</p>
<p>If the weather is nice we can even hold a portion of the meeting outside.</p>
<p>Until then,</p>
<p>Gretchen, Sheryl, Rich, Lee, and Mitra</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
