Wim,
The urdf model which doesn't work contained two links and a joint. I
tried it once more and I don't get a warning in the rxconsole. Still the
robot_state_publisher didn't subscribe to the /joint_states topic.
The dummy.xml file I attached is my simplified urdf model that doesn't
work. I have a more complete urdf model which works fine.
Cheers,
Ugo
Wim Meeussen wrote:
> Ugo,
>
>> I figured it out. My urdf model didn't have the same number of joints as
>> my published joint_states messages.
>
> I don't think this was your problem. The robot state publisher does
> not care about additional/missing joints in the joint_states message.
>
>
>> rostopic info /joint_states
>> Type: sensor_msgs/JointState
>> Publishers:
>> * /shadowhand_publisher (http://ulster:35258/)
>> Subscribers: None
>
> The output above shows the problem: no node is subscribed to the
> joint_states topic. So the robot state publisher is not receiving any
> messages. This should only happen when you give the robot state
> publisher a urdf with no or only one link. In that case, the robot
> state publisher couldn't possible publish anything, and it therefore
> does not subscribe to the joint_states topic.
>
> But, you should have seen a warning in 'rxconsole'. It should have
> shown either "Robot state publisher got an empty tree and cannot
> publish any state to tf" or "Robot state publisher got a tree with
> only one segment and cannot publish any state to tf". After it shows
> this warning, the robot state publisher just sits there, unable to do
> anything. I guess that is quite a confusing state. We had a discussion
> about this here <https://code.ros.org/trac/ros-pkg/ticket/3224>. Feel
> free to add comments based on your experience with the robot state
> publisher.
>
> Wim
>
>
>
>
>
>
>
>
>
>
> --
> Wim Meeussen
> Willow Garage Inc.
> <http://www.willowgarage.com)
> _______________________________________________
> ros-users mailing list
> ros-users@code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
--
Ugo Cupcic | Shadow Robot Company | ugo@shadowrobot.com
Software Engineer 251 Liverpool Road
need a Hand? London N1 1LX | +44 20 7700 2487
http://www.shadowrobot.com/hand/ @shadowrobot
<robot name="shadowhand">
<link name="shadow_forearm">
<inertial>
<mass value="3.0" />
<origin xyz="0 0 0.090" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="100.0" iyz="0.0" izz="1.0" />
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry name="shadow_forearm_geom">
<cylinder radius="0.06" length="0.180"/>
</geometry>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry name="shadow_forearm_collision">
<cylinder radius="0.06" length="0.180"/>
</geometry>
<origin xyz="1 0 0" rpy="0 0 0 " />
<geometry name="shadow_forearm_collision_geom">
<box size="0.05 0.05 0.10" />
</geometry>
</collision>
</link>
<!-- FIRST FINGER-->
<link name="ffknuckle">
<inertial>
<mass value="0.008" />
<origin xyz="0 0.010 0.233" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="100.0" iyz="0.0"
izz="1.0" />
</inertial>
<visual>
<origin xyz="0 0 0.025" rpy="0 0 0" />
<geometry name="ffknuckle_geom">
<cylinder radius="0.01" length="0.05"/>
</geometry>
</visual>
<!--
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry name="ffknuckle_geom">
<mesh filename="/shadowhand/knuckle.mesh" scale="0.001 0.001 0.001" />
</geometry>
</visual> -->
<collision>
<origin xyz="1 0 0" rpy="0 0 0 " />
<geometry name="ffknuckle_collision_geom">
<box size="0.05 0.05 0.10" />
</geometry>
</collision>
</link>
<!--------------------------------
| JOINTS |
--------------------------------->
<!--
<joint name="attachment" type="continuous">
<parent link="world"/>
<child link="shadow_forearm"/>
<origin xyz="5 0 0" rpy="0 0 3.14" />
<axis xyz="0 1 0" />
</joint>
-->
<joint name="FFJ3" type="revolute">
<parent link="shadow_forearm"/>
<child link="ffknuckle"/>
<origin xyz="0 0.010 0.233" rpy="0 0 0" />
<axis xyz="0 0 1" />
<limit lower="-1.5707963267948966" upper="1.5707963267948966"
effort="10" velocity="1.0"/>
</joint>
</robot>