Skip to content

Commit

Permalink
fixed tiiming issue in ai config script
Browse files Browse the repository at this point in the history
  • Loading branch information
jseawall committed Apr 4, 2024
1 parent 5c0c63f commit 753eadd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
1 change: 1 addition & 0 deletions ai_detector_config_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def __init__(self):
rospy.loginfo("Found topic: " + image_topic)
self.classifier_selection = ClassifierSelection(img_topic=image_topic, classifier=DETECTION_MODEL, detection_threshold=DETECTION_THRESHOLD)
## Start Node Processes
nepi.sleep(1,10)
rospy.loginfo("Starting object detector: " + str(self.start_classifier_pub.name))
self.start_classifier_pub.publish(self.classifier_selection)
## Initiation Complete
Expand Down
34 changes: 18 additions & 16 deletions drone_inspection_demo_mission_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,22 +200,24 @@ def cleanup_actions(self):
node_class = eval(node_name)
node = node_class()

#########################################
# Run Pre-Mission Custom Actions
print("Starting Pre-goto Actions")
success = node.pre_mission_actions()
#########################################
# Start Mission
#########################################
# Send goto Location Command
print("Starting Mission Processes")
success = node.mission()
#########################################
# End Mission
#########################################
# Run Post-Mission Actions
print("Starting Post-Goto Actions")
success = node.post_mission_actions()
while not rospy.is_shutdown():
#########################################
# Run Pre-Mission Custom Actions
print("Starting Pre-goto Actions")
success = node.pre_mission_actions()
#########################################
# Start Mission
#########################################
# Send goto Location Command
print("Starting Mission Processes")
success = node.mission()
#########################################
# End Mission
#########################################
# Run Post-Mission Actions
print("Starting Post-Goto Actions")
success = node.post_mission_actions()
nepi.sleep(10,100)
#########################################
# Mission Complete, Shutting Down
rospy.signal_shutdown("Mission Complete, Shutting Down")
Expand Down

0 comments on commit 753eadd

Please sign in to comment.