General Information
- Product: NxLib
- Ensenso SDK Version: 3.6.1621
- Operating System: Windows
Problem / Question
Hi,
I’m trying to specify a transformation in the Links
node by setting the translation and angle-axis rotation. When I print the resulting link, the rotation axis does not match the specified values, e.g. the third item is 0.471 but should be 0.534. Why does this happen and how can I fix it? I’ve added a piece of code that reproduces the problem.
Edit: this only seems to happen when specifying Inverse = True
.
Code
from nxlib import NxLibItem
from nxlib.constants import *
from nxlib.context import NxLib
with NxLib():
links = NxLibItem()[ITM_LINKS]
flange = links["Flange"]
flange[ITM_TARGET] = "Workspace"
flange[ITM_INVERSE] = True
flange[ITM_ROTATION][ITM_ANGLE] = 0.23
flange[ITM_ROTATION][ITM_AXIS][0] = 0.802
flange[ITM_ROTATION][ITM_AXIS][1] = 0.267
flange[ITM_ROTATION][ITM_AXIS][2] = 0.534
flange[ITM_TRANSLATION][0] = 100
flange[ITM_TRANSLATION][1] = 150
flange[ITM_TRANSLATION][2] = 180
print(flange.as_json())
Output
{
"Inverse": true,
"Rotation": {
"Angle": 0.230000000000000204,
"Axis": [
0.852253420868689271,
0.227551663371939966,
0.471046013797251251
]
},
"Target": "Workspace",
"Translation": [
100.000000000000014211,
150,
180
]
}