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

Problem converting simple urdf file in collada

asked 2014-12-05 19:02:32 -0500

Hi all, I have a problem converting a very simple urdf file in collada (.dae) to use ikfast. I have a more complicated robot but I started to have this error even with a very simple urdf file:

I/O error : No such file or directory
I/O error : No such file or directory
error : xmlNewTextWriterFilename : cannot open uri

Document successfully written to prova.dae

but the prova.dae file does not exist. The prova.urdf file that I am trying to convert is:

<robot name="prova">

<link name="base_link" />
<link name="link1"/>

<joint name="j1" type="revolute">
  <parent link="base_link"/>
  <child link="link1"/>
  <origin rpy="0 0 0" xyz="0.0 0.0 0.0"/>
  <axis xyz="1 0 0"/>
  <limit effort="40" lower="-0.785" upper="0.785" velocity="3.1415"/>
</joint>

</robot>

so just pure kinematics. I am using ros indigo with openrave compiled from source (latest_stable branch). I am using the command:

rosrun collada_urdf urdf_to_collada prova.urdf prova.dae

in the same folder of the urdf file. My machine is running Ubuntu 14.04. thanks for your help!

edit retag flag offensive close merge delete

Comments

Same problem here. Any solution ?

salsaman gravatar image salsaman  ( 2015-04-07 15:21:56 -0500 )edit

6 Answers

Sort by ยป oldest newest most voted
1

answered 2015-04-08 08:26:17 -0500

Simon Schmeisser gravatar image

updated 2015-04-08 08:28:37 -0500

I have the same problem. Here comes my "workaround" (it is quite a bit of work ...)

Define a new robot in openRAVE XML Format:

http://openrave.programmingvision.com...

( <source xml> in the Wiki is not part of the code!)

Install openrave (from source) and start an interactive terminal

openrave.py -i

here you can use

env.Reset(); env.Load('rv4fl.xml')

to load/reload your model. Do so until it looks fine. Press ESC to go into Manipulation Mode. Try selecting a link by pressing CTRL and clicking it. Now check if it moves as expected when you move the mouse.

Now convert to COLLADA:

openrave -save test.dae rv4fl.xml

you can check that as well

openrave test.dae

Now you need the ids of base and end effector

openrave-robot.py test.dae --info links

create the ik-fast solution:

python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot=test.dae --iktype=transform6d --baselink=0 --eelink=6 --savefile=test.cpp

install moveit_ikfast from git and create a moveit_package

rosrun moveit_ikfast create_ikfast_moveit_plugin.py mitsubishi_rv4fl manipulator mitsubishi_rv4fl_moveit_plugins  test.cpp

This will also automatically set up ik_fast in your moveit_config package

edit flag offensive delete link more
1

answered 2015-12-20 19:51:18 -0500

Kei Okada gravatar image

this has been fixed by newer version of collada library, see https://github.com/ros/robot_model/is...

edit flag offensive delete link more
0

answered 2015-02-01 05:59:11 -0500

Valts gravatar image

I am having the exact same problem on ROS Indigo on Ubuntu 14.04! Even on very simple URDF files. I am not sure if this is related, but as an alternative I also tried to convert the URDF to DAE in code, as follows:

#include <collada_urdf/collada_urdf.h>

boost::shared_ptr<DAE> dom;
if (!collada_urdf::colladaFromUrdfFile("waiterbot.urdf", dom)) {
    ROS_ERROR("Failed to construct COLLADA DOM");
    return false;
}
collada_urdf::colladaToFile(dom, "waiterbot.dae");

But this gives the following build error:

In file included from /home/waiterbot/catkin_ws/src/waiterbot_description/src/collada_urdf.cpp:1:0:
/opt/ros/indigo/include/collada_urdf/collada_urdf.h:42:17: fatal error: dae.h: No such file or directory
 #include <dae.h>
                 ^
compilation terminated.

I installed ROS as ros-indigo-desktop-full and it appears that there is something deeply wrong in the way the packages are set up. My knowledge in CMake and catkin isn't deep enough to find the problem. I have already wasted 4 hours on this with no success. Any help would be greatly appreciated.

edit flag offensive delete link more
0

answered 2014-12-09 08:52:45 -0500

If someone can try to convert it to see if it is only a my problem. Thankyou

edit flag offensive delete link more
0

answered 2015-04-07 04:28:28 -0500

sansherlock@gmail.com gravatar image

Have you solve the problem?

edit flag offensive delete link more

Comments

The problem can be solved with ROS of Hydro.I have tried it successfully.

sansherlock@gmail.com gravatar image sansherlock@gmail.com  ( 2015-04-09 01:46:56 -0500 )edit
0

answered 2015-04-07 16:15:27 -0500

130s gravatar image

updated 2015-04-07 16:17:49 -0500

I confirmed on Indigo that this happens with the prova.urdf that you provided.

$ dpkg -p ros-indigo-collada-urdf | grep Ver
Version: 1.11.6-0trusty-20150328-2358-+0000

As a work around, I confirmed that this doesn't happen on Hydro for some reason, as reported in https://github.com/ros/robot_model/is... . To my knowledge, there's no difference between ROS distros (eg. Hydro, Indigo) in model file formats creation so you can use the collada file you generated on Hydro in Indigo world.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2014-12-05 19:02:32 -0500

Seen: 2,456 times

Last updated: Dec 20 '15