Collision Avoidance

Collision Avoidance

Postby Mike Wescott » Fri Jan 29, 2010 1:11 pm

I am new to programming Adept Robotics. I have a very complex application to get myself started with. I have two Viper s850s moutned back to back (connections pointing at each other) about 2 feet appart above a 5 foot wide conveyor belt. Both robots will be picking parts from this belt and both will be placing to the same location. Has anyone out there done something simular? If so how did you handle collision avoidance between the two robots? Any code samples would be great to help me jump start this thing. I have about a month to get the complete setup running including the cutting system.

By the way, the robots are mounted upsidedown too.
Mike Wescott
 
Posts: 3
Joined: Thu Jan 14, 2010 9:05 pm

Re: Collision Avoidance

Postby KevinS » Tue Feb 23, 2010 11:05 pm

Mike,

The TAS instruction can be used to share a variable used by two robots. Below is a link to the V+ language reference guide detailing the proper use of this instruction.

http://www1.adept.com/main/KE/DATA/V%20 ... tas_r.html

The procedure for accessing the location should do something like this:
  • Check the status of the TAS variable and lock it for the current robot
  • Perform the move to the shared location
  • Move away from the shared location
  • Unlock the TAS variable
  • If the variable is locked then the robot should wait at a safe location until the TAS variable is available
KevinS
 

Re: Collision Avoidance

Postby ToddR » Wed Feb 24, 2010 5:12 pm

Here is some example code intended for use in a custom pick program in ACE PackXpert:

This code would be located in the custom pick program before the call to pm.mv for the approach position. pm.mv is a program which reads the parameters you have set for that motion from the Process Manager and issues the actual motion. This code sample was originally written for two robots with overlapping work envelopes picking parts from a belt.

Code: Select all
;Before approaching, see if the location to be moved to is in the robot's shared zone.
;if so, check to see if another robot is occupying that zone.
;if so, wait (up to the timeout) until it has left the zone before entering.

         yval = DY(pos) ;gets the y value of 'pos' which is the position that pm.mv will move to.

        timeout = TIMER(-3)+3 ;set a timeout value (3 seconds here).  TIMER(-3) is a constantly running timer

        IF((yval < 0) AND (yval > -75)) THEN ;here is where you would enter your own way of defining this zone.
            ;In the following loop, while the lockout variable is true, the program waits.  If the timer exceeds the timeout then skip this part and move on to the next
            ;in the following line the TAS function checks the value of 'pick.lockout', the lockout variable, and if it is low, exits the loop and sets it to high.
            WHILE TAS(pick.lockout,TRUE)DO
                WAIT
                 IF TIMER(-3) > timeout THEN
                        status = pm.tsk.skip
                        GOTO 100 ;go to the line labeled 100, in the case of a custom move program, line 100 is RETURN
                 END
            END
        END


Pasting this code into a V+ program should make it easier to read by auto-formatting the text colors, etc.

Without comments the code looks like this:

Code: Select all
         yval = DY(pos)
         timeout = TIMER(-3)+3
         IF((yval < 0) AND (yval > -75)) THEN
            WHILE TAS(pick.lockout,TRUE)DO
                WAIT
                 IF TIMER(-3) > timeout THEN
                        status = pm.tsk.skip
                        GOTO 100
                 END
            END
        END
ToddR
 


Return to Viper s650/s850

Who is online

Users browsing this forum: No registered users and 1 guest

cron