0
$\begingroup$

Rosanswers logo

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>

Originally posted by alextac98 on ROS Answers with karma: 113 on 2020-04-07

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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>

Originally posted by Teo Cardoso with karma: 378 on 2020-04-08

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2020-04-08:
A link to wiki/urdf/XML/link may be informative for the OP.

Comment by alextac98 on 2020-04-08:
Yeah that's what happens when you code at midnight. Thank you!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.