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

URDF Problems after switching to ROS Noetic

asked 2021-10-13 10:19:29 -0500

Henne gravatar image

updated 2021-10-14 07:30:42 -0500

Hey! I am working with a Gazebo Simulation and it works on ROS Kinetic and Melodic without problems. So, i switch on a new machine with Ubuntu 20.04 and ROS Noetic and with this changing some different problems appears. I am working in a Container and if i only want to load the empty world in Gazebo with my robot model via a launch, the following errors occur: Error: [parser_urdf.cc:3193] Unable to call parseURDF on robot model Error:[parser.cc:488] parse as old deprecated model file failed.

There seems to be a problem with loading the URDF. The same xacro file works fine in kinetic and melodic. the urdf_checker throws out errors that make no sense to me. It seems that the macros are not being called, but the syntax is correct, because it works well in the other distributions.

Thanks in advance!

First file:
<?xml version="1.0"?>
<robot name="robot" xmlns:xacro="http://www.ros.org/wiki/xacro">
    <xacro:property name="param1" value="1"/>
    <xacro:property name="param2" value="2"/>
    <xacro:include filename="$(find package)/urdf/mac.xacro"/>
    <xacro:base_link />
</robot>

Second file:
<?xml version="1.0"?>
 <robot name="robot" xmlns:xacro="http://www.ros.org/wiki/xacro">
  <xacro:macro name="base_link">
   <link name="base_link">
    <visual>
     <geometry>
      <box_size="0.01 0.01 0.01" />
     </geometry>
    </visual>
  </link>

 <gazebo reference="base_link">
   <material name="blue" />
 </gazebo>
</robot>
edit retag flag offensive close merge delete

Comments

Yes different Gazebo versions. One way to check your urdf, try: gz sdf -p <name_file>.urdf. It will let you know if there are issues. Another watch out if you are calling xacro.py that's deprecated for Noetic so just remove .py

osilva gravatar image osilva  ( 2021-10-13 10:58:19 -0500 )edit

Thanks for the answer. Yes, it comes an error. But i dont know what the error is. So, it is really funny.. The xacro is without .py at the end..

Henne gravatar image Henne  ( 2021-10-14 02:18:25 -0500 )edit

Please create a small standalone xacro file that shows the same error, then copy/paste it into your description. Format it as code using the 101010 button. I assume you are already aware that to use noetic, any python2 code in your project must be ported to python3?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-10-14 06:58:10 -0500 )edit

Yes, i have post a very small xacro example. Yes, I know about python, but it should only be important for loading the empty world and robot model or?

Henne gravatar image Henne  ( 2021-10-14 07:32:55 -0500 )edit

What output do you get for this bash command: rospack find package ?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-10-14 07:51:27 -0500 )edit

The package is only an example. For the right package name the correct path is shown in the cmd line

Henne gravatar image Henne  ( 2021-10-14 09:23:15 -0500 )edit

Even I'm facing the same error... were you able to solve it ? Please help me resolving this error

himanshu shah gravatar image himanshu shah  ( 2023-02-16 07:36:44 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-10-13 11:12:52 -0500

osilva gravatar image

There are few things to consider when using ROS Noetic and Gazebo

ROS1 Noetic ROS Noetic hosts or use the 11.x version of Gazebo. For a fully-integrated ROS system, we recommend using the 11.x version of Gazebo. The way to proceed is just to use the ROS repository (it will automatically install gazebo11) and do not use the osrfoundation repository.

ROS1 Melodic ROS Melodic hosts or use the 9.x version of Gazebo. For a fully-integrated ROS system, we recommend using the 9.x version of Gazebo. The way to proceed is just to use the ROS repository (it will automatically install gazebo9) and do not use the osrfoundation repository.

ROS1 Kinetic ROS Kinetic hosts or use the 7.x version of Gazebo. For a fully-integrated ROS system, we recommend using the 7.x version of Gazebo. The way to proceed is just to use the ROS repository (it will automatically install gazebo7) and do not use the osrfoundation repository

Reference: http://gazebosim.org/tutorials/?tut=r...

There is a great video that explains in more detail what changes entail in SDFormat 1.7: https://vimeo.com/378683328

edit flag offensive delete link more

Comments

Thanks for the answer. I have the gazebo version 11.5.1. So i think it should work

Henne gravatar image Henne  ( 2021-10-14 02:19:04 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-10-13 10:19:29 -0500

Seen: 963 times

Last updated: Oct 14 '21