Skip to main content

GenerateCoveragePath Class

Creates a lawnmower path (a.k.a. boustrophedon path) for a robot end-effector to follow, to cover a given area. More...

Declaration​

class moveit_pro::behaviors::GenerateCoveragePath { ... }

Included Headers​

#include <generate_coverage_path.hpp>

Base class​

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Public Constructors Index​

GenerateCoveragePath (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)

Public Member Functions Index​

BT::NodeStatustick () override

Public Static Functions Index​

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Public Static Attributes Index​

static constexpr autokBottomRightCornerPortID = "bottom_right_corner"
static constexpr autokWidthPortID = "width"
static constexpr autokHeightPortID = "height"
static constexpr autokStrideDistancePortID = "stride_distance"
static constexpr autokVectorOfPosesPortID = "vector_of_poses"

Description​

Creates a lawnmower path (a.k.a. boustrophedon path) for a robot end-effector to follow, to cover a given area.

Deprecated

Use GenerateSurfaceCoveragePath instead. This Behavior will be removed in a future version. To port a tree, set region_pose to the bottom_right_corner pose moved by (width / 2, height / 2, 0) along its own axes and turned 180 degrees about its Y axis, region_dimensions to <width>;<height>;0, raster_layout to [{line_spacing: <stride_distance>, point_spacing: <width / 2>}], orientation_offset to 0;0;3.14159265 and standoff to 0. This assumes the corner pose's Z axis points into the surface, as the diagram below shows, so the turned pose's +Z points out of it. The replacement then keeps the tool orientation and the row order, starts on the corner row at its far end (width away from the corner), runs each row in the opposite direction, and samples a midpoint on every row. The rows match when height is two or more whole strides, up to floating-point rounding, which can add a row on the replacement or drop the top row here. A stride equal to height gives a single row halfway up instead of one at each edge, and any other stride spaces the rows evenly and also covers the last partial row, which this Behavior drops.

Data Port NamePort TypeObject Type
bottom_right_cornerInputgeometry_msgs::msg::PoseStamped
widthInputdouble
heightInputdouble
stride_distanceInputdouble
vector_of_posesOutputstd::vector<geometry_msgs::msg::PoseStamped>

The lawnmower path is generated by starting at the bottom right corner of the area, moving to the bottom left corner, then moving up the stride distance, back to the right, and so on until the top left corner is reached. Adjacent rows are joined by pure vertical strides, so every segment is axis-aligned and the robot never traverses a diagonal. As an example, this is a path with 8 waypoints (numbered 1 to 8):

 7>--------------->8
 | |
 | |
 6<-- - - - - - - <5
 | |
 | |
 3> - - - - - - -->4
 | | ^ y
 | | |
 2<---------------<1 |
  <----x bottom_right_corner
  x

It is assumed the frame of the bottom_right_corner pose is defined as shown in the diagram above, i.e. X pointing to the right, Y pointing up, and Z pointing into the page. The path is generated by moving along the x-axis first, then the y-axis. The width and height parameters define the size of the area to be covered, and the stride_distance parameter defines the distance between each lawnmower row, all dimensions given in meters.

If the stride distance doesn't add up exactly to the height, the last stride won't be included, i.e. the actual area covered will be less than the given height.

The path is returned as a vector of PoseStamped messages, in the same frame as the given bottom_right_corner pose.

Definition at line 74 of file generate_coverage_path.hpp.

Public Constructors​

GenerateCoveragePath()​

moveit_pro::behaviors::GenerateCoveragePath::GenerateCoveragePath (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources)

Declaration at line 83 of file generate_coverage_path.hpp, definition at line 95 of file generate_coverage_path.cpp.

Public Member Functions​

tick()​

BT::NodeStatus moveit_pro::behaviors::GenerateCoveragePath::tick ()

Declaration at line 90 of file generate_coverage_path.hpp, definition at line 131 of file generate_coverage_path.cpp.

Public Static Functions​

metadata()​

BT::KeyValueVector moveit_pro::behaviors::GenerateCoveragePath::metadata ()
static

Declaration at line 88 of file generate_coverage_path.hpp, definition at line 121 of file generate_coverage_path.cpp.

providedPorts()​

BT::PortsList moveit_pro::behaviors::GenerateCoveragePath::providedPorts ()
static

Declaration at line 86 of file generate_coverage_path.hpp, definition at line 101 of file generate_coverage_path.cpp.

Public Static Attributes​

kBottomRightCornerPortID​

constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kBottomRightCornerPortID = "bottom_right_corner"
constexpr static

Definition at line 77 of file generate_coverage_path.hpp.

kHeightPortID​

constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kHeightPortID = "height"
constexpr static

Definition at line 79 of file generate_coverage_path.hpp.

kStrideDistancePortID​

constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kStrideDistancePortID = "stride_distance"
constexpr static

Definition at line 80 of file generate_coverage_path.hpp.

kVectorOfPosesPortID​

constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kVectorOfPosesPortID = "vector_of_poses"
constexpr static

Definition at line 81 of file generate_coverage_path.hpp.

kWidthPortID​

constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kWidthPortID = "width"
constexpr static

Definition at line 78 of file generate_coverage_path.hpp.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.