Planning workflow of product positioning with <6 DOF robots
Hi,
With some breaks I've been working towards an application for my robot where I want to position holes/locations in a product to a specific point in space. I've been digging around and i'd like to check that what I'm trying to do is possible at all, and I hope somebody can confirm if i'm on the right track and if needed nudge me into the right direction. While I've got multiple questions, these all have a common cause, therefore I hope it's OK to pose them all together.
I've made a 4DOF robot where I will pick up different products and bring the holes in that product to a location where a tool will add a feature to that hole. The product cannot be rotated in it's own plane (around its frame z-axis). I would like to position these holes to a specified location one by one. Preferably with Python. I've made a the robot moveit package and a robot_support package Below a simple representation:
After a lot of searching I think I have 2 possible solutions:
- Add a
hole
frame to mytool0
frame of the end-effector, make that the tip of my kinematics chain and have moveit plan that frame to the specified location. - I could generate a new tool for each product (with a frame at each hole location) and load them with different launch files, but that would give me a new tool for each new product i want to handle and I'm not sure I want the burden of maintaining all those tools.
One hurdle I encounter at trying to position the end effector (just the robot end effector, no extra frames/product) to a point in space with the ros_commander python api is that I can't get the plan to succeed (I try to follow the moveit tutorial example).
but I get errors telling me the plan isn't solvable.
[ INFO] [1493551548.788745043]: Planning request received for MoveGroup action. Forwarding to planning pipeline.
[ INFO] [1493551548.859191599]: Planner configuration 'manipulator[RRTkConfigDefault]' will use planner 'geometric::RRT'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1493551548.859571195]: manipulator[RRTkConfigDefault]: Starting planning with 1 states already in datastructure
[ INFO] [1493551558.859673954]: manipulator[RRTkConfigDefault]: Created 114272 states
[ INFO] [1493551558.859745128]: No solution found after 10.000228 seconds
[ INFO] [1493551558.869263246]: Unable to solve the planning problem
[ INFO] [1493551558.987668538]: Planning request received for MoveGroup action. Forwarding to planning pipeline.
[ INFO] [1493551559.063110536]: Planner configuration 'manipulator[RRTkConfigDefault]' will use planner 'geometric::RRT'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1493551559.063482002]: manipulator[RRTkConfigDefault]: Starting planning with 1 states already in datastructure
[ INFO] [1493551569.063481304]: manipulator[RRTkConfigDefault]: Created 111517 states
[ INFO] [1493551569.063716649]: No solution found after 10.000282 seconds
[ INFO] [1493551569.081697521]: Unable to solve the planning problem
I guess that's because I cannot get ...
My suggestions: if limited nr of holes (
n
): addlink
s to urdf for those, createn
planning groups. If that is not flexible enough: keep track of holes some other way, then plan for TCP pose relative to hole pose (ie: subtractdist(hole, tcp)
). As to planning for < 6 dof robot, .... that is certainly supported, but it works best if you use an IK solver that can properly deal with < 6 dof chains. Trac IK should be ok with that (I see you're using that), but an IKFast plugin (or even a manually written one) would probably be better.
I've just tested your support pkg + moveit cfg and running
demo.launch
I can successfully plan for your arm, usingRRTConnect
as a planner (orRRT
). One confusing thing though is that your MoveIt cfg specs 5 joints in some places, while your urdf has 4.@gvdhoorn I'll first add a tool to the URDF. If I later start subtracting hole locations from the tcp then that will function only if the holes are on the same radius as the effector. If not than I will need to compensate for that (calculate). I was hoping there was a way to use TF for that...
... Would it be do-able to change tools without a restart?... Did you succeed in planning to a cartesian pose with the moveit_commander python interface? or from Rviz?
The reason for the discrepancy between 5 and 4 joints btw is that I have removed a wrist joint from the prototype. So I guess I missed some bits when cleaning up.
I don't really see why that would be the case. Define the location of the hole, determine the transform to TCP, compensate for that distance and plan to a pose for TCP that ..
.. takes that distance into account.
Well TF gives you the infrastructure to figure out what transforms are and can transform things for you, but I don't see how it would magically know what to do with your hole poses?