Could not parse visual element for Link

asked 2019-09-25 07:13:58 -0500

Soundharya gravatar image

updated 2019-09-25 07:42:26 -0500

gvdhoorn gravatar image

I have created a model on solidworks, exproted it as urdf and tried to open it on rviz. I am only able to view coordinates/axes defined but not the model of the bot. The error shown is Could not parse visual element for Link. It would be really helpful if someone could tell me what's happening.

Following is my urdf file:

<?xml version="1.0" encoding="utf-8"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version:   Build Version: 1.5.7206.24265
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot
  name="Demo">
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="-0.0077373 -6.6915E-19 -3.3977E-18"
        rpy="0 0 0" />
      <mass
        value="0.31646" />
      <inertia
        ixx="0.00034005"
        ixy="-1.1265E-20"
        ixz="3.055E-21"
        iyy="0.00059318"
        iyz="1.8962E-20"
        izz="0.00089832" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <!--mesh
          filename="package://Demo/meshes/base_link.STL" /-->
      </geometry>
      <material
        name="">
        <color
          rgba="0.79216 0.81961 0.93333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <!--mesh 
          filename="package://Demo/meshes/base_link.STL" /-->
      </geometry>
    </collision>
  </link>
  <link
    name="Left_Link">
    <inertial>
      <origin
        xyz="0 -6.55680257364447E-18 5.25656200528607E-05"
        rpy="0 0 0" />
      <mass
        value="0.115047931558291" />
      <inertia
        ixx="4.82054529818887E-05"
        ixy="1.70040976665436E-22"
        ixz="3.940914757303E-21"
        iyy="4.82054529818887E-05"
        iyz="-3.21933703938061E-21"
        izz="8.40625924016073E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <!--mesh
          filename="package://Demo/meshes/Left_Link.STL" /-->
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <!--mesh
          filename="package://Demo/meshes/Left_Link.STL" /-->
      </geometry>
    </collision>
  </link>
  <joint
    name="Joint_L"
    type="continuous">
    <origin
      xyz="-0.0508 -0.0635 0"
      rpy="1.5708 0 0" />
    <parent
      link="base_link" />
    <child
      link="Left_Link" />
    <axis
      xyz="0 0 1" />
  </joint>
  <link
    name="Right_Link">
    <inertial>
      <origin
        xyz="-6.93889390390723E-18 8.20187224527899E-37 -5.25656200528607E-05"
        rpy="0 0 0" />
      <mass
        value="0.115047931558291" />
      <inertia
        ixx="4.82054529818887E-05"
        ixy="1.45849255388388E-39"
        ixz="4.2633042902375E-23"
        iyy="4.82054529818887E-05"
        iyz="-1.09254676959259E-37"
        izz="8.40625924016072E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <!--mesh
          filename="package://Demo/meshes/Right_Link.STL" /-->
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <!--mesh
          filename="package://Demo/meshes/Right_Link.STL" /-->
      </geometry>
    </collision>
  </link>
  <joint
    name="Joint_R"
    type="continuous">
    <origin
      xyz="-0.0508 0.0635 0"
      rpy="1.5708 0 ...
(more)
edit retag flag offensive close merge delete

Comments

Sorry for the mess Im not able upload the urdf file nor an image of the urdf file

Soundharya gravatar imageSoundharya ( 2019-09-25 07:26:24 -0500 )edit
1

All the mesh sub elements of your geometry elements are commented out. That could be the problem here.

gvdhoorn gravatar imagegvdhoorn ( 2019-09-25 07:46:08 -0500 )edit