Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  • The problem is that the name of the service is incorrect. In Gazebo 7.3, the /gazebo/get_link_state service is offered, according to rosservice list. As written above, the node will be waiting for a service that will never start.
  • The link name should be scoped with the model in a single name, not split into two names.
  • Also, the link state service requires a reference frame with respect to which the link pose will be reported.

The last three lines should be:

model_info_prox = rospy.ServiceProxy('/gazebo/get_link_state', GetLinkState)
rospy.wait_for_service('/gazebo/get_link_state')
print "Link 7 Pose:"    , endl , model_info_prox( "lbr4_allegro::lbr4_7_link" , "world" )