elephantrobotics/mycobot_ros

mecharm_pi corrupted .dae file error: Expected end of <author> element.

Closed this issue · 2 comments

Issue Description

Thank you for creating and maintaining this ROS1 support for the various Elephant Robotics robotic models. Would like to contribute to the development of this GitHub repository codebase by highlighting the following error encountered and offering both a quick short-term workaround as well as suggest a long-term fix for it constructively.

I will also make a pull request shortly to introduce the aforementioned workaround for the issue.

Unable to run roslaunch mecharm_pi test.launch ROS1 package. Critical error encountered in the corresponding .dae files concerning mecharm _pi robot model.

Environment

  • Ubuntu 20.04
  • ROS1 Noetic

Steps to Reproduce Issue

Please run the commands below, given the environment mentioned above:

# Build the mycobot_ros ROS1 package
cd $HOME
mkdir -p catkin_ws/src
cd catkin_ws/src 
git clone https://github.com/elephantrobotics/mycobot_ros.git --depth 1
cd ~/catkin_ws
catkin build
# Run mecharm_pi ROS1 package test.launch
cd ~/catkin_ws
source devel/setup.bash
roslaunch mecharm_pi test.launch

Expected Behaviour

  1. RViz starts up and visualizes mecharm_pi.urdf as follows:

Screenshot from 2022-07-29 18-40-55

Actual Behaviour

  1. RViz does not start up. The following error is outputted to terminal:
[ERROR] [1659090213.462409894]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/base.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/base.dae - Expected end of <author> element.
[ERROR] [1659090213.472028665]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/base.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/base.dae - Expected end of <author> element.
[ERROR] [1659090213.479244267]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link1.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link1.dae - Expected end of <author> element.
[ERROR] [1659090213.485886783]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link1.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link1.dae - Expected end of <author> element.
[ERROR] [1659090213.498469781]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link2.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link2.dae - Expected end of <author> element.
[ERROR] [1659090213.510806561]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link2.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link2.dae - Expected end of <author> element.
[ERROR] [1659090213.514786006]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link3.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link3.dae - Expected end of <author> element.
[ERROR] [1659090213.518433731]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link3.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link3.dae - Expected end of <author> element.
[ERROR] [1659090213.522109447]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link4.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link4.dae - Expected end of <author> element.
[ERROR] [1659090213.525445284]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link4.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link4.dae - Expected end of <author> element.
[ERROR] [1659090213.527529441]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link5.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link5.dae - Expected end of <author> element.
[ERROR] [1659090213.529346492]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link5.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link5.dae - Expected end of <author> element.
[ERROR] [1659090213.531029594]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link6.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link6.dae - Expected end of <author> element.
[ERROR] [1659090213.532481652]: Could not load resource [package://mycobot_description/urdf/mecharm_pi/link6.dae]: Collada: package://mycobot_description/urdf/mecharm_pi/link6.dae - Expected end of <author> element.

Comments

The aforementioned short-term workaround and the long-term fix suggestion will be added below shortly.

Short-Term Workaround 🩹

The source of the error seems to be that the following .dae 3D model files were not properly filled out.

To resolve this quickly, please edit the concerned .dae files concerning mecharm_pi robot model:

  1. base.dae
  2. link1.dae
  3. link2.dae
  4. link3.dae
  5. link4.dae
  6. link5.dae
  7. link6.dae

For each file, remove the highlighted lines (as indicated by <---- REMOVE THIS ) below from all aforementioned files:

<?xml version="1.0" encoding="UTF-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
  <asset>
    <contributor>
      <author /> <---- REMOVE THIS
      <authoring_tool>Rhinoceros 7.5.21082.11001</authoring_tool>
      <comments>Output from Rhinoceros COLLADA Exporter</comments>
      <copyright /> <---- REMOVE THIS
      <source_data /> <---- REMOVE THIS
    </contributor>
    <created>2022-04-22T03:05:56Z</created>
    <modified>2022-04-22T03:05:56Z</modified>
    <unit meter="0.001" name="Millimeters" />
    <up_axis>Z_UP</up_axis>
  </asset>

Long Term Fix Suggestion 🥳

As a proper fix for the long-term, it would be better to modify the .dae files as follows:

<?xml version="1.0" encoding="UTF-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
  <asset>
    <contributor>
      <author>Elephant Robotics</author>
      <authoring_tool>Rhinoceros 7.5.21082.11001</authoring_tool>
      <comments>Output from Rhinoceros COLLADA Exporter</comments>
      <copyright>Apache 2.0</copyright>
      <source_data></source_data>
    </contributor>
    <created>2022-04-22T03:05:56Z</created>
    <modified>2022-04-22T03:05:56Z</modified>
    <unit meter="0.001" name="Millimeters" />
    <up_axis>Z_UP</up_axis>
  </asset>