<?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>
        Ok thank very much. It works now greatly. Once again thanks        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=4797</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=4797</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Kyle,&lt;br&gt;&lt;br&gt;Looks like you got it! I checked the VB and it seems to be functioning ok. If you run into issues on the receiving side you can try using&lt;br&gt;&lt;br&gt;SetVariable &quot;Locked&quot;, 0&lt;br&gt;&lt;br&gt;or &lt;br&gt;&lt;br&gt;SetVariable &quot;Locked&quot;, 1&lt;br&gt;&lt;br&gt;instead of true and false if you find that working with bools is not quite working correct. While NT supports bools, they may translate to ints (0 or 1) before you get them either in Java, C++, Labview, etc.&lt;br&gt;&lt;br&gt;Or are you still getting an error in the above code? Seems to work on the most recent RR version.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=4797</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=4797</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        here is the code. &lt;br&gt;&lt;br&gt;list = GetArrayVariable(&quot;BFR_COORDINATES&quot;)&lt;br&gt;if isArray(list) then&lt;br&gt;&amp;nbsp;&amp;nbsp;if ubound(list) &amp;gt; 0 then&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;targetPixelHeight = 0&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;targetSamples = 0&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; calibrated for an Axis camera&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imageHeight = GetVariable(&quot;IMAGE_HEIGHT&quot;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imageWidth = GetVariable(&quot;IMAGE_WIDTH&quot;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;centerX = imageWidth / 2&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cameraFieldOfView = 47.5&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;targetHeight = 31.0&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; grab list of coordinates from blob_replace&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; note the array is sorted by previous module in a specific order&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;righty = list(1)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rightyy = list(7)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lefty = list(3)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;leftyy = list(5)&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; based on these two side lines get the center line height&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; the center line is used since we want to aim to the center&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; of the target. This also removes any perspective distortion&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; where the right or left size may be a couple inches closer&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; or futher away from the camera&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;targetPixelHeight = ((lefty - leftyy) + (righty - rightyy)) / 2&lt;br&gt;&lt;br&gt;write targetPixelHeight &lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; we can use a known distance to determine FOV if we don&apos;t know it&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; measuredDistance = 10.0*12.0&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; write &quot;Calculated FOV &quot; &amp; (((atan((((targetHeight*imageHeight)/targetPixelHeight)/2)/measuredDistance)*2.0)*180.0)/3.14159) &amp; vbCRLF&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; determine distance in inches&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;totalDistance = (((targetHeight*imageHeight)/targetPixelHeight)/2)/tan(((cameraFieldOfView*3.14159)/180.0)/2.0)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SetVariable &quot;Distance&quot;, CInt((totalDistance*100)/12)/100&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; since we know the FOV of the camera we can simply scale the total field&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; of view into the pixel distance from center of screen to desired target&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;angleCenterX = (list(angleTo)+list(angleTo+2)+list(angleTo+4)+list(angleTo+6))/4&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&apos; we now know the center of the target X coordinate&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;angle = (cameraFieldOfView * (centerX - angleCenterX)) / imageWidth&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SetVariable &quot;Locked&quot;, true&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SetVariable &quot;Angle&quot;, CInt(angle*100)/100&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SetVariable &quot;Locked&quot;, false&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end if&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;Locked&quot;, false&lt;br&gt;end if&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=4797</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=4797</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Can you post your VBScript here or include your entire robofile for us to look at? We&apos;d just be guessing otherwise.&lt;br&gt;&lt;br&gt;Keep in mind that a boolean is just a zero or non-zero value so it can easily be emulated using a number.&lt;br&gt;&lt;br&gt;STeven.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=4797</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=4797</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Ok we are using the blob filter module but how would you do this with a Boolean? I am unfamiliar to vbscript and i keep getting syntax errors.&lt;br&gt;Thanks        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=4797</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=4797</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        Kyle,&lt;br&gt;&lt;br&gt;Yes, you can but it depends on how you are doing the tracking. For example, if you are using the blob replace module to generate the BFR_COORDINATES the test in the VBScript will check that this is an array or not. When something is in the way, tracking will be lost and this variable will not contain anything. So if you add an &quot;else&quot; to the if array statement you can zero out the distance variable that gets sent. For example:&lt;br&gt;&lt;br&gt;if isArray(list) then&lt;br&gt;&amp;nbsp;&amp;nbsp;if ubound(list) &amp;gt; 0 then&lt;br&gt;&lt;br&gt;... other stuff ....&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SetVariable &quot;/SmartDashboard/Distance&quot;, 0&lt;br&gt;&amp;nbsp;&amp;nbsp;end if&lt;br&gt;else&lt;br&gt;&amp;nbsp;&amp;nbsp;SetVariable &quot;/SmartDashboard/Distance&quot;, 0&lt;br&gt;end if&lt;br&gt;&lt;br&gt;which would set the Distance variable to zero when its not tracking. Then on your side, if you see this variable go to zero, you know that tracking is disabled ... this naturally assumes that the distance is never a true distance of zero which is reasonable since the camera would not be seeing the target if it were in fact 0 inches from the target.&lt;br&gt;&lt;br&gt;If you are using the Target_Localization module, that will remove the variables (you can assume it to also be zero) when tracking fails.&lt;br&gt;&lt;br&gt;Does this help?&lt;br&gt;&lt;br&gt;STeven.&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=4797</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=4797</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>Alerting when locked on - FRC image tracking</title>
        <description>
        Is there a way to get a message back to the smart dashboard saying that we are currently tracking distance to the goal. For example, if a robot or something is blocking our view can we get a signal saying that we are currently not tracking and to not use the data. Thanks        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=4797</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=4797</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
</channel>
</rss>
