Get next waypoint after IF

Hello, lets say we have a program with 4 waypoints, WP1, WP2, WP3, WP4. The robot moves from wp1 through wp2 to either wp3 or wp4 based on IF.
I want to calculate blend radius of WP2 based on where the robot goes next. However the robot doesnt know where to go next until it enters the blend radius of WP2 which means we have chicken-egg situation. Is there a way to get over this? I tried get_target_waypoint but it doesnt work if the radius of WP2 is too big and WP3 is skipped, which is exactly what im trying to prevent.

How early can you evaluate the If condition in your process? If you can evaluate it after WP1, you can do the following:

If var1=True
WP2 (with blend radius A)
WP2 (with blend radius B)

Even if you had a good way to evaluate the blend radius, unless you’re programming in script, you won’t be able to update the blend radius programmatically.

1 Like

Yes, I put the variable radius in script instruction.
I could do what you propose but the problem is when you have a lot of choices after each IF and multiple IFs it gets tiring really fast to check all the radii for all the choices. And then you move one waypoint and you have to check all the possibilities of following waypoints AGAIN :frowning:
Thats why i wanted the robot to calculate the radius automatically.
It has to know somehow whats the next waypoint should have been if it knows it skipped it; the problem is by the time get_target_waypoint() gets it its too late and it only gets the waypoint after the skipped one