0
$\begingroup$

Rosanswers logo

Hi, all,

We have a 5 DOF manipulator, the ompl planner keeps throwing out "IK Solution not found, IK returned with error_code: -31", when I pass pose goal to the navigation server. I doubt is it because the IK solver didn't support 5 DOF arm.

What I have done so far is:

  1. I used the planning description configuration wizard to generate the launch file and it works fine in Planning Components Visualizer, except I can't specify start and end postition using end effector control which is expected.
  2. I changed the controller_action_name to be the action name of my real robot.
  3. I changed the auto-generated ompl_planning.yaml in which I delete roll in state space, because we are only interested in the direction not the orientation of the end effector. I don't know if it is neccessary, but I tried both and got the same result.
  4. I use move_arm_joint_goal and modify it according to my robot, it works. But when I use move_arm_pose_goal and do the corresponding modification for my robot, the IK solver keep throwing out "IK Solution not found, IK returned with error_code: -31". I have tried different value for the desired pose constraint and tolerance, even didn't specify the constraint of the desired pose, but got the same result.

Could anyone give me any hint what might be the possible cause to this problem? Thanks a lot.


Originally posted by Fei Liu on ROS Answers with karma: 47 on 2012-02-01

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you have a 5DOF arm and keep the target pose orientation within the reachable space of your arm, IK should work. If however, you for example rotate the target pose around the axis of the missing sixth DOF (if it's rotational), IK will naturally fail.

I can recommend the OpenRAVE ikfast module and it's 'TranslationDirection5D' IK option for such a scenario. It is also shortly talked about here.

I documented how I generated the IK for our 5DOF arm, so here goes:

Generating a OpenRAVE-Collada robot model (assumes you have OpenRAVE installed):

roscd hector_arm_urdf/urdf
rosrun xacro xacro.py hector_arm_ax12_5dof_standalone.xacro > hector_arm_ax12_5dof_standalone.urdf
rosrun collada_urdf urdf_to_collada hector_arm_ax12_5dof_standalone.urdf hector_arm_ax12_5dof_standalone.dae

In the next step, a OpenRAVE scene description file has to be created in the same directory. For this example, this would be "hector_arm_ax12_5dof_standalone.xml". With following contents:

<Robot name="hector_arm_ax12_5dof_standalone" file="hector_arm_ax12_5dof_standalone.dae">
  <Manipulator name="hector_arm_5dof">
    <base>arm_base_link</base>
    <effector>endeffector_yaw_link</effector>
    <direction>1 0 0</direction>
    <translation>0 0 0</translation>
  </Manipulator>
</Robot>

You can do a visual inspection of the model by starting OpenRAVE and then loading the OpenRAVE scene description XML file created above. The endeffector should look as described here when using the red arrow tool to the top right and clicking on the robot.

roscd openrave/bin
export PYTHONPATH=$PYTHONPATH:`./openrave-config --python-dir`
./openrave.py

Finally, generating 5DOF IK:

roscd openrave/bin
export PYTHONPATH=$PYTHONPATH:`./openrave-config --python-dir`
./openrave.py --database inversekinematics --robot=/home/stefan/rosext/hector/ros/stacks/hector_arm/hector_arm_urdf/urdf/hector_arm_ax12_5dof_standalone.xml --iktype=TranslationDirection5D

The generated IK library or .cpp can then be used for calculating inverse kinematics in ROS. This of course is an option that needs a little more effort than relying on the KDL based iterative solver provided with the ROS tools.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2012-02-01

This answer was ACCEPTED on the original site

Post score: 6


Original comments

Comment by Rosen Diankov on 2012-02-02:
check to see if your STL file is binary. if it is, the first 5 letters cannot be 'solid'

Comment by Fei Liu on 2012-02-02:
Hi, Sefan, Thank you for your detailed explanation. I almost go through everything you suggest. I have a problem in using the mesh for my manipulator, I got "failed to load resource package://cob_description/ros/meshes/arm_v0/arm2.stl" when I try to generate urdf to collada. How you run your mesh?

Comment by Rosen Diankov on 2012-02-01:
Hi Stefan, excellent answer! In openrave changes a couple of hours ago, we increased the katana arm ik success rate by 15%. Also, you can bring in all of openrave to your shell by adding the following (recommended) line: source rospack find openrave/openrave_svn/openrave.bash rospack find openrave

Comment by mirsking on 2014-10-02:
Hi, Rosen, I've met the same problem of "failed to load resource package", and my STL file is binary with the first 5 letters being 'solid'. But after I delete the 5 letters 'solid', it still doesn't work. How can I solve this problem?

Comment by BrettHemes on 2016-05-05:
This is an old question but thought I would post a reference to an answer for the "solid" issue from here:

Just go to the folder with STL's with this problem and do: sed -i 's/^solid/robot/' *

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.