<?xml version="1.0" encoding="ISO-8859-1" ?><rss version="2.0">
<channel>
    <title>RoboRealm Forum</title>
    <link>http://www.RoboRealm.com/</link>
    <description>The newest forum threads.</description>
    <lastBuildDate>Tue, 30 Nov 1999 00:11:00 EST</lastBuildDate>
    <language>en-us</language>
    <copyright>Copyright: (C) RoboRealm, http://www.RoboRealm.com/</copyright>
    <docs>http://www.RoboRealm.com/</docs>

    <item>
        <title>No Title</title>
        <description>
        Hi Steve, &lt;br&gt;&lt;br&gt;Please find the script with my post. I want roborealm to check if it sees a rotating color ring (Red -Green -Blue ), it has to track colors starting and ending with red. So i have made changes to the code which was on the portal. if tracks red for 2 second then green for 2 second so on. I am adding colors to an array, 1, 2,3..I will process the array and find out that it got the RGBR color rotating ring. I am not sure that my logic is correct. Please guide me if i am on the wrong track&lt;br&gt;&lt;br&gt;int period = 2000;&lt;br&gt;int step = getVariable(&quot;step&quot;);&lt;br&gt;int cogx = getVariable(&quot;cog_x&quot;);&lt;br&gt;int cogy = getVariable(&quot;cog_y&quot;);&lt;br&gt;int red = getVariable(&quot;MEAN_COLOR_R&quot;);&lt;br&gt;int blue = getVariable(&quot;MEAN_COLOR_B&quot;);&lt;br&gt;int green = getVariable(&quot;MEAN_COLOR_G&quot;);&lt;br&gt;int cog_bx =getVariable(&quot;COG_BOX_SIZE&quot;);&lt;br&gt;&lt;br&gt;int arr[];&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;br&gt;if (step == 0)&lt;br&gt;{&lt;br&gt;&lt;br&gt;if(red &amp;gt; 10 &amp;&amp; cog_bx &amp;gt; 70){&lt;br&gt;&amp;nbsp;&amp;nbsp;setVariable(&quot;data&quot;, 2);&lt;br&gt;&amp;nbsp;&amp;nbsp;setVariable(&quot;step&quot;, 1);&lt;br&gt;&amp;nbsp;&amp;nbsp;setTimedVariable(&quot;step&quot;, 2, period);&lt;br&gt;&amp;nbsp;&amp;nbsp;arr[0]=1;&lt;br&gt; }&lt;br&gt; &lt;br&gt; else { &lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt; setVariable(&quot;step&quot;, 0);&lt;br&gt; }&lt;br&gt; &lt;br&gt;}&lt;br&gt;else &lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;if (step == 2)&lt;br&gt;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;if(green &amp;gt; 10 &amp;&amp; cog_bx &amp;gt; 70){&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setVariable(&quot;data&quot;, 4);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setVariable(&quot;step&quot;, 3);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setTimedVariable(&quot;step&quot;, 4, period);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arr[1]=2 ;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setVariable(&quot;step&quot;, 0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;if (step == 4)&lt;br&gt;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;if(blue &amp;gt; 10 &amp;&amp; cog_bx &amp;gt; 70){&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setVariable(&quot;data&quot;, 6);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setVariable(&quot;step&quot;, 5);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setTimedVariable(&quot;step&quot;, 0, period);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arr[2]= 3 ;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setVariable(&quot;step&quot;, 0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&lt;br&gt;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3315</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3315</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        This thread continued here&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.roborealm.com/forum/index.php?thread_id=3327#&quot; target=&quot;_blank&quot;&gt;http://www.roborealm.com/&lt;wbr&gt;forum/&lt;wbr&gt;index.php?thread_&lt;wbr&gt;id=3327#&lt;/a&gt;&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3315</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3315</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Hey, &lt;br&gt;&lt;br&gt;I did tried the way you showed me. However, when I add the new object and a blob filter, the destination is automatically set to be the new obejct, althogu i did not grab the initial one. The last thing i added is an if statement, which will do apply the new filter to find the place_x and place_y and set them as final destination but only if the state is 10, meaning that the object is already grabbed. &lt;br&gt;&lt;br&gt;I will include the robo file. And one more question. Why does not the state show as a variable at the VbScript module? &lt;br&gt;&lt;br&gt;Thank you in advance.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3315</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3315</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Dario,&lt;br&gt;&lt;br&gt;I&apos;m not sure you have the syntax correct. It would be more like&lt;br&gt;&lt;br&gt;ball_x = GetVariable(&quot;place_x&quot;)&lt;br&gt;&lt;br&gt;and then you NEED to have&lt;br&gt;&lt;br&gt;SetVariable &quot;ball_x&quot;, ball_x&lt;br&gt;&lt;br&gt;in order to save the value from the VBScript module to a RR variable that can be used in other modules (like the path planning).&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3315</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3315</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Hello,&lt;br&gt;&lt;br&gt;I think i did not get the solution you purposed. For the time being, I am using [ball_x] and [ball_y] as destination. When i reached it and grab it, i need to set new destination. I tried setting ball_x = GetVariable[place_x], but it actually did not work. What am i doing wrong?&lt;br&gt;&lt;br&gt;Thank you again for the fast reply.&lt;br&gt;&lt;br&gt;Dario        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3315</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3315</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        You can specify variables for the destination in your current path_planning module just by using the [variable] nomenclature. Thus once the ball has been captured you would need to update the destination variables with the new location and then follow the path planning orientation again. There is no need for a second path planning module as using a variable allows you to change that destination. I.e. where you type in a number use [your_variable_name] instead.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3315</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3315</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Hello.&lt;br&gt;&lt;br&gt;The SetTimedVariable method you showed me, works perfectly. However, I have one more question. Mentioned previously, I have an NXT trying to reach and catch an object. After that, has to realease it on the specific place. At the beggining the destination is the object, but as soon as the robot catches it, i need to set the new destination. How this can be done? I was thinking of including another Path_Planning module but it does not make sense.&lt;br&gt;&lt;br&gt;Thank you in advance.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3315</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3315</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Your basic technique is correct except that when the SetTimedVariable function gets called each time (since step nor step1 are not yet &amp;lt;&amp;gt; 0) the function will reset the timing to change the variable.&lt;br&gt;&lt;br&gt;So if you use&lt;br&gt;&lt;br&gt;SetTimedVariable &quot;step&quot;, 2, 1000&lt;br&gt;&lt;br&gt;to set the variable step to 2 in about 1 second but instead call the same function again BEFORE 1 second has passed that will reset the timer to +1 second from that point. Thus because you call the function each time in the VBScript module it never has a chance to trigger.&lt;br&gt;&lt;br&gt;So instead what you need to do is something like&lt;br&gt;&lt;br&gt;select case GetVariable(&quot;state&quot;)&lt;br&gt;&lt;br&gt;case 0:&lt;br&gt;period = 2000&lt;br&gt;SetTimedVariable &quot;state&quot;,2,period&lt;br&gt;SetVariable &quot;state&quot;, 1&lt;br&gt;&lt;br&gt;case 1:&lt;br&gt;&apos; literally do nothing while waiting for SetTimedVariable to trigger&lt;br&gt;case 2:&lt;br&gt;// ok continue on by stopping motor,etc.&lt;br&gt;&lt;br&gt;end select&lt;br&gt;&lt;br&gt;I&apos;d recommend just using one variable &quot;state&quot; and multiple case statements rather than confusing things with more &quot;step&quot; variables.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3315</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3315</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>SetTimedVariable</title>
        <description>
        Hello,&lt;br&gt;&lt;br&gt;I am using the SetTimedVariable to turn a motor for certain period of time. THe scenario is something like the Lego Grabber tutorial. I open first the hand, allow the motor to spin for 2000 miliseconds and then via switch change the stage. However, when i approach the object I want to do the same action but in the opposite direction. I copy the code a little of modifications and does not work. I keeps on spining forever. What is the problem? I will include the code. Maybe I need to use the Timer() which gives me a starting value of something like 65000 seconds which I whatsoever do not have a clue.&lt;br&gt;&lt;br&gt;Thank you in advance.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3315</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3315</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
</channel>
</rss>
