Planning workflow of product positioning with <6 DOF robots

asked 2017-04-30 07:09:22 -0600

Bas gravatar image

updated 2017-05-06 07:43:15 -0600

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:

4DOF robot

After a lot of searching I think I have 2 possible solutions:

  • Add a hole frame to my tool0 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).

link to gist of plan.py

link to terminal output

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 ... (more)

edit retag flag offensive close merge delete

Comments

My suggestions: if limited nr of holes (n): add links to urdf for those, create n 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: subtract dist(hole, tcp)). As to planning for < 6 dof robot, ..

gvdhoorn gravatar image gvdhoorn  ( 2017-04-30 09:41:05 -0600 )edit

.. 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.

gvdhoorn gravatar image gvdhoorn  ( 2017-04-30 09:42:26 -0600 )edit

I've just tested your support pkg + moveit cfg and running demo.launch I can successfully plan for your arm, using RRTConnect as a planner (or RRT). One confusing thing though is that your MoveIt cfg specs 5 joints in some places, while your urdf has 4.

gvdhoorn gravatar image gvdhoorn  ( 2017-04-30 10:06:42 -0600 )edit

@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...

Bas gravatar image Bas  ( 2017-04-30 13:07:08 -0600 )edit

... 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?

Bas gravatar image Bas  ( 2017-04-30 13:09:04 -0600 )edit

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.

Bas gravatar image Bas  ( 2017-04-30 13:11:08 -0600 )edit

subtracting hole locations from the tcp [..] will function only if the holes are on the same radius as the effector.

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 ..

gvdhoorn gravatar image gvdhoorn  ( 2017-04-30 15:37:53 -0600 )edit

.. takes that distance into account.

I was hoping there was a way to use TF for that

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?

gvdhoorn gravatar image gvdhoorn  ( 2017-04-30 15:38:50 -0600 )edit