libaction

Library for ROS Actions.

class libaction.LibAction(libtf)

Bases: object

ROS Action library.

delete()
grasp_pose_estimation(conv_frame, origin_frame, id, d, mask, specific_direction)

The function of estimate grasp pose from the depth image and object mask.

Parameters
  • conv_frame (str) – Name of the converted frame.

  • origin_frame (str) – Name of the original frame.

  • id (str) – Object ID.

  • d (sensor_msgs/Image) – Depth image.

  • mask (sensor_msgs/Image) – Mask image of the object to grasp pose estimation.

  • specific_direction (int) – Fix the grasping direction to be estimated. Select from GraspPose.[TOP, FRONT]. - TOP: Estimate the grasp pose only from the top. - FRONT: Estimate the grasp pose only from the front.

Returns

Results of grasp pose estimation.

Return type

hma_common_action/GraspPoseEstimationResult

mapping_object(action, id=[''], name=[''], pose=[position:    x: 0.0   y: 0.0   z: 0.0 orientation:    x: 0.0   y: 0.0   z: 0.0   w: 0.0], score=[0.0], search_place='')

The function of mapping cluttered objects.

Parameters
  • action (int) – Select the action to be executed. Select from MappingAction.[ADD, MAPPING, DELETE, DELETEALL, CHECK, GET, GETALL, GETNEAREST] - ADD: Add objects. - MAPPING: Run the mapping and save the data. - DELETE: Delete specific object from the mapping data. - DELETEALL: Delete all objects from the mapping data. - CHECK: Check for the existence of an object in the mapping data, and if it exists, compare the scores and return the higher one. - GET: Get a specific object from the mapping data. - GETALL: Get all objects from the mapping data. - GETNEAREST: Get nearest object from the mapping data.

  • id (list[str], optional) – Object ID. Required for ADD, CHECK. Defaults to “”.

  • name (list[str], optional) – Object name. Required for ADD. Defaults to “”.

  • pose (list[geometry_msgs/Pose], optional) – 3D coordinates of a specific object. Required for ADD, DELETE, CHECK, GETNEAREST. Defaults to Pose().

  • score (list[float], optional) – Recognition score of a comparison objects. Required for ADD, CHECK. Defaults to 0.0.

  • search_place (str, optional) – Limit the search area. Optional for ADD, DELETE, CHECK, GETNEAREST. Defaults to “”.

Returns

Results for each action.

Return type

hma_common_action/MappingObjectResult