|
Tracking Anthony from United States [1 posts] |
12 year
|
How do I select the size of the rectangle I want to track? For example I want to lock on to the 3 point goal at close distance and the 2 point goal for far distances? This would be for firing the Frisbee at the center of the goal. I would need to have a variable offset from center so the robot center itself for firing.
|
|
|
Steven Gentner from United States [1446 posts] |
12 year
|
Anthony,
The best way to do this is to eliminate one or the other target based on aspect ratio. We empirically calculated and aspect ration (width/height) of 2.15 for larger 2 point squares and 3.00 for smaller 3 point square. If you use the Blob Filter -> Shape attribute -> Aspect ratio you can enter the aspect ratio and then use the weight to specify how close you want to be to that aspect ratio. The weight would be around 0.85+ to ensure that it eliminates the other target. The way this feature is determined is how close each target is to that specified aspect ratio. So all targets will respond to both 2.15 and 3.00 but will respond less based on which target it is. Using this you can eliminate one set of targets, use the marker image to restore back to the original masks to filter out the next set. See the attached robofile for an example of how that can be done.
Please note that the targets in this image are NOT correctly aligned ... this target was created prior to the final target layout and is meant as an example.
STeven. program.robo
|
|
|
Steven Gentner from United States [1446 posts] |
12 year
|
And the example image you can use to see this effect ... again, its not quite to spec.
STeven.
|
|
|
Anonymous |
12 year
|
I was planning on using the kinect for targeting. I also wanted to get the offset angle from the center of the goal, this way the robot can self center before firing.
|
|