def get_mission_by_id(req):
""" Service to update mission information with specific mission as given
by id.
Args:
req: GetMissionByID type request with field id corresponding to the
mission
Returns:
GetMissionByIdResponse which is true for success and false for
failure.
"""
with lock:
global msgs
try:
msgs = client.get_mission(req.id, frame)
except (ConnectionError, Timeout) as e:
rospy.logwarn(e)
return False, str(e)
except (ValueError, HTTPError) as e:
rospy.logerr(e)
return False, str(e)
except Exception as e:
rospy.logfatal(e)
return False, str(e)
rospy.loginfo("Using mission ID: %d", req.id)
return True, "Success"
评论列表
文章目录