"Virtual" Transforms?
Hello everyone,
I have a question, which might have a pretty easy/obvious answer or a better way to solve my problem then the way I am currently doing it. However I am stuck, so I'd be glad for your input:
In the Python-interface, is there a way to create "virtual" transforms, meaning can I create a transform without publishing it and use it (do further transformations based on this one) in the same code later again?
To elaborate on my problem:
I have an robot arm with a gripper attached. I publish a static transform right between the fingertips (in relation to the tip of the robot). Also, I have a box with a marker, which gets recognized and published as a transform. Now, I want to do the following:
Based on the marker, I want to position the fingertips at a certain place. For this, I need my robot to go to a position in relation to the desired finger-tip-position. So it is Marker ==some_static_stuff==> Desired_Fingertips ==(transform from actual_tips to actual_robot)==>Desired_Robot
My problem is a) my lacking math-skills b) that the relation of each transformation changes each step. I can't use transforms from actual_tips to actual_robot
on Desired_Fingertips
, since Desired_Fingertips
exists only as a (transformation, orientation)
-tupel, but not as a frame_id. Therefore, the translations and rotations would be along the axis of Marker
and not of Desired_Fingertips
, leading to a wrong result.
Now, my "hack" would consist of actually publishing a frame Desired_Fingertips
, use it as a frame_id to calculate the position of Desired_Robot
. Since I am computing grasps, I'd also publish a couple more Offset_of_Desired_Fingertips_[1,n]
, therefore flooding the whole system with unecessary transforms. And all of this, because I am too lazy to wrap my head around the underlying mathematics :D
Sooo: Do you guys have any cool ideas?
- Flood the system with transforms for everything
- Some way to use "virtual" frame_id's
- Some cool python function which does all the magic for me
- Man up, dig into the wikipedia-pages and understand everything.
Thanks in advance!
Rabe
P.S. I know there is/was some kind of function to switch the frame MoveIt is planning for, but it is not working anymore.