No link elements found in urdf file
Hi, I'm new to ROS and am trying to follow this tutorial: https://github.com/Apress/Robot-Opera...
I am running Ubuntu 20.04 + ROS noetic.
When I try to launch my xacro in Rviz I get this error:`
[ERROR] [1632711304.025022765]: No link el
ements found in urdf file
[robot_state_publisher-2] process has died [pid 3129, exit code 1, cmd /opt/ros/noetic/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/randal/.ros/log/5000ceae-1f3e-11ec-b087-5fe0994d9aa9/robot_state_publisher-2.log].
log file: /home/randal/.ros/log/5000ceae-1f3e-11ec-b087-5fe0994d9aa9/robot_state_publisher-2*.log
[ERROR] [1632711304.485687357]: No link elements found in urdf file`
How I'm attempting to launch Rviz:
roslaunch mobile_robot_description view_robot.launch
Rviz does launch, but I'm not able to see the model
My xacro:
<?xml version="1.0" ?>
<!--
This is a standalone URDF model of 2WD smart car robot
-->
<robot name="mobile_robot" xmlns:xacro="http://ros.org/wiki/xacro">
<property name="M_PI" value="3.1415926535897931" />
<property name="M_PI_2" value="1.570796327" />
<property name="DEG_TO_RAD" value="0.017453293" />
<xacro:macro name="mobile_robot">
<link name="base_footprint"/>
<!--
Base link is set at the bottom of the base mould.
This is done to be compatible with the way base link
was configured for turtlebot 1. Refer to
https://github.com/turtlebot/turtlebot/issues/40
To put the base link at the more oft used wheel
axis, set the z-distance from the base_footprint
to 0.352.
-->
<joint name="base_joint" type="fixed">
<origin xyz="0 0 0.0102" rpy="0 0 -${M_PI/2}" />
<parent link="base_footprint"/>
<child link="base_link" />
</joint>
<link name="base_link">
<visual>
<geometry>
<!-- new mesh -->
<mesh filename="package://mobile_robot_description/meshes/chassis.dae" scale="0.001 0.001 0.001"/>
</geometry>
<origin xyz="-0.07 -0.12 0.352" rpy="0 0 0"/>
</visual>
<collision>
<geometry>
<box size="0.14 0.23 0.1" />
</geometry>
<origin xyz="0.0 -0.02 0" rpy="0 0 0"/>
</collision>
<inertial>
<!-- COM experimentally determined -->
<origin xyz="-0.07 -0.12 0"/>
<mass value="2.4"/> <!-- 2.4/2.6 kg for small/big battery pack -->
<inertia ixx="0.019995" ixy="0.0" ixz="0.0"
iyy="0.019995" iyz="0.0"
izz="0.03675" />
</inertial>
</link>
<!-- Wheel and caster wheel link -->
<!-- NOTE This may prevent gazebo from working with this model -->
<joint name="left_wheel_joint" type="fixed">
<origin xyz="-0.06 0 0" rpy="0 0 0"/>
<parent link="base_link"/>
<child link="left_wheel_link"/>
<axis xyz="1 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint>
<link name="left_wheel_link">
<inertial>
<origin xyz="0 0 0"/>
<mass value="0.01" />
<inertia ixx="0.001" ixy="0.0" ixz="0.0"
iyy="0.001" iyz="0.0" izz="0.001" />
</inertial>
<visual>
<origin xyz="0 0 ...
Can you send a snapshot of your RVIZ settings. Make sure Fixed Frame and Robot Model are selected.
I added to the main post above. When RVIZ launches my Robot Model is selected but gives me error "Failed to parse URDF model" The Fixed Frame seems to be set to "odom"?
Pedantic, but:
you cannot "launch a xacro in RViz". RViz just visualises whatever you give it. It's an observer, it's not an active entity which loads
.xacro
files. That's an important difference.RViz (or really: the "robot model display") tries to load + parse whatever the contents is of the
/robot_description
parameter, then renders that.