rviz: rviz RobotModel broken in melodic: not used
The following two pictures will likely tell the whole story:
Kinetic on 16.04
Melodic on 18.04

It appears that the <origin> tag within <visual> and <collision> is not taken into account anymore. This breaks most of our existing URDF models.
URDF:
<?xml version="1.0" ?>
<robot name="abc">
<link name="a_link">
<visual name="a_visual">
<origin xyz="-0.5 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://rviz_melodic_urdf_issue/a.dae" scale="1.0 1.0 1.0" />
</geometry>
</visual>
</link>
<joint name="a_b_joint" type="fixed">
<parent link="a_link"/>
<child link="b_link"/>
<origin xyz="0 0 0" rpy="0 0 0" />
</joint>
<link name="b_link">
<visual name="b_visual">
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://rviz_melodic_urdf_issue/b.dae" scale="1.0 1.0 1.0" />
</geometry>
</visual>
</link>
<joint name="b_c_joint" type="fixed">
<parent link="b_link"/>
<child link="c_link"/>
<origin xyz="0 0 0" rpy="0 0 0" />
</joint>
<link name="c_link">
<visual name="c_visual">
<origin xyz="0.5 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://rviz_melodic_urdf_issue/c.dae" scale="1.0 1.0 1.0" />
</geometry>
</visual>
</link>
</robot>
Clone https://github.com/andreasBihlmaier/rviz_melodic_urdf_issue into catkin workspace, build and run
roslaunch urdf_tutorial display.launch model:=`rospack find rviz_melodic_urdf_issue`/abc.urdf
Update:
Geometric primitives, e.g. <box> are not shown at all:
Kinetic on 16.04
Melodic on 18.04
URDF:
<?xml version="1.0" ?>
<robot name="boxes">
<link name="a_link">
<visual name="a_visual">
<origin xyz="-0.5 0 0" rpy="0 0 0" />
<geometry>
<box size="0.1 1 0.1" />
</geometry>
</visual>
</link>
<joint name="a_b_joint" type="fixed">
<parent link="a_link"/>
<child link="b_link"/>
<origin xyz="0 0 0" rpy="0 0 0" />
</joint>
<link name="b_link">
<visual name="b_visual">
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.1 1 0.1" />
</geometry>
</visual>
</link>
<joint name="b_c_joint" type="fixed">
<parent link="b_link"/>
<child link="c_link"/>
<origin xyz="0 0 0" rpy="0 0 0" />
</joint>
<link name="c_link">
<visual name="c_visual">
<origin xyz="0.5 0 0" rpy="0 0 0" />
<geometry>
<box size="0.1 1 0.1" />
</geometry>
</visual>
</link>
</robot>
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (9 by maintainers)
Appreciate the VM @andreasBihlmaier, that helped.
After a fair bit of investigation I tracked the cause down to differences in locale. On my machines, origins were being parsed as
origin: -0.500000, 0.000000, 0.000000while on yours the equivalent would get parsed asorigin: -0,000000, 0,000000, 0,000000(the commas are what tipped me off).Turns out this is a known issue with
urdfdom, which has been addressed inurdfdom_headers. It doesn’t seem that the fix has been released into melodic, however. I will followup on that to try to get the fix into melodic if it’s feasible (that’s released as an upstream ubuntu package as opposed to a standard ROS package, so maybe not).In the meantime a workaround is to unset/modify the
LC_NUMERICenvironment variable, e.g.export LC_NUMERIC="en_US.UTF-8".Can others please confirm that modifying the locale fixes it for them?
Also, if anyone else can spend time to confirm this bug and/or suggest a solution in a pull request that would be great.
Thanks for the detailed report and examples. We’ll have a look as soon as possible.