|
suspend operation{delay Saikumar. from India [20 posts] |
16 year
|
Hello Steve,
I want to know whether there is a certain module which can provide me following
-stop image processing for some time "T",when a condition is met
-do a perticular work[like bot turning 90deg or so
-continue image processing
May be i can use pipelining to change the work/stop processing
but im looking bascially for some ___"time delay"___
i doubt whether i can use the timer module
Thankyou
Saikumar.
|
|
|
Steve Joblin from United States [18 posts] |
16 year
|
Not quite sure why you need RoboRealm to suspend video processing... could you simply have the robot "listen" for a command, then have the robot act on the command and complete its task, then, when ready, listen for the next command? If RoboRealm is sending commands while the robot is busy doing other things (that is, not "listening"), what's the difference?
|
|
|
Saikumar. from India [20 posts] |
16 year
|
Hi Steve,
Thanks for the info...
but my task itself is- "move for time T"
and yes,I see no difference in "listeing"or not,and that shouldnot be a problem for me.
basically what im looking for is just a timer
sorry for that confusion :)
In simpler words
-reached waypoint A
-move reverse for 3sec
-continue with the previous waypoints
Thankyou,
Saikumar.
|
|
|
Anonymous |
16 year
|
If you process the image or not is largely not important .. the issue is if you act on the information gathered from the image processing. In order to do your "move back for 3 seconds" I'd try using the SetTimedVariable which will change the variable value in X number of seconds. That's a condition that you can wait for. So something like this might work:
// assuming way point reached in state 0
state = GetVariable("state")
select case state
case 0
' set motors to backup
SetVariable "left_motor", 100
SetVariable "right_motor", 100
SetTimedVariable "state", 2
SetVariable "state", 1
case 1
' motors are moving when in this step ... just don't do anything
case 2
' motors are still moving but we want to stop them
SetVariable "left_motor", 128
SetVariable "right_motor", 128
SetVariable "state", 3
case 3
' continue here with normal operation
end select
Think of it as a state transition diagram ... the video is being processed during this entire phase but since you are not changing the motor values in accordance with this information it doesn't really matter if you are processing. If you want you can add an IF_STATEMENT module around any significantly slow processing to reduce CPU cycles and use the "state" variable to determine when you need to process or when not.
Remember, the VBScript module (used above) works within the processing loop so you can't just stop the processing and wait .. otherwise everything shuts down!
STeven.
|
|
|
Saikumar. from India [20 posts] |
16 year
|
Thankyou so much again Steve for that.
Never seen that :settimedvariable",will try that out.
just my curious ways-can we have a readymade module for that whole operation that I can use it directly under a "if"statement?
thankyou again steve,you gave me something to work on :>
|
|