Public Member Functions | Private Member Functions | Private Attributes
fetch_pbd_interaction.session.Session Class Reference

List of all members.

Public Member Functions

def __init__
def add_arm_target_to_action
def add_grasp_to_action
def clear_current_action
def copy_action
def copy_primitive
def delete_action
def delete_action_current_action
def delete_last_primitive
def delete_primitive
def execute_current_action
def execute_primitive
def get_current_action
def head_busy
def hide_primitive_marker
def n_actions
def n_primitives
def new_action
def next_action
def previous_action
def publish_primitive_tf
def record_objects
def select_action_primitive
def show_primitive_marker
def start_recording_arm_trajectory
def stop_recording_arm_trajectory
def switch_primitive_order
def switch_to_action_by_index
def switch_to_action_by_name
def update_action_name
def update_arm_trajectory
def update_primitive_pose

Private Member Functions

def _action_change_cb
def _async_update_session_state
def _get_action_names
def _get_actions_disabled
def _get_marker_visibility
def _get_primitive_names
def _get_primitive_positions_orientations
def _get_primitives_editable
def _get_ref_frame_names
def _get_session_state
def _get_session_state_cb
def _load_session_state
def _publish_primitive_tf
def _selected_primitive_cb
def _update_db_with_action
def _update_db_with_current_action
def _update_session_state

Private Attributes

 _action_ids
 _actions
 _actions_disabled
 _clear_world_objects_srv
 _couch
 _current_action_id
 _current_arm_trajectory
 _db
 _external_ee_link
 _from_file
 _get_object_list_srv
 _grasp_feedback_topic
 _grasp_suggestion_service
 _head_busy
 _im_server
 _json
 _lock
 _marker_visibility
 _robot
 _selected_primitive
 _state_publisher
 _status_publisher
 _tf_broadcaster
 _tf_listener
 _to_file
 _update_world_srv

Detailed Description

Everything related to the state of actions and primitives
in the current session

Definition at line 41 of file session.py.


Constructor & Destructor Documentation

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.


Member Function Documentation

Updates the db when primitive deleted.

Definition at line 855 of file session.py.

Launches a new thread to asynchronously update experiment
state.

Definition at line 872 of file session.py.

Return the names of all of the actions in the session

Returns:
    [string]

Definition at line 920 of file session.py.

Returns whether each action is disabled currently 
(due to grasp suggestion not being available)

Returns:
    [bool]

Definition at line 973 of file session.py.

Get the visibility of the markers

Returns:
    [bool]

Definition at line 797 of file session.py.

Returns a list of the names of the
primitives of the current action.

Returns:
    [str]

Definition at line 959 of file session.py.

Returns positions and orientations of primitives

Returns:
    Point[], OrientationRPY[]

Definition at line 947 of file session.py.

Returns list of whether primitive poses are editable

Returns:
    [bool]

Definition at line 984 of file session.py.

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.

Creates and returns a message with the latest state.

Returns:
    SessionState

Definition at line 890 of file session.py.

Response to the experiment state service call.

Args:
    req (GetSessionStateRequest): Unused.
Returns:
    GetSessionStateResponse

Definition at line 862 of file session.py.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.


Member Data Documentation

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.


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


fetch_pbd_interaction
Author(s): Sarah Elliott
autogenerated on Thu Jun 6 2019 18:27:21