Skip to main content

GetPoseFromPixelCoords Class

Given a point cloud and normalized pixel XY coordinates, outputs a stamped pose corresponding to a point normal to the selected coordinates. More...

Declaration​

class moveit_pro::behaviors::GetPoseFromPixelCoords { ... }

Included Headers​

#include <get_pose_from_pixel_coords.hpp>

Base class​

classAsyncBehaviorBase

A base class for behaviors which need to asynchronously run a function that might take a long time to complete. More...

Public Constructors Index​

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

Private Member Functions Index​

tl::expected< bool, std::string >doWork () override

User-implemented function which handles executing the potentially-long-running process. More...

std::shared_future< tl::expected< bool, std::string > > &getFuture () override

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member. More...

Private Member Attributes Index​

std::shared_future< tl::expected< bool, std::string > >future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member. More...

Public Static Functions Index​

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

Description​

Given a point cloud and normalized pixel XY coordinates, outputs a stamped pose corresponding to a point normal to the selected coordinates.

This assumes that the pixel XY coordinates are normalized, i.e., have values in the range [0..1] relative to the image's height and width. When camera_info is set, the point cloud is projected into that image and the point nearest each selected pixel is used, instead of indexing an organized cloud directly. The transform between the camera frame and the point cloud frame is looked up at the point cloud's time stamp, and the pixel coordinates must refer to the rectified image. The output pose always aligns the Z axis with the normal of the plane by using the smallest eigenvalue of a planar patch with radius neighbor_radius around a selected point.

Data Port NamePort TypeObject Type
point_cloudinputsensor_msgs::msg::PointCloud2
pixel_coordsinputstd::vector<geometry_msgs::msg::PointStamped>
camera_infoinputsensor_msgs::msg::CameraInfo
downsample_fractioninputdouble
neighbor_radiusinputdouble
output_posesoutputstd::vector<geometry_msgs::msg::PoseStamped>

Definition at line 35 of file get_pose_from_pixel_coords.hpp.

Public Constructors​

GetPoseFromPixelCoords()​

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

Declaration at line 38 of file get_pose_from_pixel_coords.hpp, definition at line 270 of file get_pose_from_pixel_coords.cpp.

Private Member Functions​

doWork()​

tl::expected< bool, std::string > moveit_pro::behaviors::GetPoseFromPixelCoords::doWork ()
virtual

User-implemented function which handles executing the potentially-long-running process.

This function is called within an async process in a separate thread.

Returns

A tl::expected which contains a bool indicating task success if the process completed successfully or was canceled, or an error message if the process failed unexpectedly.

Declaration at line 46 of file get_pose_from_pixel_coords.hpp, definition at line 309 of file get_pose_from_pixel_coords.cpp.

getFuture()​

std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::GetPoseFromPixelCoords::getFuture ()
inline virtual

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member.

Definition at line 48 of file get_pose_from_pixel_coords.hpp.

Private Member Attributes​

future_​

std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::GetPoseFromPixelCoords::future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member.

Definition at line 54 of file get_pose_from_pixel_coords.hpp.

Public Static Functions​

metadata()​

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

Declaration at line 43 of file get_pose_from_pixel_coords.hpp, definition at line 303 of file get_pose_from_pixel_coords.cpp.

providedPorts()​

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

Declaration at line 41 of file get_pose_from_pixel_coords.hpp, definition at line 276 of file get_pose_from_pixel_coords.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.