Skip to content
Merged
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
6 changes: 3 additions & 3 deletions bt_nodes/perception/src/perception/IsDetected.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ BT::NodeStatus IsDetected::tick()

if (detection.score > threshold_ && detection.center3d.position.z < max_depth_) {
// Color filtering
if (color_ != "unknown") {
if (color_ != "unknown" && !color_.empty()) {
auto const detection_id_colors = perception_system::getHSVFromUniqueID(
detection.color_person);
std::string lower_color = "lower_" + color_;
Expand Down Expand Up @@ -237,7 +237,7 @@ BT::NodeStatus IsDetected::tick()
}

// gesture filtering
if (gesture_ != "unknown" && !removed) {
if (gesture_ != "unknown" && !gesture_.empty() && !removed) {
if (std::find(
gestures_[gesture_].begin(), gestures_[gesture_].end(),
detection.pointing_direction) != gestures_[gesture_].end())
Expand All @@ -255,7 +255,7 @@ BT::NodeStatus IsDetected::tick()
}

// pose filtering
if (pose_ != "unknown" && !removed) {
if (pose_ != "unknown" && !pose_.empty() && !removed) {
if (pose_names_[detection.body_pose] == pose_) {
RCLCPP_DEBUG(
node_->get_logger(), "[IsDetected] Detection %s is %s",
Expand Down
Loading