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.

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 62 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 71 of file generate_coverage_path.hpp, definition at line 86 of file generate_coverage_path.cpp.

Public Member Functions

tick()

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

Declaration at line 78 of file generate_coverage_path.hpp, definition at line 117 of file generate_coverage_path.cpp.

Public Static Functions

metadata()

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

Declaration at line 76 of file generate_coverage_path.hpp, definition at line 112 of file generate_coverage_path.cpp.

providedPorts()

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

Declaration at line 74 of file generate_coverage_path.hpp, definition at line 92 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 65 of file generate_coverage_path.hpp.

kHeightPortID

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

Definition at line 67 of file generate_coverage_path.hpp.

kStrideDistancePortID

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

Definition at line 68 of file generate_coverage_path.hpp.

kVectorOfPosesPortID

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

Definition at line 69 of file generate_coverage_path.hpp.

kWidthPortID

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

Definition at line 66 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.