ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Could IK solver called by arm_navigation auto-generated file work for 5 DOF manipulator

asked 2012-02-01 09:38:28 -0500

Fei Liu gravatar image

updated 2012-02-01 09:46:06 -0500

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2012-02-01 17:24:07 -0500

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.

edit flag offensive delete link more

Comments

1
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`
Rosen Diankov gravatar image Rosen Diankov  ( 2012-02-01 17:57:30 -0500 )edit
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?
Fei Liu gravatar image Fei Liu  ( 2012-02-02 12:24:28 -0500 )edit
check to see if your STL file is binary. if it is, the first 5 letters cannot be 'solid'
Rosen Diankov gravatar image Rosen Diankov  ( 2012-02-02 14:23:51 -0500 )edit

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?

mirsking gravatar image mirsking  ( 2014-10-02 05:58:11 -0500 )edit
1

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/' *

BrettHemes gravatar image BrettHemes  ( 2016-05-05 16:21:56 -0500 )edit

Question Tools

9 followers

Stats

Asked: 2012-02-01 09:38:28 -0500

Seen: 2,287 times

Last updated: Feb 01 '12