Is it possible to check if a shape is in the work envelope of a robot?

I know how use the world zone command to create a sphere or a box, but I don't know how to check if a world volume is within the work envelope of my robot. 

What I'm try to do is find the largest sphere that fit in the work envelope, not including the space behind the robot.

Comments

  • I've done some more research and world zones might not be right tool, but I still need to find largest sphere that will fit in the work envelope.
  • soupsoup USA ✭✭✭
    Right-click on the robot in RobotStudio > Layout tab and choose "Show Work Envelope".
  • MechieMechie USA
    edited March 14
    Is a command allows rapid to do that? I'm trying to come up with a rapid code that can check multiple shapes
  • DenisFRDenisFR FRANCE ✭✭
    Hello,
    I use this function:
      ! Test if a position is reachable
      FUNC bool IsReachable(INOUT robtarget pCheck, PERS tooldata tCheck\ PERS wobjdata wCheck)
        VAR jointtarget joint;
        VAR robtarget target;
        VAR errnum enRes;
       
        IF Present(wCheck) THEN
          joint:=CalcJointT(pCheck,
    tCheck\WObj:=wCheck\ErrorNumber:=enRes);
          target:=CalcRobT(joint,
    tCheck\WObj:=wCheck);
          pCheck.robconf:=target.robconf;
        ELSE
          joint:=CalcJointT(pCheck,
    tCheck\ErrorNumber:=enRes);
          target:=CalcRobT(joint,
    tCheck);
          pCheck.robconf:=target.robconf;
        ENDIF
        RETURN enRes=0;
        !ERR_ROBLIMIT, ERR_OUTSIDE_REACH, ERR_WOBJ_MOVING
      ERROR
        IF (ERRNO = ERR_ROBLIMIT) OR (ERRNO = ERR_WOBJ_MOVING) RETURN FALSE;
        ErrWrite\I, "IsReachable","Unmanaged Error:"\RL2:=ValToStr(ERRNO);
        Stop;
      ENDFUNC
    Calling this function, you can test if a robtarget is reachable and return robconf.
    So for you, you have to check each corner of your shape.







Sign In or Register to comment.