Bug in joint frame display
Hi,
I am working on a complex scene and realized something was wrong with the way the joints were displayed. Hence I made another super simple scene highlighting the problem (you can find it below).
On the below scene shown in the picture a joint is rotated 45° around Z and a box link is attached to it. The link is displayed correctly in the picture, but for some reason, the joint is displayed aligned with the world, and not rotated 45° as expected (note that the position of the joint frame is ok, only its rotation is wrong).
Setup: gazebo 4.0 / indigo / trusty
See for yourself with the urdf:
<robot xmlns:xacro="<a href=" http:="" www.ros.org="" wiki="" xacro"="">http://www.ros.org/wiki/xacro" name="lpc" >
<!-- The chassis is an approximation of the nanotubes, the motors... everything but the polycarbonate sheet. -->
<property name="chassis_sx" value="0.7874" /> <!-- 31" on plans -->
<property name="chassis_sy" value="0.5334" /> <!-- 21" on plans -->
<property name="chassis_sz" value="0.0762" /> <!-- 3" on plans -->
<property name="wheel_radius" value="0.0758" /> <!-- dummy link - should be 0.001 -->
<!-- /////////////////////////////////////////////////////////////////////////////////////// -->
<!-- Scene definition. -->
<!-- /////////////////////////////////////////////////////////////////////////////////////// -->
<xacro:macro name="box_inertia" params="sizeX sizeY sizeZ mass *origin">
<inertial>
<mass value="${mass}" />
<insert_block name="origin" />
<inertia ixx="${mass / 12 * (sizeY * sizeY + sizeZ * sizeZ)}" ixy="0.0" ixz="0.0"
iyy="${mass / 12 * (sizeX * sizeX + sizeZ * sizeZ)}" iyz="0.0"
izz="${mass / 12 * (sizeX * sizeX + sizeY * sizeY)}" />
</inertial>
</xacro:macro>
<!-- Chassis. -->
<link name="chassis" >
<visual>
<geometry>
<box size="${chassis_sx} ${chassis_sy} ${chassis_sz}" />
</geometry>
<origin xyz="0.0 0.0 ${wheel_radius}" rpy="0.0 0.0 0.0" />
</visual>
<collision>
<geometry>
<box size="${chassis_sx} ${chassis_sy} ${chassis_sz}" />
</geometry>
<origin xyz="0.0 0.0 ${wheel_radius}" rpy="0.0 0.0 0.0" />
</collision>
<xacro:box_inertia sizeX="${chassis_sx}" sizeY="${chassis_sy}" sizeZ="${chassis_sz}" mass="5.0">
<origin xyz="0.0 0.0 ${wheel_radius}" rpy="0.0 0.0 0.0" />
</xacro:box_inertia>
</link>
<joint name="dummy_joint" type="continuous">
<parent link="chassis" />
<child link = "dummyLink" />
<origin xyz="0.3 0.0 0.3" rpy="0.0 0.0 0.7854" />
<axis xyz="0.0 1.0 0.0" />
<limit effort="100.0" velocity="100.0"/>
<dynamics damping="0.0" friction="0.0"/>
</joint>
<link name="dummyLink" >
<visual>
<geometry>
<box size="0.2 0.05 0.2" />
</geometry>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</visual>
<collision>
<geometry>
<box size="0.2 0.05 0.2" />
</geometry>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</collision>
<xacro:box_inertia sizeX="0.2" sizeY="0.05" sizeZ="0.2" mass="1.0">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</xacro:box_inertia>
</link>
</robot>
I had a look at the code for JointVisual::Load but everything looked fine in this file...
Does anyone confirm it is a bug? Should I open an issue?
Thanks,
Antoine.