soccer robot
mohammad from United States  [1 posts]
6 year
hi Steve i'm developing  Soccer Robot with RoboRealm . I can detect the ball now but i want to detect another object after detecting the ball .Is there any way that i put an if statement then it detect the second object with all filters separate from the first object ?
Steven Gentner from United States  [1446 posts] 5 year
Yes, this is possible. The best way to think about this kind of sequential processing is to do so using states. I.e. use one variable set to

state = 1

within the Main tab use a conditional If_Statement to check if the state is 1. If so, run the recognition for the ball. Once this is detected, i.e. something like Object_Count is not zero from the Object Recognition module (although you'd NOT use that for just a ball) you would set the

state = 2

This would disable the ball conditional and could then be picked up by a second If_Statement at the level of the first If_Statement .. and so on.

See the attached robofile for an example:


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