Everything related to the state of actions and primitives in the current session
Definition at line 41 of file session.py.
def fetch_pbd_interaction.session.Session.__init__ | ( | self, | |
robot, | |||
_tf_listener, | |||
im_server, | |||
from_file = None , |
|||
to_file = None , |
|||
grasp_suggestion_service_name = None , |
|||
grasp_feedback_topic = None , |
|||
external_ee_link = None |
|||
) |
Args: robot (Robot) : interface to lower level robot functionality tf_listener (TransformListener) im_server (InteractiveMarkerSerever)
Definition at line 46 of file session.py.
def fetch_pbd_interaction.session.Session._action_change_cb | ( | self | ) | [private] |
Updates the db when primitive deleted.
Definition at line 855 of file session.py.
def fetch_pbd_interaction.session.Session._async_update_session_state | ( | self | ) | [private] |
Launches a new thread to asynchronously update experiment state.
Definition at line 872 of file session.py.
def fetch_pbd_interaction.session.Session._get_action_names | ( | self | ) | [private] |
Return the names of all of the actions in the session Returns: [string]
Definition at line 920 of file session.py.
def fetch_pbd_interaction.session.Session._get_actions_disabled | ( | self | ) | [private] |
Returns whether each action is disabled currently (due to grasp suggestion not being available) Returns: [bool]
Definition at line 973 of file session.py.
def fetch_pbd_interaction.session.Session._get_marker_visibility | ( | self | ) | [private] |
Get the visibility of the markers Returns: [bool]
Definition at line 797 of file session.py.
def fetch_pbd_interaction.session.Session._get_primitive_names | ( | self | ) | [private] |
Returns a list of the names of the primitives of the current action. Returns: [str]
Definition at line 959 of file session.py.
def fetch_pbd_interaction.session.Session._get_primitive_positions_orientations | ( | self | ) | [private] |
Returns positions and orientations of primitives Returns: Point[], OrientationRPY[]
Definition at line 947 of file session.py.
def fetch_pbd_interaction.session.Session._get_primitives_editable | ( | self | ) | [private] |
Returns list of whether primitive poses are editable Returns: [bool]
Definition at line 984 of file session.py.
def fetch_pbd_interaction.session.Session._get_ref_frame_names | ( | self | ) | [private] |
Returns a list of the names of the reference frames for the primitives of the current action. Returns: [str]
Definition at line 933 of file session.py.
def fetch_pbd_interaction.session.Session._get_session_state | ( | self | ) | [private] |
Creates and returns a message with the latest state. Returns: SessionState
Definition at line 890 of file session.py.
def fetch_pbd_interaction.session.Session._get_session_state_cb | ( | self, | |
req | |||
) | [private] |
Response to the experiment state service call. Args: req (GetSessionStateRequest): Unused. Returns: GetSessionStateResponse
Definition at line 862 of file session.py.
def fetch_pbd_interaction.session.Session._load_session_state | ( | self | ) | [private] |
Loads the experiment state from couchdb database or json file.
Definition at line 996 of file session.py.
def fetch_pbd_interaction.session.Session._publish_primitive_tf | ( | self, | |
primitive, | |||
parent = "base_link" |
|||
) | [private] |
Publishes a TF for primitive Args: primitive (Primitive) parent (str): The parent reference frame.
Definition at line 1057 of file session.py.
def fetch_pbd_interaction.session.Session._selected_primitive_cb | ( | self, | |
selected_primitive | |||
) | [private] |
Updates the selected primitive when interactive markers are clicked on. Args: selected_primitive (int): ID of the primitive selected.
Definition at line 842 of file session.py.
def fetch_pbd_interaction.session.Session._update_db_with_action | ( | self, | |
action, | |||
db_file = None |
|||
) | [private] |
Adds action to db if it does not already exist. Or if it exists, delete the existing entry and replace with update version Args: action (Action)
Definition at line 807 of file session.py.
def fetch_pbd_interaction.session.Session._update_db_with_current_action | ( | self | ) | [private] |
Adds current action to db if it does not already exist. Or if it exists, delete the existing entry and replace with update version
Definition at line 832 of file session.py.
def fetch_pbd_interaction.session.Session._update_session_state | ( | self | ) | [private] |
Publishes a message with the latest state.
Definition at line 879 of file session.py.
Add a new ArmTarget primitive to the current action.
Definition at line 247 of file session.py.
def fetch_pbd_interaction.session.Session.add_grasp_to_action | ( | self, | |
landmark | |||
) |
Add a grasp primitive to the current action. Args: landmark (Landmark)
Definition at line 265 of file session.py.
Removes all primitives in the current action.
Definition at line 207 of file session.py.
def fetch_pbd_interaction.session.Session.copy_action | ( | self, | |
action_id | |||
) |
Make a copy of action Args: action_id (int)
Definition at line 417 of file session.py.
def fetch_pbd_interaction.session.Session.copy_primitive | ( | self, | |
primitive_number | |||
) |
Make a copy of a primitive Args: primitive (int)
Definition at line 452 of file session.py.
def fetch_pbd_interaction.session.Session.delete_action | ( | self, | |
action_id | |||
) |
Deletes action by id Args: action_id (string|int)
Definition at line 511 of file session.py.
Delete current action
Definition at line 507 of file session.py.
Removes the last primitive of the action.
Definition at line 286 of file session.py.
def fetch_pbd_interaction.session.Session.delete_primitive | ( | self, | |
primitive_number | |||
) |
Delete specified primitive Args: primitive_number (int) : Number of primitive to be deleted
Definition at line 584 of file session.py.
Executes current action Returns: bool
Definition at line 690 of file session.py.
def fetch_pbd_interaction.session.Session.execute_primitive | ( | self, | |
primitive_number | |||
) |
Execute primitive with number Args: primitive_number (int)
Definition at line 622 of file session.py.
Returns the current action. Returns: Action
Definition at line 195 of file session.py.
def fetch_pbd_interaction.session.Session.head_busy | ( | self | ) |
Returns true if head is busy Returns: bool
Definition at line 125 of file session.py.
def fetch_pbd_interaction.session.Session.hide_primitive_marker | ( | self, | |
primitive_number | |||
) |
Hide marker with primitive_number Args: primitive_number (int)
Definition at line 596 of file session.py.
def fetch_pbd_interaction.session.Session.n_actions | ( | self | ) |
Returns the number of actions programmed so far. Returns: int
Definition at line 187 of file session.py.
Returns the number of primitives in the current action, or 0 if there is no current action. Returns: int
Definition at line 393 of file session.py.
def fetch_pbd_interaction.session.Session.new_action | ( | self, | |
name = None |
|||
) |
Creates new action.
Definition at line 153 of file session.py.
Switches to the next action. Returns: bool: Whether successfully switched to the next action.
Definition at line 367 of file session.py.
Switches to the previous action. Returns: bool: Whether successfully switched to the previous action.
Definition at line 380 of file session.py.
Publish tf frame for each primitive of current action
Definition at line 772 of file session.py.
Records poses of objects
Definition at line 674 of file session.py.
def fetch_pbd_interaction.session.Session.select_action_primitive | ( | self, | |
primitive_id | |||
) |
Makes the interactive marker for the indicated action primitive selected by showing the 6D controls. Args: primitive_id (int): ID of the primitive to select.
Definition at line 136 of file session.py.
def fetch_pbd_interaction.session.Session.show_primitive_marker | ( | self, | |
primitive_number | |||
) |
Show marker with primitive_number Args: primitive_number (int)
Definition at line 609 of file session.py.
Creates ArmTrajectory primitive that will be updated by update_arm_trajectory
Definition at line 224 of file session.py.
Finalises ArmTrajectory primitive. Updates the references frames and saves it to the db.
Definition at line 233 of file session.py.
def fetch_pbd_interaction.session.Session.switch_primitive_order | ( | self, | |
old_index, | |||
new_index | |||
) |
Change the order of primitives in action Args: old_index (int) new_index (int)
Definition at line 563 of file session.py.
def fetch_pbd_interaction.session.Session.switch_to_action_by_index | ( | self, | |
index | |||
) |
Switches to action with index Args: index (int): The action id to switch to. Returns: bool: Whether successfully switched to index action.
Definition at line 296 of file session.py.
def fetch_pbd_interaction.session.Session.switch_to_action_by_name | ( | self, | |
name | |||
) |
Switches to action with name Args: name (str): The action name to switch to. Returns: bool: Whether successfully switched to index action.
Definition at line 351 of file session.py.
def fetch_pbd_interaction.session.Session.update_action_name | ( | self, | |
name | |||
) |
Update name of current action Args: name (string)
Definition at line 407 of file session.py.
Saves current arm state into continuous trajectory.
Definition at line 216 of file session.py.
def fetch_pbd_interaction.session.Session.update_primitive_pose | ( | self, | |
primitive_number, | |||
position, | |||
orientation | |||
) |
Update pose of primitive given by primitive_number Args: primitive_number (int) position (Point) orientation (OrientationRPY)
Definition at line 782 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.
Definition at line 51 of file session.py.