Prismatic joint doesn't create the tf

asked 2015-07-08 02:38:57 -0600

JL_Samper gravatar image

updated 2015-07-08 02:45:23 -0600

gvdhoorn gravatar image

I am trying to build a "train", so I have created a prismatic joint between the train (at this moment is modeled as a box) and the rail. The problem is that despite this joint is created and can be controlled, it moves by itself (a few mm per sec) and its tf is not being publicated.

The spawning procces does not show any error and rviz says that no tf can be found from the world to the train. However, if I change the prismatic joint to a fixed one, the tf are created in the right way.

<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="Train" params="parent">

     <link name="Train">
        <collision name="Train collision">
            <origin xyz="0 0 0" rpy="0 0 0"/>       
            <geometry >
                <box size="1.882 0.278 0.430"/>
            </geometry>
        </collision>

        <visual name="Visual Train">
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <box size="1.882 0.278 0.430"/>
            </geometry>
        </visual>

        <inertial>
          <origin xyz="0 0 0" rpy="0 0 0"/>
          <mass value="0.1"/>
          <inertia
            ixx="1.0" ixy="0.0" ixz="0.0"
            iyy="1.0" iyz="0.0"
            izz="1.0"/>
        </inertial>     

     </link>

    <joint name="Joint_Train_Rail" type="prismatic">
      <parent link="${parent}"/>
      <child link="Train"/>
      <limit effort="1000.0" lower="-15" upper="15" velocity="30.0"/>
      <origin rpy="0 0 0" xyz="0 0 0"  />
    </joint>    

</xacro:macro>
edit retag flag offensive close merge delete