EasyFleet
A simple-by-default framework for multi-robot, multi-capability fleets built on ROS 2
Loading...
Searching...
No Matches
conflict_detector.hpp
1// Copyright 2026 Intelligent Robotics Lab
2//
3// This file is part of the project EasyFleet
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#ifndef EASYFLEET_NAVIGATION_MANAGER__CONFLICT_DETECTOR_HPP_
17#define EASYFLEET_NAVIGATION_MANAGER__CONFLICT_DETECTOR_HPP_
18
19#include <map>
20#include <set>
21#include <string>
22#include <vector>
23
24#include "nav_msgs/msg/path.hpp"
25
26namespace easyfleet
27{
28
32{
43 double proximity_radius_m {3.0};
44};
45
52{
53 std::string robot_a;
54 std::string robot_b;
56 double current_distance_m {0.0};
60 bool in_conflict {false};
63 std::string yielding_robot;
68 std::string reason;
69};
70
117std::set<std::string> compute_robots_to_pause(
118 const std::map<std::string, nav_msgs::msg::Path> & robot_paths,
119 const ConflictParams & params = ConflictParams(),
120 const std::set<std::string> & already_paused = {},
121 std::vector<ConflictDecision> * decisions = nullptr);
122
123} // namespace easyfleet
124
125#endif // EASYFLEET_NAVIGATION_MANAGER__CONFLICT_DETECTOR_HPP_
Explains one pair's evaluation – only produced for pairs that are at least within ConflictParams::pro...
Definition conflict_detector.hpp:52
std::string yielding_robot
Which robot yields (stays/becomes paused) because of this pair.
Definition conflict_detector.hpp:63
bool in_conflict
Whether this pair is currently considered an imminent conflict.
Definition conflict_detector.hpp:60
std::string reason
Human-readable explanation of the decision, e.g.
Definition conflict_detector.hpp:68
double min_lookahead_distance_m
Closest distance found between the two lookahead segments.
Definition conflict_detector.hpp:58
double current_distance_m
Distance between the two robots' current positions.
Definition conflict_detector.hpp:56
Tunable geometry for imminent-conflict detection between two robots' planned paths.
Definition conflict_detector.hpp:32
double lookahead_distance_m
How far ahead along each path (arc length, in meters) to look when checking whether the two robots ar...
Definition conflict_detector.hpp:35
double path_conflict_distance_m
How close two robots' lookahead segments must come to each other, at some sampled pair of points,...
Definition conflict_detector.hpp:38
double proximity_radius_m
How close the robots' current positions (path.poses.front()) must be for a conflict to even be consid...
Definition conflict_detector.hpp:43