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 { ... }
#include <generate_coverage_path.hpp>
Base class
Public Constructors Index
| GenerateCoveragePath (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
|
|
|
Public Member Functions Index
| BT::NodeStatus | tick () override |
|
|
|
Public Static Functions Index
Public Static Attributes Index
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 Name | Port Type | Object Type |
|---|
| bottom_right_corner | Input | geometry_msgs::msg::PoseStamped |
| width | Input | double |
| height | Input | double |
| stride_distance | Input | double |
| vector_of_poses | Output | std::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) |
|
Public Member Functions
tick()
| BT::NodeStatus moveit_pro::behaviors::GenerateCoveragePath::tick () |
|
Public Static Functions
metadata()
| BT::KeyValueVector moveit_pro::behaviors::GenerateCoveragePath::metadata () |
|
static
|
providedPorts()
| BT::PortsList moveit_pro::behaviors::GenerateCoveragePath::providedPorts () |
|
static
|
Public Static Attributes
kBottomRightCornerPortID
| constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kBottomRightCornerPortID = "bottom_right_corner" |
|
constexpr
static
|
kHeightPortID
| constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kHeightPortID = "height" |
|
constexpr
static
|
kStrideDistancePortID
| constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kStrideDistancePortID = "stride_distance" |
|
constexpr
static
|
kVectorOfPosesPortID
| constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kVectorOfPosesPortID = "vector_of_poses" |
|
constexpr
static
|
kWidthPortID
| constexpr auto moveit_pro::behaviors::GenerateCoveragePath::kWidthPortID = "width" |
|
constexpr
static
|
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.