Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Rotate around arbitrary fixed coordinate system

#1
Hi everyone, I've been dealing with an issue in my RoboDK project lately and I hope someone can help me figure the solution out.
I need to apply a rotation on the gripper (I'm using the roty function) around the y axis of a specific frame instead of the target one.
Is there some way I can do that? Thanks a lot in advance!
#2
You should adjust the rotation locally, apply the rotation you need, then undo the local rotation. Example:

Code:
pose_rotated = pose * orient_adjustment * roty(y_rotation_rad) * orient_adjustment .inv()

没有w the trick is how to properly calculate the pose to adjust the orientation properly. This can be calculated as follows:
Code:
# pose_frame1 is the absolute pose of reference you want to edit
# pose_frame2 is the absolute pose of the coordinate system you want to refer to
orient_adjustment = pose_frame1.inv() * pose_frame2
orient_adjustment.setPos ([0, 0, 0))
#3
Thank you a lot Albert! Much appreciated!




Users browsing this thread:
1 Guest(s)