I'm working on a project with a workpiece positioner robot like the one you can see here.
I have a coordinate in the local coordinate system of the robot together with a vector showing the orientation of that coordinate.
My goal is to rotate the robot joints so that the vector orientation of the coordinate is pointing down (vertical).
Is there a way to do this using the motion planner / IK? I can achieve this currently but I'm using some maths to get the angle between the vector and an extra vector which is always pointing down (vertical) and I would like to automate it so that it choose the most efficient solution.
I know there is the possibility to add IK constraints to a motion planner object using the "plan_to_cartesian_objective" function but I don´t think this is the right solution.
Anyone who can point me to the right direction?