Defines behaviour for Grasp primitive. This is for primitives where the arm moves to a single pose.
def fetch_pbd_interaction.grasp.Grasp.__init__ | ( | self, | |
robot, | |||
tf_listener, | |||
im_server, | |||
grasp_suggestion_service_name = None , |
|||
grasp_feedback_topic = None , |
|||
external_ee_link = None , |
|||
landmark = None , |
|||
number = None |
|||
) |
Args: robot (Robot) : interface to lower level robot functionality tf_listener (TransformListener) im_server (InteractiveMarkerSerever) arm_state (ArmState, optional) gripper_state (GripperState.OPEN|GripperState.CLOSED, optional) number (int, optional): The number of this primitive in the action sequence
def fetch_pbd_interaction.grasp.Grasp._add_6dof_marker | ( | self, | |
int_marker, | |||
is_fixed | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._change_grasp_frames | ( | self, | |
target_frame | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._change_ref_cb | ( | self, | |
feedback | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._convert_ref_frame | ( | self, | |
new_landmark | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._delete_primitive_cb | ( | self, | |
feedback | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._generate_grasps_cb | ( | self, | |
feedback | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._get_json_from_arm_state | ( | arm_state | ) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._get_json_from_landmark | ( | landmark | ) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._get_json_from_pose | ( | pose | ) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._get_json_from_pose_stamped | ( | pose_stamped | ) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._get_marker_pose | ( | self | ) | [private] |
def fetch_pbd_interaction.grasp.Grasp._get_matrix_from_pose | ( | pose | ) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._get_menu_id | ( | self, | |
ref_name | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._get_menu_name | ( | self, | |
menu_id | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._get_menu_ref | ( | self | ) | [private] |
def fetch_pbd_interaction.grasp.Grasp._get_pose_from_json | ( | json | ) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._get_pose_from_transform | ( | transform | ) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._get_pose_stamped_from_json | ( | json | ) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._make_6dof_control | ( | self, | |
name, | |||
orientation, | |||
is_move, | |||
is_fixed | |||
) | [private] |
Creates and returns one component of the 6dof controller. Args: name (str): Name for hte control orientation (Quaternion): How the control should be oriented. is_move (bool): Looks like whether the marker moves the object (?). Currently passed as True for moving markers, False for rotating ones. is_fixed (bool): Looks like whether position is fixed (?). Currently always passed as True. Returns: InteractiveMarkerControl
def fetch_pbd_interaction.grasp.Grasp._make_gripper_markers | ( | self, | |
control | |||
) | [private] |
Makes a gripper marker, adds it to control, returns control. Args: control (InteractiveMarkerControl): IM Control we're using. is_hand_open (bool, optional): Whether the gripper is open. Defaults to False (closed). Returns: InteractiveMarkerControl: The passed control.
def fetch_pbd_interaction.grasp.Grasp._make_mesh_marker | ( | color | ) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._marker_feedback_cb | ( | self, | |
feedback | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._move_to_cb | ( | self, | |
feedback | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._offset_pose | ( | pose, | |
constant = 1 |
|||
) | [static, private] |
def fetch_pbd_interaction.grasp.Grasp._regenerate_grasps_cb | ( | self, | |
feedback | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._set_new_pose | ( | self, | |
new_pose, | |||
frame_id | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._set_pre_grasp_state_from_pose | ( | self, | |
pose_stamped | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._set_ref | ( | self, | |
new_ref | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._suggest_grasps | ( | self, | |
landmark | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._switch_grasp_cb | ( | self, | |
feedback | |||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp._update_menu | ( | self | ) | [private] |
def fetch_pbd_interaction.grasp.Grasp._update_viz_core | ( | self, | |
check_reachable = True |
|||
) | [private] |
def fetch_pbd_interaction.grasp.Grasp.add_marker_callbacks | ( | self, | |
click_cb, | |||
delete_cb, | |||
pose_change_cb, | |||
action_change_cb | |||
) |
Adds marker to world
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.build_from_json | ( | self, | |
json | |||
) |
Fills out Grasp using json from db
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.build_from_pose | ( | self, | |
pose_stamped, | |||
landmark, | |||
approach_dist = 0.1 , |
|||
name = '' |
|||
) |
def fetch_pbd_interaction.grasp.Grasp.change_ref_frame | ( | self, | |
ref_type, | |||
landmark | |||
) |
Sets new reference frame for primitive Args:
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
Currently just a placeholder Meant to return conditions that need to be met after a primitive is executed in order for execution to be a success. This could be something like "object must be 0.1m above surface" Returns: None
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
Currently just a placeholder Meant to return conditions that need to be met before a primitive can be executed. This could be something like "There should only be one object" or something. Returns: None
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.decrease_id | ( | self | ) |
Reduces the number of the primitive.
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.execute | ( | self | ) |
Execute this primitive, assumes that gripper commands just work Returns bool : Success of execution
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.get_absolute_marker_pose | ( | self, | |
use_final = True |
|||
) |
Returns the absolute pose of the primitive marker. Args: use_final (bool, optional). Unused Returns: PoseStamped
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.get_absolute_marker_position | ( | self, | |
use_final = True |
|||
) |
Returns the absolute position of the primitive marker. Args: use_final (bool, optional) : Unused True. Returns: Point
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
Returns the absolute pose of the grasp part of the primitive (not the pre-grasp). Args: None Returns: PoseStamped
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.get_json | ( | self | ) |
Returns json representation of primitive
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.get_name | ( | self | ) |
Returns the display name for the primitive. Returns: str: A human-readable unique name for the primitive.
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.get_number | ( | self | ) |
Returns number of primitive Returns: int
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
Returns what number this primitive is in the sequence Returns: int
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.get_ref_type | ( | self | ) |
Return reference type of primitive Returns: ArmState.ROBOT_BASE, etc
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.get_relative_pose | ( | self, | |
use_final = True |
|||
) |
Returns the absolute pose of the primitive. Args: use_final (bool, optional). If true, uses pose of grasp_state rather than pre_grasp_state Returns: PoseStamped
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.head_busy | ( | self | ) |
Return true if head busy Returns: bool
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.hide_marker | ( | self | ) |
Removes marker from the world.
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
Check if the marker control is visible Returns bool
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
Check if this primitive requires an object to be present Returns: bool
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.is_reachable | ( | self | ) |
Check if robot can physically reach target
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.is_selected | ( | self | ) |
Return whether or not primitive is selected Returns bool
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.marker_visible | ( | self | ) |
Return whether or not marker is visible Returns: bool
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.pose_editable | ( | self | ) |
Return whether pose of primitive is editable Returns: bool : True
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.select | ( | self, | |
is_selected | |||
) |
Set whether primitive is selected or not Args: is_selected (bool)
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.set_control_visible | ( | self, | |
visible = True |
|||
) |
Set visibility of marker controls Args: visible (bool, optional)
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.set_name | ( | self, | |
name | |||
) |
Sets the display name for the primitive. Args: name (str) : A human-readable unique name for the primitive.
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.set_pose | ( | self, | |
new_pose | |||
) |
Changes the pose of the primitive to new_pose. Args: new_pose (PoseStamped)
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.set_primitive_number | ( | self, | |
number | |||
) |
Sets what number this primitive is in the sequence Args: num (int)
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.show_marker | ( | self | ) |
Adds marker for primitive
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
Updates and re-assigns coordinate frames when the world changes.
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
def fetch_pbd_interaction.grasp.Grasp.update_viz | ( | self, | |
check_reachable = True |
|||
) |
Updates visualization fully. Args: check_reachable (bool) : whether to evaluate reachability before drawing marker
Reimplemented from fetch_pbd_interaction.primitive.Primitive.
fetch_pbd_interaction::grasp.Grasp::_offset = DEFAULT_OFFSET [static, private] |