Robotics StackExchange | Archived questions

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:

4DOF robot

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

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 to that position because the robot only has 4 DOF and cannot rotate the part. I've been searchin a lot and I've got a lot pieces of the puzzle, but some final pieces seem missing yet.

planning to a pose consisting of joint values work btw.

pose_1 = [1.9, 0.785, -0.785, -1.57]
group.set_joint_value_target(pose_1)
plan3 = group.plan()
group.go()

moves the robot as expected

My questions in a nutshell:

Thanks in advance, Regards, Bas

edit 1: Doing a step back, forgetting about the hole locations for now, I've updated (cleaned up) my configuration and I can plan cartesian positions of the eef only in the XZ plane. I've copied a moveit_commander demo file, and when I uncomment this line the plannning will fail

[INFO] [1493987683.375836]: Path planning failed with only 0.5 success after 100 attempts.

updated moveit_configuration

updated support

edit 2: I ended up adding 2 dummy links in addition to the 4 DOF. These links have zero length, and are able to rotate in the 2 "missing" DOF. This way planning for the end effector works for points outside the XZ plane. see these commits: matildamoveitconfig and matilda_support

Asked by Bas on 2017-04-30 07:09:22 UTC

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

Asked by gvdhoorn on 2017-04-30 09:41:05 UTC

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

Asked by gvdhoorn on 2017-04-30 09:42:26 UTC

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.

Asked by gvdhoorn on 2017-04-30 10:06:42 UTC

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

Asked by Bas on 2017-04-30 13:07:08 UTC

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

Asked by Bas on 2017-04-30 13:09:04 UTC

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.

Asked by Bas on 2017-04-30 13:11:08 UTC

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

Asked by gvdhoorn on 2017-04-30 15:37:53 UTC

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

Asked by gvdhoorn on 2017-04-30 15:38:50 UTC

Would it be do-able to change tools without a restart?

there is no 'tool' concept in MoveIt. Switching between different planning groups is possible, yes.

Asked by gvdhoorn on 2017-04-30 15:40:10 UTC

I've edited the question. Am I missing something obvious in planning for cartesian points?

Asked by Bas on 2017-05-05 07:45:56 UTC

see edit 2, I added 2 dummy links/joints with zero length so I can do cartesian planning now.

Asked by Bas on 2017-05-06 07:44:29 UTC

This all points to your setup requiring a custom IK plugin. Apparently both KDL and TracIK have difficulty planning for such a restricted IK structure. I'd look at IKFast.

After you've got an IK plugin generated for your setup, you should remove the two dummy joints you added.

Asked by gvdhoorn on 2017-05-06 08:25:14 UTC

Answers