Robotics StackExchange | Archived questions

This robot has a joint named "joint2" which is not in the gazebo model

Could any one help me solve this issue, when i launch the robot in Gazebo, the rebot falls to the ground!

Here is my URDF

<?xml version="1.0"?>

<!-- Joints Control in Gazebo --> gazeboroscontrol/DefaultRobotHWSim true

<!-- Geometrical properties --> <!-- Materials -->

<!-- Generates a box visual/collision/inertial -->

<xacro:macro name="prism_geometry">
  <xacro:insert_block name="origin"/>
  <geometry>
    <box size="${side} ${side} ${length}"/>
  </geometry>
</xacro:macro>

<visual>
  <xacro:prism_geometry/>
  <material name="orange"/>
</visual>

<collision>
  <xacro:prism_geometry/>
</collision>

<inertial>
  <xacro:insert_block name="origin"/>
  <mass value="${mass}"/>
  <inertia ixx="${(mass/12)*(side*side+length*length)}"
           iyy="${(mass/12)*(side*side+length*length)}"
           izz="${(mass/6)*(side*side)}"
           ixy="0" ixz="0" iyz="0"/>
</inertial>

/xacro:macro

<!-- Generates a cylinder visual/collision -->

<xacro:macro name="cylinder_geometry">
  <xacro:insert_block name="origin"/>
  <geometry>
    <cylinder length="${length}" radius="${radius}"/>
  </geometry>
</xacro:macro>

<visual>
  <xacro:cylinder_geometry/>
  <material name="gray"/>
</visual>

<collision>
  <xacro:cylinder_geometry/>
</collision>

/xacro:macro

<!-- Generates child joint of parent -->

<joint name="${parent}_${child}_joint" type="revolute">
  <origin xyz="0 0 ${dist}" rpy="0 0 0"/>
  <parent link="${parent}"/>
  <child link="${child}"/>
  <axis xyz="${axis}"/>
  <limit effort="40.0"
         velocity="1.0"
         lower="${-PI}"
         upper="${PI}"/>
</joint>

<!-- Required for ROS control -->
<transmission name="${parent}_${child}_transmission">
  <type>transmission_interface/SimpleTransmission</type>
  <joint name="${parent}_${child}_joint">
    <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
  </joint>
  <actuator name="${parent}_${child}_actuator"/>

</transmission>

<link name="${parent}">

  <xacro:prism_vci length="${dist}" side="${link_side}">
    <origin xyz="0 0 ${dist/2}" rpy="0 0 0"/>
  </xacro:prism_vci>

  <xacro:cylinder_vc radius="${joint_radius}" length="${joint_length}">

    <xacro:if value="${axis=='0 0 1'}">
      <origin xyz="0 0 ${dist}" rpy="0 0 0"/>
    </xacro:if>

    <xacro:if value="${axis=='1 0 0'}">
      <origin xyz="0 0 ${dist}" rpy="0 ${PI/2} 0"/>
    </xacro:if>

    <xacro:if value="${axis=='0 1 0'}">
      <origin xyz="0 0 ${dist}" rpy="${PI/2} 0 0"/>
    </xacro:if>

  </xacro:cylinder_vc>

</link>

<gazebo reference="${parent}">
  <material>Gazebo/Orange</material>
</gazebo>

/xacro:macro

<!-- World frame (for Gazebo) -->

<!-- Arm fixed to world frame -->

<!-- Joints Chain -->

transmissioninterface/SimpleTransmission hardwareinterface/EffortJointInterface ${reduction} hardware_interface/EffortJointInterface

/xacro:macro

</inertial>
<visual>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_1.STL" />
  </geometry>
  <material
    name="">
  </material>
</visual>
<collision>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_1.STL" />
  </geometry>
</collision>

</inertial>
<visual>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_2.STL" />
  </geometry>
  <material
    name="">

  </material>
</visual>
<collision>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_2.STL" />
  </geometry>
</collision>

</inertial>
<visual>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_3.STL" />
  </geometry>
  <material
    name="">
  </material>
</visual>
<collision>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_3.STL" />
  </geometry>
</collision>

</inertial>
<visual>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_4.STL" />
  </geometry>
  <material
    name="">
  </material>
</visual>
<collision>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_4.STL" />
  </geometry>
</collision>

</inertial>
<visual>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_5.STL" />
  </geometry>
  <material
    name="">
  </material>
</visual>
<collision>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Bras_link_5.STL" />
  </geometry>
</collision>

</inertial>
<visual>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Effecteur.STL" />
  </geometry>
  <material
    name="">
  </material>
</visual>
<collision>
  <origin
    xyz="0 0 0"
    rpy="0 0 0" />
  <geometry>
    <mesh
      filename="package://URDF_robot_complet/meshes/Effecteur.STL" />
  </geometry>
</collision>

1

Asked by samir on 2020-04-17 00:08:10 UTC

Comments

Answers