How do I switch to different task depending on user input?

Let’s say I put a sphere on the table on my left. And I want that robot to pick it up, then drop it off on a table across from me. After it places the sphere object away, the robot comes back to my side and waits for me to set another object. This time it’s a cube. I place the cube on the right side of the table and I want that robot to take that and put it in a box on a different table. Throughout this play, I will have placed many spheres and cubes at random, and the robot has placed them all in their designated place. All in one program. How do I do that with a pop up screen where it waits for user input?

Hi,

Go to assignment in the advanced tab in the program and in command you change the source from expression to operator

You can choose a whole number as request and in the operator message : " 1 is a cube / 2 is a sphere … And after that you the switch function.

Best regards

JH

Hi @evt,
two options came to my mind:

  1. Pure polyscope solution
    Use an Assignment node with Source = Operator and Request operator for = Whole Number.
    Then use and if condition to check the value choosen by the user.


    When running the program a popup like this will be displyed to the user:

  2. Third party HMI URCap solution
    There are some URCap that let you desing custom HMI panels.
    We have developed Robpod Studio, a tool that let you easily create personalized user interfaces.
    With that you could realize something like this:

If you are curious about this kind of solution you can find a video tutorial here:

1 Like