I just started playing with PolyScope 3.5/SDK 1.2 and it looks like there is a fair amount of exposure for the built in nodes (move, waypoint etc). I can see that I am now able to traverse down the tree from my program node. It would be very nice to be able to nest the native (UR) program nodes within our URCap’s ‘reference point wrapper node’. This would allow users to put one of our nodes in, then just keep programming as they are used to with the native node types.
I’m looking through the classes and I do not see a way to get a WaypointNode’s Pose. For example, if I traverse through my children nodes and I come across a WaypointNode, the interface does not expose anything that allows me to get the pose (something like node.getConfig().getPose()) but the interface for WaypointNodeConfig (which is what getConfig() returns). I feel like I am missing something but I do not see a way to get this info.
I need to read all waypoints in my program and put them in a combobox. When i select a item in combobox i want to read pose data for that waypoint. I don`t know how to use the code above. Can you help me ?
If you want to list the waypoints in a JComboBox, you’ll need to get the name of each waypoint and store in in a String array, ArrayList or similar, then build a JComboBox around that list/model.
See How to Use Combo Boxes (The Java™ Tutorials > Creating a GUI With Swing > Using Swing Components) for how to use a JComboBox.
Use an ItemListener to check for when the selected item is changed and fetch the data for you relevant waypoint.
The API Reference section at the top of this page should help you understand the code in mmi’s post.
I want to read all waypoints generatet in program tree or waypoints generatet from other Urcaps.
But there is something i miss, because i`m not able to do it.