0

I simply need to simulate a revolute joint between a servo part and a beam part. The model was imported from Fusion360 using fusion2urdf plugin on github.

model simulates fine on launching but when controller node is launched to control angle of revolution, the joints break and parts fuse. without controller node

on launching controller node.

But when change the inertia values in the urdf file from default ones from fusion to Izz=Ixx=Iyy = 1 the revolute joint works fine but the physics of overall model getting skewed. Not sure if the inertia is the culprit or anything else.

<?xml version="1.0" ?>
<robot name="servo_mechanism" xmlns:xacro="http://www.ros.org/wiki/xacro">

<xacro:include filename="$(find servo_mechanism_description)/urdf/materials.xacro" />
<xacro:include filename="$(find servo_mechanism_description)/urdf/servo_mechanism.trans" />
<xacro:include filename="$(find servo_mechanism_description)/urdf/servo_mechanism.gazebo" />

<link name="ground_link"/>
<joint name="ground_joint" type="fixed">
  <parent link="ground_link"/>
  <child link="base_link"/>
  <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
</joint>


<link name="base_link">
  <inertial>
    <origin xyz="-3.471334028868587e-14 -0.013676442178077598 -0.00034934656297967546" rpy="0 0 0"/>
    <mass value="0.00664027798614821"/>
    
    <inertia ixx="0.000206" iyy="0.0002519" izz="0.000299" ixy="0.0" iyz="0.0" ixz="0.0"/>
  </inertial>
  <visual>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://servo_mechanism_description/meshes/base_link.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="steel_satin"/>
  </visual>
  <collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://servo_mechanism_description/meshes/base_link.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="stick_link_1">
  <inertial>
    <origin xyz="-6.347188116550471e-13 0.006597165896690214 0.02397154963709497" rpy="0 0 0"/>
    <mass value="0.0004723121603367053"/>
    
     <inertia ixx="0.0000109" iyy="0.0000109" izz="0.00000235" ixy="0.0" iyz="0.0" ixz="0.0"/>
  </inertial>
  <visual>
    <origin xyz="-0.0 -0.015442 -0.014679" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://servo_mechanism_description/meshes/stick_link_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="steel_satin"/>
  </visual>
  <collision>
    <origin xyz="-0.0 -0.015442 -0.014679" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://servo_mechanism_description/meshes/stick_link_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<joint name="revolute" type="continuous">
  <origin xyz="0.0 0.015442 0.014679" rpy="0 0 0"/>
  <parent link="base_link"/>
  <child link="stick_link_1"/>
  <axis xyz="0.0 1.0 0.0"/>
</joint>

</robot>

Anybody can suggest any fix please?

0 Answers0