loading
 
FIRST Robotics - Multiple Objects
Daniel from United States  [2 posts]
5 years
For those not familiar with FIRST Robotics game for this year - we are trying to track Retroflective squares placed on the top of basketball goals. The problem is that there are four goals - 1 placed at 8FT high, 2 goals next to each other placed at 6ft and another lower goal. We would like to use the middle two goals to let us know a few angle distances.

How do you track two objects within the same image?

Thanks,
Daniel
Daniel from United States  [2 posts] 5 years
I am answering my own question here and for others from FIRST Robotics looking to accomplish this. I am posting the code that I have written so far. Note that it uses the already written Distance and Tracking tutorial provided in the Tutorial section.

Just as a few notes - I used a combination of the Blob Filter Array to count the number of Blobs being used, Markers to refer back to the original image, and If/Then Statements to make sure that two targets were in frame.
program.robo
Anonymous 5 years
Daniel,

Is the idea to track the two vertical middle targets or the two horizontal middle targets?

Were you finding that when one of the goals disappears that the center target is then off? Or what is the idea behind tracking just the middle two?

I tried your robofile quickly and saw some inconsistencies with some of our test files so I figured I'd ask what the overall goal is before attempting to add any thoughts.

Thanks,
STeven.
Daniel from United States  [2 posts] 5 years
Hi,

Our goal is to track the two middle goals to determine the distance between each of them to the robot. The upper and lower goals are not of importance in our current strategy.

What inconsistencies are you seeing?

Thanks,
Daniel
Daniel from United States  [2 posts] 5 years
And the targets are the horizontal. .sorry.

-Daniel
Anonymous 5 years
Daniel,

Have a look at the attached. Couple changes:

1. Dilate added after thresholding to merge targets that are separated by baskets. That works better for the top target which if often obstructed a bit by the basket.

2. Added position information into Blob filter to only allow leftmost and rightmost targets through. This eliminates the top and bottom targets but does assume that the scene is not rotated ... which if it is means your bot has bigger problems! (i.e. it rolled or the camera fell off!)

3. The VBScript checks these two remaining targets for vertical alignment and then does the distance calculation based on the distance between the targets. I set that to 480 inches which is probably not quite right so you will have to measure that (just an approximate guess).

See if this gives you better results. (IR image I used is included).

STeven.
program.robo

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