loading
 
Set new destination during runtime
Dario Mirkovski from Macedonia, Former Yugoslav Republic  [20 posts]
8 years
Hello,

Please find the robo file, for which i have two questions:

1) why when the Vb script i ran, the state variable is not displayed as it changes?

2) What is is wrong with the Blob filters, that when i extract them at the beginning there are two destinations, and it always go to the other one, althought i did not set the variables as destination.

Thank you in advance.
program.robo
Anonymous 8 years
Dario,

1. You set a period of 10 ms to change from state 0 to state 2. Even at 30 fps the pipeline will execute at about 33ms per entire loop. Thus the 10ms is just too fast to register and GUI interface changes and you'd not see it displayed. If you increases the time to 10000 (10 sec) then you might see the change. Note that at 10ms you are essentially chaning the state from 0 to 2 in the next pipeline iteration ... so you may aswell just use SetVariable to accomplish the same task (unless you meant a 10 second delay instead of a 10 millisecond delay).

2. We don't understand your problem here. Perhaps you could also include an image that we can use to perhaps see what is going wrong? Or perhaps you can give us more specific text around what the problem is. From your description we do not know what you mean by "it always go to the other one".

STeven.
Dario Mirkovski from Macedonia, Former Yugoslav Republic  [20 posts] 8 years
Hello,

Well I need 10 ms to turn the motor to achieve 90 degrees rotation. I use the less speed possible and i need that much time.

However, when i use only one destination, the system works fine. But when in stage 10 or 11 i write
ball_x = GetVariable("place_x") and for y,
ball_ = GetVariable("place_y") and additinally,
ball_x = SetVariable("ball_x") and the same for y, both objects are set to be destination, but the robot chooses the second one. The destination set with the variables above. This is not possible to be done, because the execution it is still not in stage 10 from the select case in Vb.

I think the problem is when I apply the Blobs filter. I can not get sharper image and for both of destination i get more than 1 blobs which i store them into array. Maybe this will help you.

Thank you in advance.
Anonymous 8 years
Dario,

I think you either have a typo or a syntax error in the above

ball_x = GetVariable("place_x")
ball_ = GetVariable("place_y")
ball_x = SetVariable("ball_x")

should be

ball_x = GetVariable("place_x")
ball_y = GetVariable("place_y")

SetVariable "ball_x", ball_x

can you confirm this?

Also, can you include an image such that we can test your blob filter routine? It is possible what you mention to be true. If more than one blob is detected then the blobs array may or may not have a particular blob as the first entry in the array. The order of the blobs in the array (unless specified) are to be considered random. The trick is to continue to add filters to ensure that only the right blob remains. Having an image to work with will help us understand the problem better.

STeven.
Dario Mirkovski from Macedonia, Former Yugoslav Republic  [20 posts] 8 years
Hello,

Please find the images attached for the situation I previously described.


Thank you,

Dario

   
Anonymous 8 years
Dario,

Couple issues:

1. In the blob filter be sure to select 1 in the count so that you only get the largest blob back.

2. Be sure to set either a white mask or color mask in the rgb filter modules to ensure that the detected color is a single blob as apposed to many little pixels of approximately yellow, green, etc.

3. We've included the updated robofile but cannot test it until you provide the "source" image, i.e. one without all the graphics and just right out from the camera. Otherwise you will have to verify this yourself.

But should this should help you along.

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