Skip to content
Snippets Groups Projects
Commit bd54c172 authored by Tommy Persson's avatar Tommy Persson
Browse files

Renaming id field in TSTNodeInfo to factory_local_id.

parent 012ab3cc
Branches
Tags
No related merge requests found
Pipeline #61604 passed
......@@ -392,7 +392,8 @@ class MissionObject:
(flag, uuid) = check_root_uuid (self.nsdel, rootid)
if not flag:
rospy.logerr("ROOT UUID FAILED 1: %s", uuid)
if self.verbose_flag:
rospy.logerr("ROOT UUID FAILED 1: %s", uuid)
return (False, "check_root_uuid failed", 0, 0)
## rospy.sleep(3.5)
......@@ -713,7 +714,8 @@ class MissionObject:
return (True, "")
def delegation_process_execute (self, rootid):
rospy.logerr("delegation_process_execute: %d", rootid)
if self.verbose_flag:
rospy.logerr("delegation_process_execute: %d", rootid)
if self.verbose_flag:
print("delegation_process_execute", rootid)
......@@ -725,16 +727,19 @@ class MissionObject:
if resp.success:
jsonstring = resp.data
rospy.logerr("missionobject delegation_process_execute json: %s", jsonstring)
if self.verbose_flag:
rospy.logerr("missionobject delegation_process_execute json: %s", jsonstring)
resp = create_tree_ros (self.nsexec, jsonstring, 1)
# print "RESP create_tree_ros exec:", resp
rospy.logerr("delegation_process_execute: execid: %d", resp.id)
if self.verbose_flag:
rospy.logerr("delegation_process_execute: execid: %d", resp.id)
if resp.success:
execid = resp.id
freeid = resp.free_id
self.global_tree_uuid = resp.global_tree_uuid
else:
rospy.logerr("delegation_process_execute: could not create exec tree")
if self.verbose_flag:
rospy.logerr("delegation_process_execute: could not create exec tree")
return (False, "could not create exec tree")
return self.execute(execid)
else:
......@@ -745,7 +750,8 @@ class MissionObject:
(flag, uuid) = check_root_uuid (self.nsexec, rootid)
if not flag:
rospy.logerr("ROOT UUID FAILED 3: %s", uuid)
if self.verbose_flag:
rospy.logerr("ROOT UUID FAILED 3: %s", uuid)
return (False, "execute check_root_uuid failed")
if self.verbose_flag:
......@@ -784,11 +790,13 @@ class MissionObject:
(res, failreason) = wait_for_response(self.nsexec, resp.com_uuid, waittime=40) # waittime was 10 seconds
if not resp.success:
t1 = rospy.Time.now()
rospy.logerr("Distributing the tree failed (40s): %f", (t1-t0).to_sec())
if self.verbose_flag:
rospy.logerr("Distributing the tree failed (40s): %f", (t1-t0).to_sec())
return (False, "Distributing the tree failed")
t1 = rospy.Time.now()
rospy.logerr("Distribute tree took: %f", (t1-t0).to_sec())
if self.verbose_flag:
rospy.logerr("Distribute tree took: %f", (t1-t0).to_sec())
# rospy.logerr("missonobject: after distribute_tree")
......@@ -863,7 +871,8 @@ class MissionObject:
t1 = rospy.Time.now()
# rospy.logerr("Set tree start time response %s: %f", uuid, (t1-t0).to_sec())
t1 = rospy.Time.now()
rospy.logerr("Set tree start time took: %f", (t1-t0).to_sec())
if self.verbose_flag:
rospy.logerr("Set tree start time took: %f", (t1-t0).to_sec())
resp = set_start_executor (self.nsexec, rootid, True)
if not resp.success:
......@@ -873,10 +882,12 @@ class MissionObject:
(res, failreason) = wait_for_response(self.nsexec, resp.com_uuid, waittime=40) # waittime was 10 seconds
if not res:
t1 = rospy.Time.now()
rospy.logerr("Set start executor failed timeout (40 seconds): %f", (t1-t0).to_sec())
if self.verbose_flag:
rospy.logerr("Set start executor failed timeout (40 seconds): %f", (t1-t0).to_sec())
return (res, failreason + " - set_start_executor failed in recv confirm")
t1 = rospy.Time.now()
rospy.logerr("Set start executor took: %f", (t1-t0).to_sec())
if self.verbose_flag:
rospy.logerr("Set start executor took: %f", (t1-t0).to_sec())
self.exec_id = rootid
......@@ -941,7 +952,8 @@ class MissionObject:
(flag, uuid) = check_root_uuid (self.nsdel, rootid)
if not flag:
rospy.logerr("ROOT UUID FAILED 2: %s - %d - %s", uuid, rootid, self.nsdel)
if self.verbose_flag:
rospy.logerr("ROOT UUID FAILED 2: %s - %d - %s", uuid, rootid, self.nsdel)
return (False, "check_root_uuid failed", timings)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment