Origin of revolute joints don't move in Gazebo11
Hi,
Can someone help me please?
My URDF file have three revolute joints (rudder_joint, sail_joint, tail_joint) with origin defined:
<robot xmlns:xacro="http://ros.org/wiki/xacro" name="sailboat">
<xacro:property name="PI" value="3.1415926535897931"/>
<xacro:property name="scale" value="1"/>
<!--_______________________-->
<!--________ HULL _________-->
<!--_______________________-->
<link name="sailboat/base_link">
<visual>
<origin xyz="-0.79 0 0.26" rpy="0 0 0" />
<geometry>
<!--mesh filename="package://sailboat_description/models/meshes/hull_material.dae" scale="${scale} ${scale} ${scale}"/-->
<mesh filename="package://sailboat_description/models/meshes/hull_material.dae" scale="${scale} ${scale} ${scale}"/>
</geometry>
</visual>
<collision name="collision">
<origin xyz="-0.79 0 0.26" rpy="0 0 0"/>
<geometry>
<mesh filename="package://sailboat_description/models/meshes/hull_origin.STL" scale="${scale} ${scale} ${scale}"/>
</geometry>
</collision>
<!-- Mass is calculated based on an estimate of draft, the effective length and the cross-section of
a circle segment. The value for the draft is consistent specifications of similar vessels. Moments of inertia are based on an effective cylindrical model-->
<inertial>
<mass value="184.04"/>
<inertia ixx="5.99" ixy="0.0" ixz="0.0" iyy="230.06" iyz="0.0" izz="235.86"/>
<origin xyz="-0.79 0 0.26" rpy="0 0 0"/>
</inertial>
</link>
<!--_______________________-->
<!--_______ RUDDER ________-->
<!--_______________________-->
<link name="sailboat/rudder_link">
<visual name="visual">
<geometry>
<!--mesh filename="package://sailboat_description/models/meshes/leme_material.dae" scale="${scale} ${scale} ${scale}"/-->
<mesh filename="package://sailboat_description/models/meshes/leme_material.dae" scale="${scale} ${scale} ${scale}"/>
</geometry>
<!--origin xyz="-1.57 0 -0.21" rpy="0 0 0"/-->
<origin xyz="0 0 0" rpy="0 0 0"/>
</visual>
<collision name="collision">
<geometry>
<mesh filename="package://sailboat_description/models/meshes/leme_origin.STL" scale="${scale} ${scale} ${scale}"/>
</geometry>
<!--origin xyz="-1.57 0 -0.21" rpy="0 0 0"/-->
<origin xyz="0 0 0" rpy="0 0 0"/>
</collision>
<inertial>
<mass value="1.39" />
<inertia ixx="0.03" ixy="0.0" iyy="0.03" ixz="0.0" iyz="0.0" izz="0.01" />
<!--origin xyz="-1.57 0 -0.21" rpy="0 0 0"/-->
<origin xyz="0 0 0" rpy="0 0 0"/>
</inertial>
</link>
<joint name="sailboat/rudder_joint" type="revolute">
<parent link="sailboat/base_link"/>
<child link="sailboat/rudder_link"/>
<origin xyz="-1.57 0 -0.21" rpy="0 0 0"/>
<dynamics damping="1.0"/>
<axis xyz="0 0 1"/>
<limit effort="100" velocity="5" lower="-${PI/2}" upper="${PI/2}" />
</joint>
<!--_______________________-->
<!--________ KEEL _________-->
<!--_______________________-->
<link name="sailboat/keel_link">
<visual name="visual">
<geometry>
<!--mesh filename="package://sailboat_description/models/meshes/keel_material.dae" scale="${scale} ${scale} ${scale}"/-->
<mesh filename="package://sailboat_description/models/meshes/keel_material.dae" scale="${scale} ${scale} ${scale}"/>
</geometry>
<!--origin xyz="0.54 0 -0.91" rpy="0 0 0"/-->
<origin xyz="0 0 0" rpy="0 0 0"/>
</visual>
<collision name="collision">
<geometry>
<mesh filename="package://sailboat_description/models/meshes/keel_origin.STL" scale="${scale} ${scale} ${scale}"/>
</geometry>
<!--origin xyz="0.54 0 -0.91" rpy="0 0 0"/-->
<origin xyz="0 0 0" rpy="0 0 0"/>
</collision>
<inertial>
<mass value="211.39" />
<inertia ixx="34.28" ixy="0.0" iyy="44.11" ixz="0.0 ...
Are the links in the correct place before you start simulation, i.e, if you start paused?
Yes! If I start simulation paused the links are in correct place and the joints too!
Is it possible to be something related to usv_gazebo_dynamics_plugin?
I think that's possible. If for some reason, the plugin is commanding
nan
values to the joints, Gazebo tends to collapse the pose of every link to the origin. Can you try running it without the plugin first? Then check if the plugin is configured properly. Usually these kinds of issues happen if you have bad mass/inertia values, so I would check those as well, although, from a glance, yours looks okay to me.Yes! Without plugin the simulation runs properly. I will check if the hydrodynamics parameters are correct. I don't know the specific parameters of my sailboat but i think the values I used aren't inappropriate. The plugin is this. The mass/inertia values I got directly from Solidworks, so I think that's are okay. Thanks for your help!
Confirmed! I changed the hydrodynamics parameters and works! Apparantely is some value of added mass... I don't konw...
By the way, if anyone wants to know what simulator i am using is VRX simulator
Great! glad to hear it's solved.