IK and Camera Parallel to desk surface


oliver_lw

Recommended Posts

Hello,


How do we set the IK parameters to make Sawyer arm camera parallel to table surface(facing down)?
Is there a way to keep Sawyer's arm camera(J5 joint?) horizontal to desk surface during the whole task?
Can you provide some sample code to do that? Or, is there a way to configure IK to achieve that ?
I tried roll =0.5*Pi pitch = 0.5*Pi, in this case the arm will be parallel to desk, but not the camera.

Thanks,

 

Wei

Link to comment
Share on other sites

There are a couple ways to move the arm to have the camera facing down. One is to use the TF2 library, and move the arm until the right_hand_camera frame is pointing in the negative Z direction with respect to the base frame. See the screenshot below for an illustration, and the TF2 Wiki and Tutorials pages to gain an understanding of transforms and transform listeners.
right_camera_tf.thumb.png.7169b13cc4d0df1de4d2bfd589c14b91.png

You can also use the IK solver to give you joint angles with respect to the right_hand_camera link. Follow the example code we provide in the intera_examples package, change the XYZ Position and Quaternion for your desired camera orientation with respect to the base link (likely negative Z direction again), and change the tip_name to be "right_hand_camera". Hope this helps!

~ Ian

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.