Function to check if point is in robot range

  • Hello,


    I've been developing a program which moves in different directions and points depending on some input. But sometimes the points that I attempt to reach are out of the robot range. So my question is simple: is there or does anyone know about some function (or another way?) to know if a point is in the robot range, before getting the error?


    Thanks in advance

  • You'll need to use Karel for this. There are two specific built in procedures, CHECK_EPOS, where you have to give it the position, the uframe, the utool, and the group number. There is also the IN_RANGE built in which uses the current uframe, utool, and group.

  • pdl The CHECK_EPOS and IN_RANGE functions were exactly what I was looking for, thanks!


    Fabian Munoz Thank your for your input as well. Yes, I use PRs and at the moment I check if it's off limit just like you said. There's a disadvantage in that though: I work mostly on a main plane where I move linearly in X/Y/Z and the robot has quite a good range there. But sometimes I have to change the end-effector orientation and when I do that, the area the robot can reach moving in X/Y/Z is smaller. To define fixed limits that work, I have to define them for the rotated work positions where the area the workspace is smaller and I loose some range in my main plane. So that's basically why I was looking for some function like CHECK_EPOS/IN_RANGE to see if the robot can reach a point and avoid setting fixed limits.

  • You'll need to use Karel for this. There are two specific built in procedures, CHECK_EPOS, where you have to give it the position, the uframe, the utool, and the group number. There is also the IN_RANGE built in which uses the current uframe, utool, and group.

    A small question regarding these functions: what those functions do is simply check if the given point is within the robot range right? It doesn't allow you to check if that point is reachable from the current point by moving linear does it?


    Supposing it does not, is there any way to check if a given point is reachable from the current point by a linear move?

  • A lot of trigonometry.


    Two points define a line y=ax + b y=mx+n y-y1=m(x-x1)

    Then you can find if they intercept the robot.

    For example, using y-y1=m(x-x1) I think if X and X1 are negative it will be an impossible linear move because you are going through the robot

    Retired but still helping

  • A lot of trigonometry.


    Two points define a line y=ax + b y=mx+n y-y1=m(x-x1)

    Then you can find if they intercept the robot.

    For example, using y-y1=m(x-x1) I think if X and X1 are negative it will be an impossible linear move because you are going through the robot

    Well I didn't try any trigonometry and it may be useful for some situations but in this case the problem isn't going through the robot. I'm always working on the same side of the robot.


    I basically work in a cubic box of 200mm x 200mm x 200mm on one side of the robot. Problem is while I can reach for example point (100,100,100) with a linear move with the initial TCP orientation, when I later change the orientation a bit (for example 30 degrees in W), then there are points I'm not able to reach anymore by linear moving.

    Despite not being able to reach them, the CHECK_EPOS doesn't give status <> 0 so the robot tries to move there and then gives the MOTN-018 Position not reachable (G:1) or the SRVO-115 Limit error (G:1, A:6) which makes you have to reset the program on the teachpendant which is not acceptable for my application

    Edited once, last by dcrb ().

Advertising from our partners