Hi Its not a dumb questions at all.
this (Rotations in 3D) is always way more confusing then it feels like it should be.
So the way I solved this was
- converting the current pose of the arm into the feature coordinate system
- applying the offset
- converting back to the base coordinate system
(I do think there is an easier way to do this with the new Motion Plus System)
so my notation
B1 = “orginal base”
P1 = “current pose in orginal base coordinates”
B2 = " feature base"
P2 = "current pose in feature coordinates!
assuming that the two combinations of bases and poses, points to the same place in space, in some world coordinate with origin in p[0, 0, 0, 0, 0, 0], and that B1 and B2 are offset from this world coordinate. we can setup the matrix equation
B2 * P2 = B1 * P1
we can now isolate P2
P2 = inv(B2) * B1 * P1
as B1 is [0, 0, 0, 0, 0, 0] it can simply be removed
(for the math nerds its equivalent to the identity matrix " B1 = I ")
P2 = inv(B2) * P1
this gives us the URScript code as
pi = 3.1415926535897932384626433
feature_frame = p[0., 0., 0., 0., 0., pi/2.]
current_pose_in_base_frame = p[0.5, 0., 0., 0., 0., 0.]
pose_in_feature_frame = pose_trans(pose_inv(feature_frame), current_pose_in_base_frame)
as we now have the pose in the frame coordinate system we can add the offset we wish.
feature_offset = p[0.5, 0., 0., 0., 0., 0.]
pose_in_feature_frame_offset = pose_trans(feature_offset, pose_in_feature_frame)
now we need to revert back to our original coordinate system of the base by isolating for P1 instead of P2.
B2 * P2 = B1 * P1
P1 = inv(B1) * B2 * P2
P1 = B2 * P2
again as B1 is the pose version of nothing we can simply ignore it
pose_offset_in_base = pose_trans(feature_frame, pose_in_feature_frame_offset)
in total this results in the code
pi = 3.1415926535897932384626433
feature_frame = p[0., 0., 0., 0., 0., pi/2.]
current_pose_in_base_frame = p[0.5, 0., 0., 0., 0., 0.]
feature_offset = p[0.5, 0., 0., 0., 0., 0.]
pose_in_feature_frame = pose_trans(pose_inv(feature_frame), current_pose_in_base_frame)
pose_in_feature_frame_offset = pose_trans(feature_offset, pose_in_feature_frame)
pose_offset_in_base = pose_trans(feature_frame, pose_in_feature_frame_offset)