ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The error message is telling you that GeoPose isn't a serivce type.

If you want to call a service with the SetDatum type, you should create your service proxy with the SetDatum type:

rospy.wait_for_service('datum')
try:
    geo_pose = rospy.ServiceProxy('datum', SetDatum)
    response = geo_pose(preset_pose) # preset_pose should be a GeoPose object
except rospy.ServiceException, e:
    print "Service call failed: %s"%e

The error message is telling you that GeoPose isn't a serivce type.

If you want to call a service with the SetDatum type, you should create your service proxy with the SetDatum type:

rospy.wait_for_service('datum')
try:
    geo_pose = rospy.ServiceProxy('datum', SetDatum)
    response = geo_pose(preset_pose) # preset_pose should be a GeoPose object
except rospy.ServiceException, e:
    print "Service call failed: %s"%e

EDIT

The proper import for SetDatum should be:

from robot_localization.srv import SetDatum

The error message is telling you that GeoPose isn't a serivce type.

If you want to call a service with the SetDatum type, you should create your service proxy with the SetDatum type:

rospy.wait_for_service('datum')
try:
    geo_pose = rospy.ServiceProxy('datum', SetDatum)
    response = geo_pose(preset_pose) # preset_pose should be a GeoPose object
except rospy.ServiceException, e:
    print "Service call failed: %s"%e

EDIT

The proper import for SetDatum should be:

from robot_localization.srv import SetDatum

SetDatum