<?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>
        Tim,&lt;br&gt;&lt;br&gt;Ok, so do I understand you correctly. You want to track 3 object at the same time and then use the position of those 3 objects in a position calculation? the above code was meant to record a single COG_BOX_SIZE over time ... if you want 3 COG_BOX_SIZE at the same time you need to use 3 instances of the Center of Gravity module followed by a Set_Variable module to rename COG_BOX_SIZE to some other temp variable (say box1) in order for the next COG module not to override it. Just before each COG module you probably would want to use the Marker module to restore the image to the original pixels such that you can reprocess it for another object. For example, your pipeline would look something like&lt;br&gt;&lt;br&gt;RGB Filter red&lt;br&gt;COG&lt;br&gt;Set_Variable box1 = COG_BOX_SIZE&lt;br&gt;Marker (restore to original)&lt;br&gt;RGB Filter blue&lt;br&gt;COG&lt;br&gt;Set_Variable box2 = COG_BOX_SIZE&lt;br&gt;Marker (restore to original)&lt;br&gt;RGB Filter green&lt;br&gt;COG&lt;br&gt;Set_Variable box3 = COG_BOX_SIZE&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        ist = GetArrayVariable(&quot;cogs&quot;)&lt;br&gt;&lt;br&gt;ReDim list(ubound(list)+1)&lt;br&gt;&lt;br&gt;list(ubound(list)) = GetVariable(&quot;COG_BOX_SIZE&quot;)&lt;br&gt;&lt;br&gt;SetArrayVariable &quot;cogs&quot;, list &lt;br&gt;&lt;br&gt;Needs to be added again as i took it out.&lt;br&gt;&lt;br&gt;My code rotates depending on COG_X and moves fwd and back depending on COG_BOX_SIZE.&lt;br&gt;&lt;br&gt;The rest uses the formulas that calculate the co-ordinates of the robot against 3 fixed set point.&amp;nbsp;&amp;nbsp;The r1, r2 and r3 values i want to be able to calculate autonomously by working 3 distances by 3 stored COG_BOX_SIZE objects&lt;br&gt;&lt;br&gt;Here it is...&lt;br&gt;&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Tim, if you post your robofile here with what you have so far we can help you get that running ... without a context the above is the best we can offer. Integrating that into your script should just require a name change of the variable array you are creating and perhaps the COG_BOX_SIZE if you are renaming that variable ...&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Yeah i was looking at the array function, im not swept up on Vbscript but i have been looking in the microsoft library&lt;br&gt;&lt;br&gt;If i put this in my script i get the cogs variable created but no data ever goes in it.&lt;br&gt;&lt;br&gt;Ive read up on everything u have mentioned, am i missing another module or do i need to change some names?&lt;br&gt;&lt;br&gt;I only want to store 3 COG_BOX_SIZES and the rest my script can be altered no problem        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        I assume that by record you mean just keep in memory? How about this code in a VBScript module:&lt;br&gt;&lt;br&gt;list = GetArrayVariable(&quot;cogs&quot;)&lt;br&gt;&lt;br&gt;ReDim list(ubound(list)+1)&lt;br&gt;&lt;br&gt;list(ubound(list)) = GetVariable(&quot;COG_BOX_SIZE&quot;)&lt;br&gt;&lt;br&gt;SetArrayVariable &quot;cogs&quot;, list&lt;br&gt;&lt;br&gt;which would create an ever increasing array called cogs that has all the values in it.&lt;br&gt;&lt;br&gt;Alternatively you could also use the Write_Variable module to write the value for each frame to disk ...but that would require another app to open and process it.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        I have 15 now, i have no explanation for this but after a full days fault finding, i needed to change the physical com port setting from COM 5 to COM 7.&amp;nbsp;&amp;nbsp;This then works, cant seem to find an explanation after looking around but it has fixed the problem!&lt;br&gt;&lt;br&gt;One last thing (3 days to go!!) &lt;br&gt;&lt;br&gt;For my triangulation, that works when i fix the variables, is there anyway you can think to rotate the robot (I know the command to rotate) and record the COG_BOX_SIZE values of 3 blue fixed circles located at 3 fixed points?&lt;br&gt;&lt;br&gt;I cant think how the script can be wrote so it knows when to record a COG_BOX_SIZE while rotating never mind 3 COG_BOX_SIZES.&lt;br&gt;&lt;br&gt;Thanks for all your help by the way, peace in 3 days!&lt;br&gt;i can send you the completed .robo file if you want it for any further issues like mine&lt;br&gt;&lt;br&gt;Tim&lt;br&gt;&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Tim,&lt;br&gt;&lt;br&gt;Check the frame rate of the dell before executing the pipeline. Most likely the camera is not getting enough light and causes the pipeline to be really slow.&lt;br&gt;&lt;br&gt;Also have a look at the FAQ surrounding this issue:&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.roborealm.com/FAQ.php#q20&quot; target=&quot;_blank&quot;&gt;http://www.roborealm.com/&lt;wbr&gt;FAQ.php#q20&lt;/a&gt;&lt;br&gt;&lt;br&gt;We tried your robofile from above and get about 12 fps on the Mini-Dell netbook. What fps are you getting?&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Any ideas why my program works fine on my laptop at 640 x 480 and then why i transfer the program too my mini dell laptop so it can sit on my robot is really struggles to process filtered image?&lt;br&gt;&lt;br&gt;Is it just a RAM issue, i.e the 1GB difference as on the mini i have halved the resolution and still to no avail        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Thats exactly what i have done, as soon as the ball is within 40cm i display distance as N/A as i do also when there is no COG measurement.&amp;nbsp;&amp;nbsp;&lt;br&gt;&lt;br&gt;It also rotates both ways depending on the COG X value and moves back and forth depending on the COG SIZE measurement.&lt;br&gt;&lt;br&gt;I also have added a localization co-ordinate equation based on the distance from 3 fixed points by using the COG SIZE to calculate distance using my 5th order polynomial equation.&lt;br&gt;&lt;br&gt;Unfortunately i have to input the distances manually as i cant think of a way to make the robot rotate and pick out the 3 objects in its 360 degrees vision and record COG SIZE.&amp;nbsp;&amp;nbsp;But it achieves localization and displays.&amp;nbsp;&amp;nbsp;It also displays the distance to the ball.&lt;br&gt;&lt;br&gt;All in all a success, be it not perfect!        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Tim,&lt;br&gt;&lt;br&gt;Yes, that is a common problem as you approach the camera the object will start to get darker as it will shades the camera. You could increase the lighting shining from directly behind the camera but this will cause the object to become more white as it approaches the camera. Any possibility not to move the object so close?&lt;br&gt;&lt;br&gt;Also, we&apos;re assuming a lot here on what the image looks like. If the above doesn&apos;t seem to make sense post an image of when the COG gets lost and we can better suggest a possibility.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Ill answer my own question, that worked fine!&lt;br&gt;&lt;br&gt;The only trouble is when my object is very close to the camera it wont pick it up properly hence no COG measurements so it stops my distance calc working.&amp;nbsp;&amp;nbsp;Have you seen this before and is there anything i can introduce for it??        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        That works great for anyone following this thread!&amp;nbsp;&amp;nbsp;&lt;br&gt;&lt;br&gt;Last question and im happy with my progress, for my triangulation i have worked out the correct maths on paper.&amp;nbsp;&amp;nbsp;Works a treat.&lt;br&gt;&lt;br&gt;My equation states to work out my &lt;br&gt;x coord = (r1^2-r2^2+d^2)/(2*d)&lt;br&gt;and for my &lt;br&gt;y coord = ( (r1^2-r3^2+i^2+j^2)/(2*j) ) - (i/j)*x&lt;br&gt;&lt;br&gt;This gives me my correct values.&amp;nbsp;&amp;nbsp;For short term im going to set my variables as fixed numbers so say&lt;br&gt; &lt;br&gt;Set Variable &quot;r1&quot;, 2&lt;br&gt;Set Variable &quot;r2&quot;, 4&lt;br&gt;&lt;br&gt;Does this seem ok and is the above equations in the correct format for VBscript??&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Tim,&lt;br&gt;&lt;br&gt;Opps, my bad, mx is meant to be 1/2 of the width of the image as in &quot;middle x&quot;. Please correct the line to read&lt;br&gt;&lt;br&gt;mx = GetVariable(&quot;IMAGE_WIDTH&quot;) / 2&lt;br&gt;&lt;br&gt;i.e. add the /2.&lt;br&gt;&lt;br&gt;That should help!&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        THANKS&lt;br&gt;&lt;br&gt;That is some read!&lt;br&gt;&lt;br&gt;Ive more or less cracked distance i think.&lt;br&gt;&lt;br&gt;Below is my other script as suggested by you with a tweak or two.&amp;nbsp;&amp;nbsp;As i said, as mx is always 640, x is never greater than mx +30, so never gets past the first line, which works fine by the way.&amp;nbsp;&amp;nbsp;How can i get it to do what i am trying to do?&lt;br&gt;&lt;br&gt;x = GetVariable(&quot;COG_X&quot;)&lt;br&gt;&lt;br&gt;s = GetVariable(&quot;COG_BOX_SIZE&quot;)&lt;br&gt;&lt;br&gt;mx = GetVariable(&quot;IMAGE_WIDTH&quot;)&lt;br&gt;&lt;br&gt;if x &amp;lt; mx - 30 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(127)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(255)&amp;chr(128)&lt;br&gt;elseif x &amp;gt; mx + 30 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(078)&amp;chr(255)&amp;chr(248)&amp;chr(128)&amp;chr(128)&amp;chr(255)&amp;chr(128)&lt;br&gt;elseif s &amp;gt; 150 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(124)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(252)&amp;chr(128)&amp;chr(128)&lt;br&gt;elseif s &amp;lt;80 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(168)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(040)&amp;chr(128)&amp;chr(128)&lt;br&gt;else&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(000)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(128)&lt;br&gt;end if &lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks Steven        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Tim,&lt;br&gt;&lt;br&gt;Correct. Sorry for the confusion, IMAGE_WIDTH and IMAGE_HEIGHT are the dimensions of the webcam image and not the object in question. Yes, you have the technique correct, you can use the COG_SIZE to calculate the distance to an object. You can determine this by sampling at various intervals the size and distance of the ball.&lt;br&gt;&lt;br&gt;Keep in mind that the curve is an exponential one of the form y = a(x^b) where ^ means x to the power of b.&lt;br&gt;&lt;br&gt;You can read more about that on page 70 of&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://millrace.uoregon.edu/kinpubs/elecprod/PE4748Modi(18-2).pdf&quot; target=&quot;_blank&quot;&gt;http://millrace.uoregon.edu/&lt;wbr&gt;kinpubs/&lt;wbr&gt;elecprod/&lt;wbr&gt;PE4748Modi(18-&lt;wbr&gt;2).pdf&lt;/a&gt;&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        I realise the image width and height is now the resolution set by the camera.&lt;br&gt;So obv with the above in mind, the image size is always greater than the ball size so only triggers the one movement of my robot.&lt;br&gt;&lt;br&gt;I also have realised i am trying to over complicate things and i just want the distance of the ball displayed on the screen.&amp;nbsp;&amp;nbsp;Thinking more about it, if i create a table so that say COG_SIZE is looked at&lt;br&gt;&lt;br&gt;If it is 10-20 the ball is set 10cm away&lt;br&gt;&lt;br&gt;If it is 20-30 the ball is set 20cm away&lt;br&gt;&lt;br&gt;If it is 30-40 the ball is set 30cm away&lt;br&gt;&lt;br&gt;do you think this would work as i have 5 days to nail this (No pressure!)        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Also i want too display on screen a variable telling me how far away the object is.&amp;nbsp;&amp;nbsp;I presuming i need a little vbscript to do this, would this be related to above and i would use the variable &quot;image height&quot; and do a little calculation, as that stays at the same value also.&lt;br&gt;&lt;br&gt;Thanks        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Yes i agree that is simpler.&amp;nbsp;&amp;nbsp;I understand what you have said.&lt;br&gt;&lt;br&gt;When i run this script, the image width never changes, value is always 640 so not a lot happens.&lt;br&gt;&lt;br&gt;But in the first instance because x is always &amp;lt;mx +30 as it never changes from 640 it works great.&lt;br&gt;&lt;br&gt;Am i missing something as i presume the image width should change as i move the ball towards the camera        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Tim,&lt;br&gt;&lt;br&gt;One problem at a time ...&lt;br&gt;&lt;br&gt;I&apos;d probably simpify the logic a little and make the robot turn and when within range then move forward/backward. (Also remember that &amp; is a bitwise operator as apposed to &apos;AND&apos; in basic) This logic would be a little easier to test.. something like:&lt;br&gt;&lt;br&gt;x = GetVariable(&quot;COG_X&quot;)&lt;br&gt;s = GetVariable(&quot;COG_BOX_SIZE&quot;)&lt;br&gt;&lt;br&gt;mx = GetVariable(&quot;IMAGE_WIDTH&quot;)&lt;br&gt;&lt;br&gt;if x &amp;lt; mx - 30 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(231)&amp;chr(255)&amp;chr(248)&amp;chr(128)&amp;chr(128)&amp;chr(096)&amp;chr(128)&lt;br&gt;elseif x &amp;gt; mx + 30 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(032)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(160)&amp;chr(128)&lt;br&gt;elseif s &amp;gt; 150 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(124)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(252)&amp;chr(128)&amp;chr(128)&lt;br&gt;elseif s &amp;lt;50 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(168)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(040)&amp;chr(128)&amp;chr(128)&lt;br&gt;else&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(000)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(128)&lt;br&gt;end if&lt;br&gt;&lt;br&gt;&lt;br&gt;Note that you had incorrectly used&lt;br&gt;&lt;br&gt;if size &amp;lt; 50 &amp; dist &amp;gt; 50 then&lt;br&gt;&lt;br&gt;which should be&lt;br&gt;&lt;br&gt;if size &amp;lt; 50 and dist &amp;gt; 50 then&lt;br&gt;&lt;br&gt;and I think you also confused size and dist ... I think they should have been the other way around. Thus our change of those vars just to be sure.&lt;br&gt;&lt;br&gt;Note the usage of 60 pixels around the middle of the screen (note that middle is width/2 and most likely NOT 50) to allow the robot to move forward/backward. If this is too big then reduce that size.&lt;br&gt;&lt;br&gt;STeven.&lt;br&gt;&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        And just to really get my moneys worth ha&lt;br&gt;&lt;br&gt;Triangulation i mentioned - i have been looking at the documentation on Calculate distance.&amp;nbsp;&amp;nbsp;Im thinkin if i have 2 fixed objects then if i can calculate the distance of them, i.e a triangle and a square then somehow (Not quite thought beyond this bit yet!) i can work out how far my robot is relative to the 2 objects?&lt;br&gt;&lt;br&gt;Am i flying down the wrong path??        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        size= GetVariable(&quot;COG_X&quot;)&lt;br&gt;dist= GetVariable(&quot;COG_BOX_SIZE&quot;)&lt;br&gt;&lt;br&gt;if size &amp;lt; 50 &amp; dist &amp;gt; 50 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(231)&amp;chr(255)&amp;chr(248)&amp;chr(128)&amp;chr(128)&amp;chr(096)&amp;chr(128)&amp;chr(124)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(252)&amp;chr(128)&amp;chr(128)&lt;br&gt;elseif size &amp;gt; 150 &amp; dist &amp;lt; 50 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(032)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(160)&amp;chr(128)&amp;chr(168)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(040)&amp;chr(128)&amp;chr(128)&lt;br&gt;elseif size &amp;gt; 150 &amp; dist &amp;gt; 50 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(032)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(160)&amp;chr(128)&amp;chr(124)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(252)&amp;chr(128)&amp;chr(128)&lt;br&gt;elseif size &amp;lt;50 &amp; dist &amp;lt;50 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(231)&amp;chr(255)&amp;chr(248)&amp;chr(128)&amp;chr(128)&amp;chr(096)&amp;chr(128)&amp;chr(168)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(040)&amp;chr(128)&amp;chr(128)&lt;br&gt;else&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(000)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(128)&lt;br&gt;end if&lt;br&gt;&lt;br&gt;&lt;br&gt;Does this look ok?&amp;nbsp;&amp;nbsp;I dont get errors when running it but the move variable does not seem to change on ball movement&lt;br&gt;&lt;br&gt;Note&lt;br&gt;&lt;br&gt;chr(000)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(128) = Neutral&lt;br&gt;chr(231)&amp;chr(255)&amp;chr(248)&amp;chr(128)&amp;chr(128)&amp;chr(096)&amp;chr(128) = Left&lt;br&gt;chr(032)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(160)&amp;chr(128) = Right&lt;br&gt;chr(124)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(252)&amp;chr(128)&amp;chr(128) = Back&lt;br&gt;chr(168)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(040)&amp;chr(128)&amp;chr(128) = Fwd&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        &lt;br&gt;Tim,&lt;br&gt;&lt;br&gt;Yes, that can work, using both the box_size and the X you can create more complex movements. Just string them along in ONE SetVariable statement such that the serial module gets all those bits together. Note that programming motion control code is tricky ... so be patient and if things get too confusing break it down into simple trial cases (i.e. north, south, east, west and then add northeast, northwest, etc.) but, again, always be sure to keep appending the bits as apposed to overwriting them.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        I see the change now, you have added the 7 bits onto the 7 bits but obv i have left&lt;br&gt;right&lt;br&gt;nothing (neutral)&lt;br&gt;&lt;br&gt;and the 2nd 7 is &lt;br&gt;forward&lt;br&gt;back&lt;br&gt;&lt;br&gt;Therefore say &amp;lt;50 i have it above moving left (always) and backwards but that wont always be the case as it could be left and forwards.&amp;nbsp;&amp;nbsp;So this wont fix my variable problem??&lt;br&gt;&lt;br&gt;Can i do something along the lines of making a new variable distance based on COG_BOX_SIZE as well as one based on COG_X&lt;br&gt; if size&amp;lt;50 and distance&amp;lt;100 then.....&lt;br&gt;move left and back.&lt;br&gt;If size&amp;lt;50 and distance&amp;gt;100 then..... &lt;br&gt;move left and fwd&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks for your help&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        I have viewed your new script (below)&lt;br&gt;&lt;br&gt;size= GetVariable(&quot;COG_X&quot;)&lt;br&gt;if size &amp;lt; 50 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(231)&amp;chr(255)&amp;chr(248)&amp;chr(128)&amp;chr(128)&amp;chr(096)&amp;chr(128)&amp;chr(124)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(252)&amp;chr(128)&amp;chr(128)&lt;br&gt;elseif size&amp;gt;150 then&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(032)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(160)&amp;chr(128)&amp;chr(124)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(252)&amp;chr(128)&amp;chr(128)&lt;br&gt;else&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;Move&quot; , chr(000)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(128)&lt;br&gt;end if&lt;br&gt;&lt;br&gt;did i not already have this??&lt;br&gt;&lt;br&gt;That will move the robot left, right or stay stil depending on the COG_X value.&amp;nbsp;&amp;nbsp;I want it to move back and forward depending on COG_BOX_SIZE as well as left, right.&amp;nbsp;&amp;nbsp;Thus 2 commands sent serially so if the COG_X produces A and COG_BOX_SIZE produces B, i need to send A and B.&lt;br&gt;&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Tim,&lt;br&gt;&lt;br&gt;thanks for the robofile as that helped us determine what the issue might be. In your VBScript file you had set two &quot;Move&quot; variables depending on the distance. The first SetVariable would set Move and the second SetVariable would then reset Move to the new code overwriting the first SetVariable. That doesn&apos;t work very well since the first part is just lost. A better way to do it is to make the Move variable contain both commands simply by appending on onto the other using an &apos;&amp;&apos;. Note that the way this works is that the Move command is not used until the serial module is encountered so you can set and reset the Move variable as many times as you want in the VBScript module without it effecting anything ... the only valid value of Move would be what it happens to be once the VBScript module ends and the Serial module starts. (Keep in mind that modules are run one after another and not all simultaneously).&lt;br&gt;&lt;br&gt;Attached is the tweaked robofile. Can you try that and see if that works better?&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        And on top of the above&lt;br&gt;&lt;br&gt;I am thinking of being able to localize my robot once i have cracked the above.&amp;nbsp;&amp;nbsp;Triangulation etc&lt;br&gt;&lt;br&gt;Any ideas on how i can go about this, i was obviously thinking 3 objects, maybe 2 other coloured balls to go with my blue.&amp;nbsp;&amp;nbsp;But how can i process the info to get the position of my robot relative to the objects?&lt;br&gt;&lt;br&gt;initial ideas would be rotating to view the 3 objects and working out the distance and then somehow calculating the positon of the camera?&lt;br&gt;&lt;br&gt;Or maybe using 2 cameras, facing front and back and calculate ??&lt;br&gt;&lt;br&gt;just wondered if you had any ideas as obviously my project is based on your software.&lt;br&gt;&lt;br&gt;Thanks        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Hi Steven&lt;br&gt;&lt;br&gt;Attached is my robo.file&lt;br&gt;&lt;br&gt;I have attached a H3R lynxmotion robot with a serial command set instead of the PS2 controller.&amp;nbsp;&amp;nbsp;I have hijacked the code so if i send for example &lt;br&gt;&lt;br&gt;chr(231)&amp;chr(255)&amp;chr(248)&amp;chr(128)&amp;chr(128)&amp;chr(096)&amp;chr(128)&amp;chr(13)&lt;br&gt;&lt;br&gt;this makes the robot rotate till my blue ball is back in the centre of the camera.&lt;br&gt;&lt;br&gt;I am happy the codes work.&amp;nbsp;&amp;nbsp;So the vbscript attached rotates the robot depending on the COG_X which is great.&amp;nbsp;&amp;nbsp;However at the moment using the COG_BOX_SIZE i want eventually to get the robot to walk upto or away from the ball depending on distance.&amp;nbsp;&amp;nbsp;My problem is unless the move variable is in &lt;br&gt;&lt;br&gt;chr(000)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(13) in which case i just send my data worked out by the latter half of the vbscript to my move variable.&amp;nbsp;&amp;nbsp;But if the move is in any off the other 2 states, obviously the latter info is not sent.&lt;br&gt;&lt;br&gt;Can you advice a way around as it works exactly how i want it, just need more than one variable outputted serially.&lt;br&gt;&lt;br&gt;Thanks for your time        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        What is in your serial module? I.e. what is the send sequence text?&lt;br&gt;&lt;br&gt;Perhaps you could include your entire robofile?&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Quick note to above&lt;br&gt;&lt;br&gt;If i change the 3rd line of the box size variable SetVariable Move etc and remove the next line else... then it overwrites whatever the move variable is doing but if there is a better way id appreciate a nudge in that direction!!        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        size= GetVariable(&quot;COG_X&quot;)&lt;br&gt;SetVariable &quot;Move&quot; , chr(000)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(13)&lt;br&gt;if size &amp;lt; 80 then&lt;br&gt;SetVariable &quot;Move&quot; , chr(231)&amp;chr(255)&amp;chr(248)&amp;chr(128)&amp;chr(128)&amp;chr(096)&amp;chr(128)&amp;chr(13)&lt;br&gt;elseif size&amp;gt;120 then&lt;br&gt;SetVariable &quot;Move&quot; , chr(032)&amp;chr(255)&amp;chr(255)&amp;chr(128)&amp;chr(128)&amp;chr(160)&amp;chr(128)&amp;chr(13)&lt;br&gt;end if&lt;br&gt;&lt;br&gt;Distance=GetVariable(&quot;COG_BOX_SIZE&quot;)&lt;br&gt;if Distance &amp;gt;40 then&lt;br&gt;SetVariable&quot;Distance&quot;,chr(064)&amp;chr(255)&amp;chr(191)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(128)&amp;chr(13)&lt;br&gt;else SetVariable &quot;Distance&quot;, chr(000)&amp;chr(13)&lt;br&gt;end if&lt;br&gt;&lt;br&gt;This is my basic code, i tried ur solution.&amp;nbsp;&amp;nbsp;If i am at any stage apart from inbetween 80 and 120 on the move variable (ie do nothing) then no matter if the distance is &amp;gt;40 it wont send the command while the move variable is kicking out a signal.&lt;br&gt;&lt;br&gt;Is there an easy solution as they both work exactly how i want individually!&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Yes, you could do that but it would probably be better just to append the second movement to a single variable. In other words after you&apos;ve used the chr(x) for the first sequence use a chr(13) which is what a &amp;lt;cr&amp;gt; translates to and then continue with the next sequence. In that way your serial interface is just a single variable. The reason this is better is that if your second variable is not used then a extra &amp;lt;cr&amp;gt; would be printed for no reason.&lt;br&gt;&lt;br&gt;Also note that your hardware needs to support this kind of sequence. If the hardware waits on one command before executing the next then this will also not work very well. Sometimes you&apos;ll have to use single a diagonal command in order to move left and forward ... but that will be revealed by the above test.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        That is fantastic!!!!!!&lt;br&gt;Thanks a lot.&lt;br&gt;Just one more thing and im all done for now..........&lt;br&gt;If the variable left above moves it left and right, if i need to move it fwd and back as well, how do i send 2 lots of info?&lt;br&gt;&lt;br&gt;Do i just add the variables in the send sequence window with a &amp;lt;cr&amp;gt; between them?        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Tim,&lt;br&gt;&lt;br&gt;The variables are not processed in the same way as the direct text. I.e. it is assumed that the actual value to be sent is contained in the variable. Thus you have to use the direct binary values in the variable in order for it to send out binary values. For example use ...&lt;br&gt;&lt;br&gt;SetVariable &quot;Left&quot;, chr(231) &amp; chr(255) &amp; chr(248) .... etc.&lt;br&gt;&lt;br&gt;as apposed to the hex \\ denotation. The hex denotation is used since it is very difficult to type in binary characters into the text area ... but constructing a binary variable is not (relatively speaking).&lt;br&gt;&lt;br&gt;Hope this helps ...&lt;br&gt;&lt;br&gt;Thanks for the donation!&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Im in a rut now!!!&lt;br&gt;&lt;br&gt;I am currently using a lynxmotion HR3 robot which is a 6 legged hexapod with a basic atom running the PS remote code from serial commands.&amp;nbsp;&amp;nbsp;It put double backslash above but single sends codes in the serial console and my robot responds either with movement or action (AS predefined in the basic atom code).&lt;br&gt;&lt;br&gt;All i want to establish is that when the COG value is less or greater than a number the hex 7 digit code to make it move left or right is sent serially to my robot.&amp;nbsp;&amp;nbsp;I am trying to do this as above using a Variable &quot;Left&quot;.&lt;br&gt;&lt;br&gt;Is this the best way as i have been trying for about 2 week now to no avail at all.&amp;nbsp;&amp;nbsp;How should i create a variable and how should i include it in the Send Sequence box?&amp;nbsp;&amp;nbsp;Or can i write the direct serial command out into a VbScript.&lt;br&gt;&lt;br&gt;Please advice as anything might just stop me throwing my laptop and robot out the window!!!!&lt;br&gt;&lt;br&gt;Thanks        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>Serial Sequence</title>
        <description>
        In the serial communications console area i am sending the code&lt;br&gt;&lt;br&gt;\\x10\\xff\\xef\\x80\\x80\\x80\\x80&lt;br&gt;&lt;br&gt;This simulates a triangle button, works correct.&lt;br&gt;&lt;br&gt;I have created a mini vBscript &lt;br&gt;&lt;br&gt;size=GetVariable(&quot;COG_X&quot;)&lt;br&gt;if size &amp;lt; 100 then&lt;br&gt;SetVariable &quot;Left&quot;, &quot;\\xe7\\xff\\xf8\\x80\\x80\\x60\\x80&quot;&lt;br&gt;else&lt;br&gt;SetVariable &quot;Left&quot;, &quot;\\x20\\xff\\xff\\x80\\x80\\xa0\\x80&quot;&lt;br&gt;end if&lt;br&gt;&lt;br&gt;This changes the variable Left when i move the blue ball in front of camera so all good there&lt;br&gt;&lt;br&gt;In the sequence window of the serial i add my variable Left and it doesnt send out either of the strings above, totally different data.&lt;br&gt;&lt;br&gt;I presume this is a conversion issue but i have tried different formats of the data and i am struggling to get the correct sequence data to output.&lt;br&gt;&lt;br&gt;Any help please??        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=3282</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=3282</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
</channel>
</rss>
