loading
 
FRC Tracking 2013
Roberto from Mexico  [2 posts]
11 year
Hello,

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 Gentner from United States  [1446 posts] 11 year
Roberto,

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

targetPixelHeight

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.
Steven Gentner from United States  [1446 posts] 11 year
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.

STeven.
Roberto from Mexico  [2 posts] 11 year
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