AvoidPointsInCoveragePath Class
Modifies a coverage path to route around obstacle points using semicircular detours. More...
Declaration
Included Headers
Base class
| class | BT::SyncActionNode |
Public Constructors Index
| AvoidPointsInCoveragePath (const std::string &name, const BT::NodeConfiguration &config) | |
|
Constructor. More... | |
Public Member Functions Index
| BT::NodeStatus | tick () override |
|
Execute the behavior: modify the coverage path to avoid obstacle points. More... | |
Public Static Functions Index
| static BT::PortsList | providedPorts () |
|
Declare input and output ports. More... | |
| static BT::KeyValueVector | metadata () |
|
Provide metadata for the MoveIt Studio Developer Tool UI. More... | |
Private Static Functions Index
| static std::vector< size_t > | filterRelevantObstacles (const std::vector< geometry_msgs::msg::PoseStamped > &coverage_path, const std::vector< geometry_msgs::msg::PoseStamped > &points_to_avoid, double boustrophedon_spacing) |
|
Find indices of obstacles within boustrophedon spacing of any path point. More... | |
| static int | findClosestObstacle (const geometry_msgs::msg::PoseStamped ¤t_point, const std::vector< geometry_msgs::msg::PoseStamped > &points_to_avoid, const std::vector< size_t > &relevant_obstacles, double avoidance_radius) |
|
Return the index of the closest obstacle within avoidance_radius, or -1 if none. More... | |
| static size_t | insertSemicircularDetour (const std::vector< geometry_msgs::msg::PoseStamped > &coverage_path, const std::vector< geometry_msgs::msg::PoseStamped > &points_to_avoid, int obstacle_idx, double avoidance_radius, int loop_segments, size_t current_i, std::vector< geometry_msgs::msg::PoseStamped > &modified_path) |
|
Insert a semicircular detour for one obstacle into modified_path. More... | |
Description
Modifies a coverage path to route around obstacle points using semicircular detours.
For each obstacle point that falls within the boustrophedon spacing of the path, the behavior inserts a semicircular detour on the opposite side of the path from the obstacle. Points that fall within the avoidance radius of an obstacle are removed from the output path and replaced by the arc.
| Data Port Name | Port Type | Object Type |
|---|---|---|
| coverage_path | input | std::vector<geometry_msgs::msg::PoseStamped> |
| points_to_avoid | input | std::vector<geometry_msgs::msg::PoseStamped> |
| stride_spacing | input | double |
| avoidance_radius | input | double |
| loop_segments | input | int |
| modified_path | output | std::vector<geometry_msgs::msg::PoseStamped> |
Definition at line 32 of file avoid_points_in_coverage_path.hpp.
Public Constructors
AvoidPointsInCoveragePath()
|
Constructor.
- Parameters
-
name The name of a particular instance of this Behavior.
config Runtime configuration for this Behavior, including port mappings.
Declaration at line 40 of file avoid_points_in_coverage_path.hpp, definition at line 73 of file avoid_points_in_coverage_path.cpp.
Public Member Functions
tick()
|
Execute the behavior: modify the coverage path to avoid obstacle points.
- Returns
SUCCESS after producing the modified path, FAILURE if required ports are missing.
Declaration at line 58 of file avoid_points_in_coverage_path.hpp, definition at line 260 of file avoid_points_in_coverage_path.cpp.
Public Static Functions
metadata()
| static |
Provide metadata for the MoveIt Studio Developer Tool UI.
- Returns
A BT::KeyValueVector containing the Behavior metadata.
Declaration at line 52 of file avoid_points_in_coverage_path.hpp, definition at line 94 of file avoid_points_in_coverage_path.cpp.
providedPorts()
| static |
Declare input and output ports.
- Returns
The list of ports for this behavior.
Declaration at line 46 of file avoid_points_in_coverage_path.hpp, definition at line 78 of file avoid_points_in_coverage_path.cpp.
Private Static Functions
filterRelevantObstacles()
| static |
Find indices of obstacles within boustrophedon spacing of any path point.
Declaration at line 65 of file avoid_points_in_coverage_path.hpp, definition at line 101 of file avoid_points_in_coverage_path.cpp.
findClosestObstacle()
| static |
Return the index of the closest obstacle within avoidance_radius, or -1 if none.
Declaration at line 72 of file avoid_points_in_coverage_path.hpp, definition at line 122 of file avoid_points_in_coverage_path.cpp.
insertSemicircularDetour()
| static |
Insert a semicircular detour for one obstacle into modified_path.
- Returns
The next path index to process after the detour.
Declaration at line 81 of file avoid_points_in_coverage_path.hpp, definition at line 143 of file avoid_points_in_coverage_path.cpp.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.