FRC Tracking 2013
Roberto from Mexico  [2 posts]
5 years

I am using the tracking program tutorial to detect the distance from the robot to the target. This part is perfectly fine, but I would also like the robot to detect the height of the rectangle detected, from the robot's perspective. For example, rectangle height would be just to say 30 mm and rectangle height would be 5 mm. Is there any way to do this by adding some lines of code in the VBScript Program?

Thanks, Roberto
Steven from Your Country  [1376 posts] 5 years

That's already in the VBScript and is required in order to determine the distance. See the variable


which is in the VBScript. Its not set as a variable but you can add

SetVariable "Target_Height", targetPixelHeight

to create a variable called Target_Height that can be sent via network tables.

Steven from Your Country  [1376 posts] 5 years
Also, just a point after seeing those images, it may be worthwhile to stick the tape a little tighter than what you have it. I realize that you don't want to adhere it permanently yet so if you use double sided sticky tape to get a good flat surface your results will be better. Having the tape droop like that can cause recognition and measurements to be chaotic.

Also, time to start experimenting around with a bit of lighting to get those gray tapes to appear brighter.

Roberto from Mexico  [2 posts] 5 years
Thank you STeven

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index