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

URDF/XACRO RViz could not parse visual elements

asked 2020-04-07 21:29:22 -0500

Hi everyone,

I am trying to make a URDF model and view it in Rviz. However, when I try to display the URDF model with RVIZ, it just spits out the following error:

[ERROR] [1586312501.638016618]: Could not parse visual element for Link [fl_module_base]
[ERROR] [1586312501.638561453]: Could not parse visual element for Link [base]
[ERROR] [1586312502.490229106]: Could not parse visual element for Link [fl_module_base]
[ERROR] [1586312502.490260233]: Could not parse visual element for Link [base]

Although the URDF is generated through a XACRO, I tried changing the .urdf file directly, with the same issue. It seems like the error is thrown just for the visual tag being where it is. Does anyone know what I might be doing wrong? Or is this just a bug? The URDF I am using is also below:

Cheers!

<?xml version="1.0" encoding="utf-8"?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from base.urdf.xacro   | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="base">
  <link name="fl_module_base">
    <visual>
      <cylinder length="0.6" radius="0.2"/>
    </visual>
  </link>
  <link name="base">
    <visual>
      <cylinder length="0.2" radius="0.2"/>
    </visual>
  </link>
  <joint name="base_joint" type="fixed">
    <parent link="base"/>
    <child link="fl_module_base"/>
    <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
   </joint>

</robot>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-08 01:22:31 -0500

There is things missing in your code. To use the tag cylinder you must before opening the tag geometry:

        <visual>
            <geometry>
                 <cylinder length="0.6" radius="0.2"/>
            </geometry>
        </visual>
edit flag offensive delete link more

Comments

A link to wiki/urdf/XML/link may be informative for the OP.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-08 02:30:08 -0500 )edit

Yeah that's what happens when you code at midnight. Thank you!

alextac98 gravatar image alextac98  ( 2020-04-08 08:09:33 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-04-07 21:29:22 -0500

Seen: 776 times

Last updated: Apr 08 '20