Unable to move links within URDF file
Hi!
I'm currently struggling with URDF. The model of the robot is a Kuka KR3 CR. I used a Collada file (from OpenRAVE's collection of robots - Rosen Diankov actually created this model for a previous project of mine :)). There were a couple of problems with it (including partially flipped normals of some of the faces and some of the links (you can see that in the image below - a screenshot from OpenRAVE's visualization tool) have some weird geometry issues:
That's why I used Blender and Meshlab to fix the issues. In order to obtain the separate links I used the collada_to_urdf
tool. It extracted an URDF file along with the links (one Collada file per link which I converted to OBJ format). It seems however that the tool doesn't work properly and some of the links are now not where they are supposed to be:
I tried changing those but moveit setup assistant
doesn't show the changes for some reason...
The original URDF can be seen below (I replaced values such as 6.1342423e-33 with 0 since those are obviously rounding errors):
<?xml version="1.0"?>
<robot name="KR3CR"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz"
xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
xmlns:renderable="http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics">
<link name="link1">
<visual>
<origin xyz="0 0 0" rpy="0 -0 0"/>
<geometry>
<mesh filename="package://urdf_collection/meshes/kr3cr/link_1.obj" scale="1 1 1" />
</geometry>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://urdf_collection/meshes/kr3cr/link_1.obj" scale="1 1 1" />
</geometry>
</collision>
<inertial>
<mass value="1" />
<origin xyz="0 0 0" rpy="0 -0 0"/>
<inertia ixx="0.4" ixy="0" ixz="0" iyy="0.4" iyz="0" izz="0.4"/>
</inertial>
</link>
<link name="link2">
<visual>
<origin xyz="0 0 0" rpy="3.14159 0 0"/>
<geometry>
<mesh filename="package://urdf_collection/meshes/kr3cr/link_2.obj" scale="1 1 1" />
</geometry>
</visual>
<collision>
<origin xyz="0 0 0" rpy="3.14159 0 0"/>
<geometry>
<mesh filename="package://urdf_collection/meshes/kr3cr/link_2.obj" scale="1 1 1" />
</geometry>
</collision>
<inertial>
<mass value="1" />
<origin xyz="0 0 0" rpy="0 0 0"/>
<inertia ixx="0.4" ixy="0" ixz="0" iyy="0.4" iyz="0" izz="0.4"/>
</inertial>
</link>
<link name="link3">
<visual>
<origin xyz="0.1 0 -0.35" rpy="1.5708 -0 0"/>
<geometry>
<mesh filename="package://urdf_collection/meshes/kr3cr/link_3.obj" scale="1 1 ...
I'd suggest to use the
display.launch
file fromurdf_tutorial
instead of the Setup Assistant to check your urdf. It will also allow you to make sure your axes are configured correctly.Thanks. The
moveit setup assistant
actually does provide an extensive info about the file that is loaded. I'll give you suggestion a go though. This still doesn't explain why changing the values inside the URDF file doesn't result in any visual change. :-/If you can make the files + meshes available somewhere, I'm willing to take a look. As far as the colours go: OBJ supports materials, so it may be that any
material
tags are ignored in favour of the info in the OBJ.Takes a lot for the offer. If you don't mind, I'll take you up on it. ;) I have updated my question at the end to include a git repo with the files. I have also merged my stuff with the urdf_tutorial package.
If this is still an issue, I'll take a look tomorrow.
If it's not a problem for you, I'd appreciate it. Still working on it.