Detect mounting through URCaps or urscript

Is there a way to programmatically detect the mounting angles of the robot inside the URCaps?
Alternatively is there a way to work in global coordinate system which is independent of the robot’s mounting angles?

I want to calculate a location right beneath the flange. In regular mounting I would just do:
center = p[flange[0], flange[1], flange[2] - 0.1, flange[3], flange[4], flange[5] ]

But if the robot is mounted upside down, this will give me a location above the flange.

I would also be interested. Is there someone from UR who can answer this?
Thank you!
Zoli

1 Like

The only workaround I could find for this issue is asking the user to input the direction of “down” through parameters, which is a pretty bad solution.

Currently i try to solve the same Problem. Is there any update to this issue?
I only find i really dirty hack that i do not want to implement.
Thank You!

The information is stored in the installation file and there is currently no direct way of accessing it through the API. However the script function get_tool_accelerometer_reading() will give you a pretty good idea.

For referencing poses in another frame than the base you can make use of the Feature functionality.

Can you elaborate on what the use case for a point right beneath the flange?

Ebbe

In my case in order to do automatic calibration of our camera, we ask the user to put a calibration artifact (ball bar) on the table, and move the arm to have the camera look down on the ball bar. We then do some math calculations to be able to look at the ball bar from multiple different orientations.