Universal Robots Forum

How to get current robot pose?

in java, how can we get the current pose of the robot in urcap?

from urcap javadoc, under Position class, there is getX(),getY() and getZ().
However it does not state the return value. When i implement this class it show return 0;

Since this interface class, the method itself does not has body, so it will not return anything until we define it.

in this case, how do we get the current robot pose?

is there an example on how to utilize the such class like Pose, Position, Rotation, DigitalIO, etc…

quite confused with whether the methods stated in urcap javadoc, is it just for store the data input from user, or it can be used to retrieve current robot information.


1 Like

The Position class is for manging generic Pose variables, the getX() function and similar is for extracting the respective parameters from a pose variable, e.g. read from a Feature.

Check out this post on how to read actual position.

Is there an example on how to use all these position and io class? tried it in java but return value 0.

also is there an example to read actual position within java program?