Universal Robots Forum

How to get current robot pose? (InstallationNode)


how to get current robot pose? (InstallationNode)

Thank you

Use the RobotPositionCallback provided in the API, to let the user define a position.


Public interface Position getX(), getY(), getZ()?

API com.ur.urcap.api.domain.userinteraction in the class RobotPositionCallback
Check out the Ellipse Example which use this feature.

1 Like

private InstallationAPIProvider apiProvider;
private Box CalibrationSetBox(final InstallationAPIProvider apiProvider) {
UserInterfaceAPI uiapi = apiProvider.getUserInterfaceAPI();

My code is this. Is there a problem with this when I get an error?

Please confirm that my comment…
Should not I use it like my code?

The InstallationAPI is part of the Installation Node Contribution, while typically a Box is part of the View.
So it seems that the domains are mixed up here.
Is the approach used in the Ellipse Example linked not possible?

The Ellipse Example is an example of a program node.
Is it possible to use the same thing in an installation node?

Yes, same approach and split.
Parts that are in the “SwingProgramNodeView” should be in “SwingInstallationNodeView”, parts that are in “ProgramNodeContribution” should be in “InstallationNodeContribution”

In the above method, you need to set the robot position while pressing the move tab and press ok. Is there any way to get the x, y coordinates of the current robot without doing so?

Yes, take a look at this sample:

However note that this method is not recommended, unless explicitly necessary.
General good practice on UX would include allowing the user to customize the position using the Move screen using the RobotPositionCallback.

@jbm is there a java implementation of the rtde interface readily available?

1 Like

Unfortunately not in the materials we currently provide.
But there may be 3rd party repos out there :+1:

Hi Harald,

maybe I can help you.
I did some rtde prototypes in different dev-kits but none is a finished example that could be shared.

At which point do you need support?

best regards

I use RTDE Interface by accessing port 30004 for getting actual pose, speed and values of registers.
I have no problem to get them on installation node by using RTDE

1 Like