Universal Robots+

How do I rename the Waypoint automatically after I implement the createMoveNode()?

MoveNode mv=createMoveNode();
root.addChild(mv)
If I want to assign the WayPoint name as “StandByPose”,
how to implement the code?

2 Likes

HI,

From URCaps SDK 1.4 you can do something like:

moveNode = programNodeFactory.createMoveNodeNoTemplate();
moveNode.addChild(programNodeFactory.createWaypointNode("StandByPose"));

The createMoveNodeNoTemplate creates a MoveNode without waypoints.

My question then comes from getting the name: there’s a way to get a waypoint name from the WaypointNodeConfig?

Thank you, regards,

Matteo Timossi @recognitionrobotics

FWIW, you can get the effective waypoint name by using the TreeNode returned by addChild:

moveNode = programNodeFactory.createMoveNodeNoTemplate();
TreeNode standbyPoseTreeNode = moveNode.addChild(programNodeFactory.createWaypointNode("StandByPose"));
standbyPoseTreeNode.getProgramNode().toString();  // This gets the actual waypoint name.
2 Likes

Hi,

I am using a Starter Package for SDK 1.10.0 and createMoveNodeNoTemplate() and createWaypointNode(string) are not recognized.

The error messages:

The method createMoveNodeNoTemplate() is undefined for the type ProgramNodeFactory

The method createWypointNode() in the type ProgramNodeFactory is not applicable for the arguments (String)

Are these not supported anymore? @ajp, @jbm, @mmi

The mentioned methods are supported in URCap API 1.10.
You can check in your POM-xml file, whether the URCap API version under dependencies is 1.10, or potentially a lower version which does not include support for these methods.