Skip to content

Commit

Permalink
Fixed stopping to use estop again
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-riley committed Feb 10, 2020
1 parent 8182974 commit 5f30c7f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/multi_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,10 +838,13 @@ def deployBeacon(self, inplace, dropReason):

if deploy:
# Stop the robot and publish message to deployment mechanism
# self.stop_pub.publish(True)
self.stop()
pose = self.agent.odometry.pose.pose

# TODO doesn't currently work since the node is paused!
self.agent.status = 'Deploy'
self.task_pub.publish(self.agent.status)

if self.useSimComms:
# Either need to identify location before comm loss, or make this a guidance
# command to return to a point in range
Expand Down Expand Up @@ -878,7 +881,7 @@ def deployBeacon(self, inplace, dropReason):
rospy.sleep(10)

# Resume the mission
# self.stop_pub.publish(False)
self.stop_pub.publish(False)
self.deconflictExplore()
self.deploy_pub.publish(False)

Expand Down Expand Up @@ -1068,7 +1071,9 @@ def stop(self):
# Stop the robot by publishing no path, but don't change the displayed goal
self.agent.status = 'Stop'
self.task_pub.publish(self.agent.status)
if self.stopStart:
self.stop_pub.publish(True)

if self.stopStart and self.useSimComms:
print(self.id, "stopping")
path = Path()
path.header.frame_id = 'world'
Expand Down Expand Up @@ -1161,6 +1166,9 @@ def start(self):
self.deployBeacon(True, 'GUI Command')
checkBeacon = False
self.mode = 'Explore'

# Disable the estop. 'Stop' will re-enable it
self.stop_pub.publish(False)
else:
self.publishGUITask()

Expand Down

0 comments on commit 5f30c7f

Please sign in to comment.