Inserting multiple times the same variable position waypoint

Hi all,

I’m developing an urcap that inserts a program tree for my application. In the program tree there is a sequence where the robot should move to a pose stored in a variable, so I am using variable position waypoints. The problem is that if I insert the node multiple times I obtain “MoveJ PreGraspPose”, “MoveJ PreGraspPose_1”, “MoveJ PreGraspPose_2” as you can see in the photo and the variables PreGraspPose_1 and PreGraspPose_2 are not defined. Is there a way that I can force to always use the variable “PreGraspPose” and it doesn’t auto create _1 _2 variables?

Now I am using" .createVariablePositionConfig(variable,blendParameters,waypointMotionParameters) and the “variable” is a GlobalVariable created using "varFactory.createGlobalVariable(“PreGraspPose”);. The value of “PreGraspPose” is defined in the writer using writer.appendLine(“global PreGraspPose = p[…]”);

Thanks

image

I’ve never created a URCap so I’m clueless there and if you already know the below, my apologies up front:

In Polyscope you can either copy and paste the same variable to a new node and it will not increment the name, or you can create a new variable then assign it’s position by linking it to an existing variable from the dropdown (see below).

With those two options I would imagine URCaps has a function to either copy/paste the waypoint, or apply values from those linked waypoints.

Hope this helps.!

20210324_062804|690x356

Thank you @fuknrekd. Yes, I can manually change the variable in polyscope but my idea is that the urcap generates the program tree without the _1 and _2, so that the final user has not to change this error manually.

Yes, sorry for the misunderstanding, now I see your point.

This is exactly what I am looking for! But I don’t know how to do it and I haven’t found information on the internet.

Not at all! Any help is welcome, thanks!

1 Like

I am having the same problem in 3.15.8… I had all sorts of waypoint issues in a program in 3.11 so i upgraded, and then my waypoints exploded, with a unique one for each use… Now i am completely lost… It’s like something fundamental changed…

I didn’t understand what @david.parent.alonso was saying here regarding the _1 and _2… Is that implying that it’s some sort of “Instance” of a common waypoint?

In the below example of my situation:

  1. Copy MoveL (Waypoint2) to a 2nd instance just below it

  2. New instance of MoveL (Waypoint2) shows as a copy
    2022-11-16 11_29_31-URSim_VIRTUAL-3.15.8.106339 Running - Oracle VM VirtualBox

  3. Edit the Name of the first instance of Waypoint2, and the 2nd Instance get’s renamed to Waypoint2_1 (I tried to duplicate this for a screenshot, and could not Reproduce it… and ran into other issues… so I started over, with a new waypoint (Waypoint3)… Copied that one, and this time it pasted in as Waypoint3_1.
    2022-11-16 11_36_45-URSim_VIRTUAL-3.15.8.106339 Running - Oracle VM VirtualBox

I am so confused, is this a bug, or am I doing something wrong using Copy/Paste?