Know the path between points

I am working on a project with a narrow space to move the robot in.
I can’t use safety plane because the object we don’t want to hit is moveable.
The goal waypoint is variable in all directions so that’s way it is important to know the way the robot is taking

So my question is if it is possible to get to know the path between two waypoints yo see if the robot is moving into the object on its path to the waypoint?
And if the robot should take a path through the object, can you choose an other way?

Thanks
Henrik

Possibly you can use interpolate_pose(p_from, p_to, alpha) to iteratively check path before executing motion.

Hi

This command just create a new point in a straight line between the points. I can’t see how it will help me in this.
I need to know if the robot take a detour between the points.

What do you mean “if the robot takes a detour”? The robot will always follow a straight line when using MoveL. When using MoveJ, you will get a slight angle due to the joints moving individually. :slight_smile:

Can you contact me directly for more information about our problem?

I’d prefer if we do it here. It can also help other people if they’re looking to figure something similar out. :slight_smile:

Ok, then a I will try to explain the problem.
The robots is hanging on movable wagons on a rail 2200 mm in height. (X ways)
2 rails in a station at 4600 mm apart.
2 robot on each side
The distance from the robot foot to the edge of the blue box is 750 mm
Robots home position

Need to reach a position somewhere in the green box, 1000x1000 mm.
The position and angles the robot need to go to comes from an other system.

So that’s why I like to no the way the robot want to take between 2 points

I mean… you HAVE the waypoints ahead of time from the “other system.” The robot is going to go in, as @efn said, a straight line for MoveL, and a ROUGHLY straight line for MoveJ (depending on speed, blend radius, etc).

So if I had 3 waypoints whose data looked like:
p1 = [1,1,3,0,0,0]
p2 = [2,1,3,0,0,0]
p3 = [2,2,3,0,0,0]

Then I know, before the robot even moves, that it’s going to go 1 unit in the positive x direction, followed by 1 unit in the positive y direction.

Your original problem statement is that the object you are trying to avoid colliding with is moveable, and the destination waypoint is not the same. Unless you’re using some sort of vision system to generate the path data (in which case I’m not sure why you’d be colliding) then I’m not sure what you plan to DO with the information about the path. Say you were able to confirm that the robot IS going to collide. What now? You just reprogram it? You do that every time?

If you’re saying the working envelope is narrow, and there’s an obstacle at a random location inside that narrow envelope, and you don’t have any sort of vision to detect it, I would honestly write some small routine that uses Force on the robot to approach the target destination, and if it hits something along the way, retract X amount of distance, shift the current TCP some direction, and try again. Like this:

In the crappy paint sketch above, you moving from the BLUE circle to the GREEN circle and the RED box is the obstacle we can’t detect. In this example, I “don’t know” where the robot is going to go, because I don’t care. It moves towards the green circle with force and bumps the red obstacle. I then retract some distance to the PURPLE dot. Then I shift my TCP right, represented by the ORANGE dot. Then I move to the green circle again. If I do this in a loop, I will eventually avoid the obstacle and arrive at the green circle.

I could be missing some very obvious problems with this, not fully understanding your situation,

First thing, you can’t bump into the object/area that is blue in my picture.
Second, the green area is without obstacles but the customer want to send the robot to a point in this area and in different angles
Green area is 1000x1000 mm.
Third, I can’t rewrite the program because the position is a variable and changes in every run.

TCP on the robot is p[0,-0.053,0.833,0,0,0]

The cycle is:
Get coordinates from an other system
from home position goes to the position.
wait for signal to go home
Goes home.
Next time it is new coordinates the robot needs to go to.

I’m still not following the exact problem, not having actual pictures and things, but that’s because I absolutely suck at visualizing things over text. So I’ll just answer your exact questions without trying to outguess what you’re looking for.

No, there is no easy way to programmatically pre-visualize the path the robot is going to take.
No, there is no easy way to make the robot “choose a different” path.

This script command gives you the Joint Positions of where the robot is currently trying to go to. If any of these joints are invalid (however you’re determining that) then you can bail out of that move early and do something else.

Like I said before though, you apparently already have the positional data the robot is going to move to (ideally this includes the joint positions) so it would seem like you’d be able to just look at the positional information and tell whether you’re going to collide or not.

I think you need to determine or at least detail to us, how you as a human would be able to tell the robot can’t make that move. Is it the TCP going too far? Is the shoulder moving too far? If you can’t define it yourself, then there’s no way the robot is going to be able to know. This is always a big challenge for me, taking what I as a human can obviously tell because I have eyeballs and boiling that down to numbers. Human intuition is a hard thing to convey to a robot

Thank you for the answer.
That was what I asked but not the answer I wanted.

Regards
Henrik

Hi

Thank you again for your support.
I think I found a way to avoid hitting the object thanks to your input.


If I do it like this it works for some cases at least.
But a little more tweaking it may work all the time