Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete elevator_base_bt and fix cabot2-ace_diagnostic.yaml #9

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

71 changes: 0 additions & 71 deletions cabot_bt/behavior_trees/navigate_for_narrow_base_on_elevator.xml

This file was deleted.

26 changes: 2 additions & 24 deletions cabot_ui/cabot_ui/navgoal.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,29 +782,13 @@ def done_callback(self, future):

class NarrowGoal(NavGoal):
NARROW_BT_XML = "package://cabot_bt/behavior_trees/navigate_for_narrow.xml"
NARROW_BASE_ON_ELEVATOR_BT_XML = "package://cabot_bt/behavior_trees/navigate_for_narrow_base_on_elevator.xml"
LITTLE_NARROW_BT_XML = "package://cabot_bt/behavior_trees/navigate_for_little_narrow.xml"
LITTLE_NARROW_BASE_ON_ELEVATOR_BT_XML = "package://cabot_bt/behavior_trees/navigate_for_little_narrow_base_on_elevator.xml"

def __init__(self, delegate, navcog_route, anchor, **kwargs):
self._need_to_announce_follow = False
if 'need_to_announce_follow' in kwargs:
self._need_to_announce_follow = bool(kwargs['need_to_announce_follow'])

self._is_last = False
if 'is_last' in kwargs:
self._is_last = bool(kwargs['is_last'])

self._tag = None
facility = None
if isinstance(navcog_route[0], geojson.RouteLink):
facility = navcog_route[0].source_node.facility
elif self._is_last == False:
facility = navcog_route[-1].target_node.facility

if facility:
self._tag = facility.properties.hulop_tags

super(NarrowGoal, self).__init__(delegate, navcog_route, anchor, **kwargs)

def enter(self):
Expand All @@ -827,10 +811,7 @@ def enter(self):
self.delegate.please_follow_behind()
self.wait_for_announce()
else:
if self._tag == "short":
self.narrow_enter(NarrowGoal.LITTLE_NARROW_BASE_ON_ELEVATOR_BT_XML)
else:
self.narrow_enter(NarrowGoal.LITTLE_NARROW_BT_XML)
self.narrow_enter(NarrowGoal.LITTLE_NARROW_BT_XML)

def done_callback(self, future):
CaBotRclpyUtil.info("NarrowGoal completed")
Expand All @@ -856,10 +837,7 @@ def narrow_enter(self, bt):

@util.setInterval(5, times=1)
def wait_for_announce(self):
if self._tag == "short":
self.narrow_enter(NarrowGoal.NARROW_BASE_ON_ELEVATOR_BT_XML)
else:
self.narrow_enter(NarrowGoal.NARROW_BT_XML)
self.narrow_enter(NarrowGoal.NARROW_BT_XML)

@util.setInterval(5, times=1)
def wait_next_navi(self, future):
Expand Down
32 changes: 30 additions & 2 deletions cabot_ui/config/cabot2-ace_diagnostic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ diagnostic_aggregator:
path: discard
contains:
- "Push Button 5"
- "PeoplePredict"
- "realsense2_camera_manager_aligned_depth_to_color: Frequency Status"

soft_cabot_ui:
Expand Down Expand Up @@ -43,9 +44,8 @@ diagnostic_aggregator:
type: diagnostic_aggregator/GenericAnalyzer
path: "Soft: People_and_Obstacle"
contains:
- "People"
- "PeopleTrack"
- "Obstacle"
- "CameraInput"
- "Queue"
remove_prefix:
- "camera detect_darknet_opencv_node: "
Expand All @@ -56,6 +56,34 @@ diagnostic_aggregator:
- "track_obstacle: "
- "predict_obstacle: "

soft_rs:
type: diagnostic_aggregator/AnalyzerGroup
path: "Camera"
analyzers:
front:
type: diagnostic_aggregator/GenericAnalyzer
path: "Front"
contains:
- "rs1"
remove_prefix:
- "detect_darknet_people_cpp: "
soft_rs2:
type: cabot_diagnostics/CabotAnalyzer
path: "Right"
contains:
- "rs2"
remove_prefix:
- "detect_darknet_people_cpp: "
treat_as_warning: true
soft_rs3:
type: cabot_diagnostics/CabotAnalyzer
path: "Left"
contains:
- "rs3"
remove_prefix:
- "detect_darknet_people_cpp: "
treat_as_warning: true

soft_ros2:
type: diagnostic_aggregator/GenericAnalyzer
path: "Soft: Navigation2"
Expand Down