Skip to content

Commit

Permalink
pub current goal
Browse files Browse the repository at this point in the history
Signed-off-by: fukimiyazaki <[email protected]>
  • Loading branch information
miyazakifuki committed Mar 2, 2024
1 parent 6afdaba commit 40809c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cabot_ui/cabot_ui/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ def __init__(self, node: Node, datautil_instance=None, anchor_file=None, wait_fo
self.path_all_pub = node.create_publisher(nav_msgs.msg.Path, path_all_output, transient_local_qos, callback_group=MutuallyExclusiveCallbackGroup())

self.updated_goal_sub = node.create_subscription(geometry_msgs.msg.PoseStamped, "/updated_goal", self._goal_updated_callback, 10, callback_group=MutuallyExclusiveCallbackGroup())
self._eventPub = self._node.create_publisher(std_msgs.msg.String, "/cabot/debug", 10, callback_group=MutuallyExclusiveCallbackGroup())

self.current_queue_msg = None
self.need_queue_start_arrived_info = False
Expand Down Expand Up @@ -662,6 +663,9 @@ def _navigate_next_sub_goal(self):
self.delegate.activity_log("cabot/navigation", "next_sub_goal")
self._current_goal = self._sub_goals.pop(0)
self._current_goal.reset()
msg = std_msgs.msg.String()
msg.data = F"set current goal:{self._current_goal}"
self._eventPub.publish(msg)
self._navigate_sub_goal(self._current_goal)
return

Expand Down Expand Up @@ -939,6 +943,9 @@ def _check_goal(self, current_pose):
return

goal.exit()

msg = std_msgs.msg.String()
msg.data = F"complete current goal:{self._current_goal}"
self._current_goal = None
if goal.need_to_announce_arrival:
self.delegate.activity_log("cabot/navigation", "navigation", "arrived")
Expand Down

0 comments on commit 40809c6

Please sign in to comment.