Skip to content

behavior tree plugin PathLongerOnApproach bug report #4326

@StetroF

Description

@StetroF

Bug report

Required Info:

  • Operating System:
    -Ubuntu 22.04
  • ROS2 Version:
    -Humble
  • Version or commit hash:
    -1.1.14
  • DDS implementation:
    -CycloneDDS

Steps to reproduce issue

bool PathLongerOnApproach::isPathUpdated(
  nav_msgs::msg::Path & new_path,
  nav_msgs::msg::Path & old_path)
{
  return new_path != old_path && old_path.poses.size() != 0 &&
         new_path.poses.size() != 0 &&
         old_path.poses.back() == new_path.poses.back();
}

Expected behavior

Return true if path is update

Actual behavior

return false because in this line:
old_path.poses.back() == new_path.poses.back();
It compare two different path's PoseStamped.But The PoseStamped's comparison contain time's compare and position's compare:

  // comparison operators
  bool operator==(const PoseStamped_ & other) const
  {
    if (this->header != other.header) {
      return false;
    }
    if (this->pose != other.pose) {
      return false;
    }
    return true;
  }

Old path's last point's position is same as the new path's last point's position. Meanwhile, their timestamped is obviously different as i observed. So that even if the new path has updated. It will still return false.Which cause PathLongerOnApproach plugin out of action.
By the way. I tested it in the situation that use_sim_time : false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions