Ask Your Question

How to run with my URDF file?

asked 2011-05-04 04:23:50 -0500

updated 2011-05-04 09:06:57 -0500

I am trying to run OpenRave's IK service with my URDF file for the Katana 450 6M90A arm, running diamondback. The URDF file can be found in the katana_description package. Here is what I did:

rosrun xacro katana.urdf.xacro > katana6m90a.urdf
rosrun collada_urdf urdf_to_collada katana6m90a.urdf katana6m90a.dae
rosrun orrosplanning --scene="katana6m90a.dae"

The last command very briefly shows the viewer displaying my arm model, then quits with the following output:

[openravepy_int.cpp:3267] viewer qtcoin successfully attached
initializing, please wait for ready signal...
Traceback (most recent call last):
  File "/home/martin/ros/stacks/openrave_planning/orrosplanning/", line 60, in <module>
    robot = env.GetRobots()[0]
IndexError: list index out of range

Running without parameters works and displays the PR2 model. What am I doing wrong?

EDIT: Thanks Antons, now I get one step further. Using this xml file...

<Robot name="katana6m90a" file="katana6m90a.dae">
  <Manipulator name="arm">
    <joints>katana_l_finger_joint katana_r_finger_joint</joints>
    <closingdirection>-1 -1</closingdirection>
    <direction>0 0 1</direction>
    <translation>0 0 0</translation>

... I get:

[openravepy_int.cpp:3272] viewer qtcoin successfully attached
initializing, please wait for ready signal...
[xmlreaders.cpp:2331] Failed to find manipulator base katana_base_link
[xmlreaders.cpp:2323] Failed to find manipulator end effector katana_gripper_tool_frame
[Robot.cpp:2320] manipulator arm has undefined base and end effector links
[Robot.cpp:2329] could not find gripper joint katana_l_finger_joint for manipulator arm
[Robot.cpp:2329] could not find gripper joint katana_r_finger_joint for manipulator arm
terminate called after throwing an instance of 'OpenRAVE::openrave_exception'
  what():  openrave (Assert): [/usr/include/boost/smart_ptr/shared_ptr.hpp:418] -> T* boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T = OpenRAVE::KinBody::Link], expr: px != 0
[1]    25820 abort (core dumped)  rosrun orrosplanning --scene="katana6m90a.robot.xml"

I had a look at your wubble_description and tried to figure out what I was doing wrong, but no luck. Any more ideas? :-)

edit retag flag offensive close merge delete


Hmm, it looks like it can't find the links you specified in the dae file. Can you visualize your dae file in OpenRAVE by running: rosrun openrave openrave -f `rospack find path_to_katana`/katana.dae?
arebgun gravatar image arebgun  ( 2011-05-04 10:49:27 -0500 )edit

4 Answers

Sort by » oldest newest most voted

answered 2011-05-04 10:58:41 -0500

In order to do successful collada export, you need to use the robot_model trunk, the robot_model diamondback has an old exporter.

Please check out

svn co robot_model

and make sure it is declared first in your ROS_PACKAGE_PATH variable, then remake all your projects.

Afterwords, run:

rosrun openrave yourrobot.dae --list links

this will give you the list of links you can choose from so you can edit your manipulator description.

edit flag offensive delete link more


Thanks Rosen, that did it! (Long version, for posterity: it fixed the "failed to find..." error, after the EDIT)
Martin Günther gravatar image Martin Günther  ( 2011-05-04 22:07:02 -0500 )edit

answered 2011-05-04 06:01:24 -0500

arebgun gravatar image

updated 2011-05-04 06:03:16 -0500


You also need to tell OpenRAVE about your manipulator/end-effector (e.g. finger joints, closing direction, etc). Currently URDF doesn't contain that information explicitly so you have to create it manually. What you need to do is create an xml file with content similar to this:

example OpenRAVE manipulator definition

Then you can run:

rosrun orrosplanning --scene="katana.xml"
edit flag offensive delete link more


Just a comment for the benefit of later readers: this fixed my first error, before the EDIT. Thank you!
Martin Günther gravatar image Martin Günther  ( 2011-05-04 22:08:02 -0500 )edit

answered 2011-05-04 22:49:50 -0500

i was pretty sure fixed joints were getting exported correctly, give me some time to check this out

edit flag offensive delete link more


Yes, my model contains other fixed joints, they work allright. Perhaps the problem is only when the root joint is fixed. Since the arm is available with and without the controlbox, I do all planning in the katana_base_link frame. I should probably split out the controlbox into a separate URDF file.
Martin Günther gravatar image Martin Günther  ( 2011-05-04 23:21:28 -0500 )edit

answered 2011-05-04 11:26:35 -0500

I checked out your repository and did the conversation. a working wrapper is:

<robot file="katana.dae">
  <joints>katana_r_finger_joint katana_l_finger_joint</joints>
  <closingdirection>-1 -1</closingdirection>

Unfortunately your katana urdf is a little broken (see attached image). the base link katana0 is not attached to katana_base_link. this puts the robot initially in self-collision.

katana arm is separated

edit flag offensive delete link more


Hi Rosen, now I can reproduce the error; however, the URDF is fine. The two disconnected links in your picture (katana_internal_controlbox_link on the bottom and katana_base_link on top) are connected by a fixed_joint. In ROS, everything works, and I guess it shouldn't be a problem in OpenRAVE.
Martin Günther gravatar image Martin Günther  ( 2011-05-04 22:04:35 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2011-05-04 04:23:50 -0500

Seen: 2,104 times

Last updated: May 04 '11