[ros-users] URDF -> robot_state_publisher -> TF confusion

pol.monso pol.monso+tools at gmail.com
Tue Nov 16 19:43:46 UTC 2010


Hello Wim,

The two nodes not being connected was what I noticed too. I am using
the robot_state_publisher as showed similarly in
http://www.ros.org/wiki/urdf/Tutorials/Using%20urdf%20with%20robot_state_publisher
which I managed to get working.

If the state_publisher is supposed to automatically connect to the
joint_states topic, what could prevent it to do so?

I've discovered it is somehow related to the urdf model, since running only with

<launch>
        <param name="robot_description" command="cat $(find
wam_node)/src/wamurdf/model.xml" />
        <!-- <param name="robot_description" command="cat $(find
wam_node)/src/wamurdf/barrettwam_urdf/barrettwam.xml" /> -->
        <node name="robot_state_publisher" pkg="robot_state_publisher"
type="state_publisher" />
</launch>

with the robot_state_publisher tutorial model spawns the
robot_state_publisher waiting to subscribe to joint_states (checked on
rxgraph), while if I use the model I have, the robot_state_publisher
is spawned with subscriptions: none.

Since there's no error message, the model was successfully parsed and
is therefore not related at all with my code on wam_node, what could
induce that behaviour? The two models are quite different, on mine all
joints are of type fixed and rely on stl meshes. I can't see what's
the relation between the model and the state_publisher not wanting to
subscribe to joint_states.

What am I missing?

Pol Monsó

2010/11/16 Wim Meeussen [via ROS-Users]
<ml-node+1912494-678879624-268019 at n3.nabble.com>:
>>I attach my resulting rxgraph in case it helps.
>> http://ros-users.122217.n3.nabble.com/file/n1911467/Captura.png
>
> The node graph shows that the robot_state_publisher node is not
> connected to the joint_states topic. You might have a typo in your
> topic names or remappings.
>
> Wim
>
>
>
> --
> --
> Wim Meeussen
> Willow Garage Inc.
> <http://www.willowgarage.com)
> _______________________________________________
> ros-users mailing list
> [hidden email]
> https://code.ros.org/mailman/listinfo/ros-users
>
>
> ________________________________
> View message @
> http://ros-users.122217.n3.nabble.com/URDF-robot-state-publisher-TF-confusion-tp1530752p1912494.html
> To unsubscribe from URDF -> robot_state_publisher -> TF confusion, click
> here.
>

<robot name="r2d2">
<link name="link1">
  <inertial>
    <mass value="1"/>
    <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" />
    <origin/>
  </inertial>
  <visual>
    <origin xyz="0 0 0" rpy="1.57 0 0" />
    <geometry>
      <cylinder radius="0.01" length=".5" />
    </geometry>
    <material name="gray">
      <color rgba=".2 .2 .2 1" />
    </material>
  </visual>

  <collision>
    <origin xyz="0 0 0" rpy="1.57 0 0" />
    <geometry>
      <cylinder radius="0.01" length=".5" />
    </geometry>
    <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
</link>

<link name="link2">
  <inertial>
    <mass value="1"/>
    <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" />
    <origin/>
  </inertial>

  <visual>
    <origin xyz="0 0 -.3" />
    <geometry>
      <box size=".20 .10 .8" />
    </geometry>
    <material name="white">
      <color rgba="1 1 1 1"/>
    </material>
  </visual>

  <collision>
    <origin xyz="0 0 -.3" />
    <geometry>
      <box size=".20 .10 .8" />
    </geometry>
    <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
</link>

<joint name="joint12" type="fixed">
  <origin xyz="0 .30 0" />
  <parent link="link1"/>
  <child link="link2"/>
</joint>

<link name="link3">
  <inertial>
    <mass value="1"/>
    <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" />
    <origin/>
  </inertial>

  <visual>
    <origin xyz="0 0 -.3" />
    <geometry>
      <box size=".20 .10 .8" />
    </geometry>
    <material name="white">
      <color rgba="1 1 1 1"/>
    </material>
  </visual>

  <collision>
    <origin xyz="0 0 -.3" />
    <geometry>
      <box size=".20 .10 .8" />
    </geometry>
    <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
</link>

<joint name="joint13" type="fixed">
  <origin xyz="0 -.30 0" />
  <parent link="link1"/>
  <child link="link3"/>
</joint>

<link name="link4">
  <inertial>
    <mass value="1"/>
    <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" />
    <origin/>
  </inertial>

  <visual>
    <origin xyz="0 0 -0.2" />
    <geometry>
      <cylinder radius=".20" length=".6"/>
    </geometry>
    <material name="white"/>
  </visual>

  <collision>
    <origin xyz="0 0 0.2" />
    <geometry>
      <cylinder radius=".20" length=".6"/>
    </geometry>
    <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
</link>

<joint name="joint14" type="revolute">
  <parent link="link1"/>
  <child link="link4"/>
  <origin xyz="0 0 0" rpy="0 0 0" />
  <axis xyz="0 1 0" />
  <limit upper="0" lower="-.5" effort="10" velocity="10" />
</joint>

<link name="link5">
  <inertial>
    <mass value="1"/>
    <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" />
    <origin/>
  </inertial>

  <visual>
    <geometry>
      <sphere radius=".4" />
    </geometry>
    <material name="white" />
  </visual>

  <collision>
    <origin/>
    <geometry>
      <sphere radius=".4" />
    </geometry>
    <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
</link>

<joint name="joint45" type="continuous">
  <origin xyz="0 0 0.1" />
  <axis xyz="0 0 1" />
  <parent link="link4"/>
  <child link="link5"/>
</joint>

<link name="link6">
  <inertial>
    <mass value="1"/>
    <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" />
    <origin/>
  </inertial>

  <visual>
    <origin xyz="0 0 -.1" />
    <geometry>
      <cylinder radius=".02" length=".2" />
    </geometry>
    <material name="gray" />

  </visual>

  <collision>
    <origin/>
    <geometry>
      <cylinder radius=".02" length=".2" />
    </geometry>
    <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
</link>

<joint name="joint56" type="prismatic">
  <origin xyz=".12 0 .15" />
  <axis xyz="0 0 1" />
  <limit upper="0" lower="-.5" effort="10" velocity="10" />
  <parent link="link5"/>
  <child link="link6"/>
</joint>

<link name="link7">
  <inertial>
    <mass value="1"/>
    <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" />
    <origin/>
  </inertial>

  <visual>
    <geometry>
      <box size=".05 .05 .05" />
    </geometry>
    <material name="blue" >
      <color rgba="0 0 1 1" />
    </material>
  </visual>

  <collision>
    <origin/>
    <geometry>
      <box size=".05 .05 .05" />
    </geometry>
    <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
</link>

<joint name="joint67" type="fixed">
  <origin xyz="0 0 0" />
  <parent link="link6"/>
  <child link="link7"/>
</joint>

</robot>

<robot name="barrettwam">
    <link name="wam0">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam0-geom">
                <mesh filename="file:wam0.stl"/>
            </geometry>
            <material name="wam0-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam0-geom">
                <mesh filename="file:wam0.stl"/>
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="wam1">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam1-geom">
                <mesh filename="file:wam1.stl"/>
            </geometry>
            <material name="wam1-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam1-geom">
                <mesh filename="file:wam1.stl"/>
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="wam2">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam2-geom">
                <mesh filename="file:wam2.stl" />
            </geometry>
            <material name="wam2-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam2-geom">
                <mesh filename="file:wam2.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="wam3">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam3-geom">
                <mesh filename="file:wam3_joint_encoder.stl" />
            </geometry>
            <material name="wam3-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam3-geom">
                <mesh filename="file:wam3_joint_encoder.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="wam4">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam4-geom">
                <mesh filename="file:wam4.stl" />
            </geometry>
            <material name="wam4-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam4-geom">
                <mesh filename="file:wam4.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="wam5">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam5-geom">
                <mesh filename="file:wam5.stl" />
            </geometry>
            <material name="wam5-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam5-geom">
                <mesh filename="file:wam5.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="wam6">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam6-geom">
                <mesh filename="file:wam6.stl" />
            </geometry>
            <material name="wam6-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam6-geom">
                <mesh filename="file:wam6.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="wam7">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam7-geom">
                <mesh filename="file:wam7_280.stl" />
            </geometry>
            <material name="wam7-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="wam7-geom">
                <mesh filename="file:wam7.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
 
    <link name="finger0_0">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger0_0-geom">
                <mesh filename="file:bh_link1.stl" />
            </geometry>
            <material name="finger0_0-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger0_0-geom">
                <mesh filename="file:bh_link1.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="finger0_1">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger0_1-geom">
                <mesh filename="file:bh_link2.stl" />
            </geometry>
            <material name="finger0_1-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger0_1-geom">
                <mesh filename="file:bh_link2.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="finger0_2">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger0_1-geom">
                <mesh filename="file:bh_link3.stl" />
            </geometry>
            <material name="finger0_1-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger0_1-geom">
                <mesh filename="file:bh_link3.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>

    <link name="finger1_0">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger1_0-geom">
                <mesh filename="file:bh_link1.stl" />
            </geometry>
            <material name="finger1_0-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger1_0-geom">
                <mesh filename="file:bh_link1.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="finger1_1">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger1_1-geom">
                <mesh filename="file:bh_link2.stl" />
            </geometry>
            <material name="finger1_1-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger1_1-geom">
                <mesh filename="file:bh_link2.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="finger1_2">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger1_2-geom">
                <mesh filename="file:bh_link3.stl" />
            </geometry>
            <material name="finger1_2-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger1_2-geom">
                <mesh filename="file:bh_link3.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="finger2_1">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger2_1-geom">
                <mesh filename="file:bh_link2.stl" />
            </geometry>
            <material name="finger2_1-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger2_1-geom">
                <mesh filename="file:bh_link2.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>
    <link name="finger2_2">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <mass value="1"/>
            <inertia ixx="100"  ixy="0"  ixz="0" iyy="100" iyz="0" izz="100" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger2_2-geom">
                <mesh filename="file:bh_link3.stl" />
            </geometry>
            <material name="finger2_2-mat">
                <color rgba="0.75 0.75 0.75 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry name="finger2_2-geom">
                <mesh filename="file:bh_link3.stl" />
            </geometry>
            <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
        </collision>
    </link>

    <joint name="wam1" type="fixed">
        <parent link="wam0"/>
        <child link="wam1"/>
    </joint>
 
    <joint name="wam2" type="fixed">
        <parent link="wam1"/>
        <child link="wam2"/>
    </joint>
    <joint name="wam3" type="fixed">
        <parent link="wam2"/>
        <child link="wam3"/>
    </joint>
    <joint name="wam4" type="fixed">
        <parent link="wam3"/>
        <child link="wam4"/>
    </joint>
    <joint name="wam5" type="fixed">
        <parent link="wam4"/>
        <child link="wam5"/>
    </joint>
    <joint name="wam6" type="fixed">
        <parent link="wam5"/>
        <child link="wam6"/>
    </joint>
    <joint name="wam7" type="fixed">
        <parent link="wam6"/>
        <child link="wam7"/>
    </joint>
    <joint name="finger0_0" type="fixed">
        <parent link="wam7" />
        <child link="finger0_0" />
    </joint>

    <joint name="finger0_1" type="fixed">
        <parent link="finger0_0" />
        <child link="finger0_1" />
    </joint>
    <joint name="finger0_2" type="fixed">
        <parent link="finger0_1" />
        <child link="finger0_2" />
    </joint>
 
    <joint name="finger1_0" type="fixed">
        <parent link="wam7" />
        <child link="finger1_0" />
    </joint>

   <joint name="finger1_1" type="fixed">
        <parent link="finger1_0" />
        <child link="finger1_1" />
    </joint>
    <joint name="finger1_2" type="fixed">
        <parent link="finger1_1" />
        <child link="finger1_2" />
    </joint>
    
   <joint name="finger2_1" type="fixed">
        <parent link="wam7" />
        <child link="finger2_1" />
    </joint>

    <joint name="finger2_2" type="fixed">
        <parent link="finger2_1" />
        <child link="finger2_2" />
    </joint>
</robot>

-- 
View this message in context: http://ros-users.122217.n3.nabble.com/URDF-robot-state-publisher-TF-confusion-tp1530752p1912872.html
Sent from the ROS-Users mailing list archive at Nabble.com.



More information about the ros-users mailing list