URDF Problems after switching to ROS Noetic
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>
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 callingxacro.py
that's deprecated for Noetic so just remove .pyThanks 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..
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?
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?
What output do you get for this bash command:
rospack find package
?The package is only an example. For the right package name the correct path is shown in the cmd line
Even I'm facing the same error... were you able to solve it ? Please help me resolving this error