Infer a parallel jaw grasp pose from point cloud of an object. Details of the machine learning model can be seen at https://github.com/antoalli/L2G The point cloud of the object to grasp is given through point_cloud
. No inference of what the point cloud represents is done, nor any notion of collision checking. Only the points of the object to be grasped should be given. The point cloud should approximately fit in a 0.22 meter cube. number_of_grasps_to_return
is a simple clamping and the model is always inferring a fixed number, which is about 50. model_path
locates the .onnx
file of the model weights. If model_package
is specified, model_path
will be assumed relative to its directory. grasps
are the poses of the closed end effector tip. They are not sorted by quality and require feasibility and collision checking.
More...
#include <l2g_grasping.hpp>
|
static BT::PortsList | providedPorts () |
| Implementation of the required providedPorts() function for the Behavior.
|
|
static BT::KeyValueVector | metadata () |
| Implementation of the metadata() function for displaying metadata, such as Behavior description and subcategory, in the MoveIt Studio Developer Tool.
|
|
|
tl::expected< bool, std::string > | doWork () override |
| User-implemented function which handles executing the potentially-long-running process.
|
|
virtual tl::expected< void, std::string > | doHalt () |
| Optionally implement additional work needed to cleanly interrupt the async process.
|
|
void | notifyCanHalt () |
| Called when runAsync() finishes to notify onHalted() that the async process has finished.
|
|
Infer a parallel jaw grasp pose from point cloud of an object. Details of the machine learning model can be seen at https://github.com/antoalli/L2G The point cloud of the object to grasp is given through point_cloud
. No inference of what the point cloud represents is done, nor any notion of collision checking. Only the points of the object to be grasped should be given. The point cloud should approximately fit in a 0.22 meter cube. number_of_grasps_to_return
is a simple clamping and the model is always inferring a fixed number, which is about 50. model_path
locates the .onnx
file of the model weights. If model_package
is specified, model_path
will be assumed relative to its directory. grasps
are the poses of the closed end effector tip. They are not sorted by quality and require feasibility and collision checking.
Data Port Name | Port Type | Object Type |
point_cloud | input | sensor_msgs::msg::PointCloud2 |
number_of_grasps_to_return | input | unsigned int |
model_path | input | std::string |
model_package | input | std::string |
grasps | output | std::vector<geometry_msgs::msg::PoseStamped> |
◆ GetGraspPoseFromPointCloud()
Constructs the behavior for inferring grasps from point clouds.
- Parameters
-
name | of a particular instance of this Behavior. This will be set by the behavior tree factory when this Behavior is created within a new behavior tree. |
config | for this Behavior, such as the mapping between the Behavior's data ports on the behavior tree's blackboard. This will be set by the behavior tree factory when this Behavior is created within a new behavior tree. |
model | that does the grasp inference. |
An important limitation is that the members of the base Behavior class are not instantiated until after the initialize() function is called, so these classes should not be used within the constructor.
◆ ~GetGraspPoseFromPointCloud()
moveit_studio::behaviors::GetGraspPoseFromPointCloud::~GetGraspPoseFromPointCloud |
( |
| ) |
|
|
final |
Ensures the model finishes gracefully
◆ doWork()
tl::expected< bool, std::string > moveit_studio::behaviors::GetGraspPoseFromPointCloud::doWork |
( |
| ) |
|
|
overrideprotectedvirtual |
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.
Implements moveit_studio::behaviors::AsyncBehaviorBase.
◆ metadata()
BT::KeyValueVector moveit_studio::behaviors::GetGraspPoseFromPointCloud::metadata |
( |
| ) |
|
|
static |
Implementation of the metadata() function for displaying metadata, such as Behavior description and subcategory, in the MoveIt Studio Developer Tool.
- Returns
- A BT::KeyValueVector containing the Behavior metadata.
◆ providedPorts()
BT::PortsList moveit_studio::behaviors::GetGraspPoseFromPointCloud::providedPorts |
( |
| ) |
|
|
static |
Implementation of the required providedPorts() function for the Behavior.
The BehaviorTree.CPP library requires that Behaviors must implement a static function named providedPorts() which defines their input and output ports. If the Behavior does not use any ports, this function must return an empty BT::PortsList. This function returns a list of ports with their names and port info, which is used internally by the behavior tree.
- Returns
- List of ports for the behavior.
The documentation for this class was generated from the following files: