Hello,
I think that I need something like :
trsf compose-1(point p1, point pRobot, frame F1)
This instruction returns the trTransformation from p1 to obtain pRobot relative to F1
I don't know if my question is clear at all, but I'll try to explain what I'm trying to achieve:
I have a point p1 in the world.
The robot is located at a position pRobot in the world.
In a frame F1,
I want to express the coordinates of p2 in F1 frame, which are the coordinates to add to p1 to obtain pRobot. ,relative to F1.
In other words, adding p2 to p1 in F1 should give me pRobot.
I tried :
Code
tmpP1.trsf = position(p1, F1)
tmpProbot.trsf = position(pRobot, F1)
p2.trsf.x = tmpProbot.trsf.x - tmpP1.trsf.x
p2.trsf.y = tmpProbot.trsf.y - tmpP1.trsf.y
p2.trsf.z = tmpProbot.trsf.z - tmpP1.trsf.z
p2.trsf.rx = tmpProbot.trsf.rx - tmpP1.trsf.rx
p2.trsf.ry = tmpProbot.trsf.ry - tmpP1.trsf.ry
p2.trsf.rz = tmpProbot.trsf.rz - tmpP1.trsf.rz
Seems to work with x,y,z but not for the orientation rx,ry,rz.
Am I on the right track or completely off?