Public Member Functions | Private Member Functions | Private Attributes
fetch_pbd_interaction.interaction.Interaction Class Reference

List of all members.

Public Member Functions

def __init__
def update

Private Member Functions

def _add_grasp
def _close_hand
def _copy_action
def _copy_primitive
def _create_action
def _delete_action
def _delete_all_primitives
def _delete_last_primitive
def _delete_primitive
def _end_execution
def _execute_action
def _execute_primitive
def _gui_input_cb
def _hide_primitive_marker
def _interaction_ping
def _next_action
def _open_hand
def _previous_action
def _primitive_pose_edited
def _record_objects
def _save_target
def _select_primitive
def _show_primitive_marker
def _start_recording_trajectory
def _stop_execution
def _stop_recording_trajectory
def _switch_primitive_order
def _switch_to_action
def _update_action_name
def _world_update_cb

Private Attributes

 _head_busy
 _im_server
 _is_recording_motion
 _ping_srv
 _responses
 _robot
 _session
 _tf_listener
 _viz_publisher

Detailed Description

Interaction is the multiplexer of commands received into system
actions.

Interaction receives GUI input (gui_input) and sends
these off into the system to be
processed. Interaction holds a small amount of state to support
recording trajectories.

Definition at line 44 of file interaction.py.


Constructor & Destructor Documentation

def fetch_pbd_interaction.interaction.Interaction.__init__ (   self,
  grasp_suggestion_service,
  grasp_feedback_topic,
  external_ee_link,
  to_file,
  from_file,
  play_sound,
  social_gaze 
)

Definition at line 54 of file interaction.py.


Member Function Documentation

def fetch_pbd_interaction.interaction.Interaction._add_grasp (   self,
  msg 
) [private]
Callback to add a grasp for the specified object to 
the current action

Args:
    msg (Landmark)

Definition at line 545 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._close_hand (   self,
  gui_input 
) [private]
Closes gripper

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 490 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._copy_action (   self,
  gui_input 
) [private]
Copies action with certain index

Args:
    gui_input (GuiInputRequest) : contains index of action to copy

Definition at line 367 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._copy_primitive (   self,
  gui_input 
) [private]
Copies primitive with certain index from current action

Args:
    gui_input (GuiInputRequest) : contains index of primitive to copy

Definition at line 396 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._create_action (   self,
  gui_input 
) [private]
Creates a new empty action.

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 288 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._delete_action (   self,
  gui_input 
) [private]
Deletes action with certain index

Args:
    gui_input (GuiInputRequest) : contains index of action to delete

Definition at line 359 of file interaction.py.

Deletes all primitives in the current action.

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 413 of file interaction.py.

Deletes last primitive of the current action.

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 431 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._delete_primitive (   self,
  gui_input 
) [private]
Deletes primitive with certain index from current action

Args:
    gui_input (GuiInputRequest) : contains index of primitive to delete

Definition at line 388 of file interaction.py.

Says a response and performs a gaze action for when an action
execution ends.

Definition at line 202 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._execute_action (   self,
  gui_input 
) [private]
Starts the execution of the current action.

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 614 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._execute_primitive (   self,
  gui_input 
) [private]
Execute primitive with certain index

Args:
    gui_input (GuiInputRequest) : contains index of primitive to execute

Definition at line 650 of file interaction.py.

Callback for when input is received from GUI

Args:
    req (GuiInputRequest): The input received from GUI

Definition at line 241 of file interaction.py.

Hide marker with certain index

Args:
    gui_input (GuiInputRequest) : contains index of marker to hide

Definition at line 449 of file interaction.py.

This is the service that is provided so that external nodes
know the interaction (i.e. PbD) is ready. This basically exists
for tests that haven't been written yet for Fetch.

Args:
    req (PingRequest): unused

Returns:
    PingResponse: empty

Definition at line 224 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._next_action (   self,
  gui_input 
) [private]
Switches to next action.

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 317 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._open_hand (   self,
  gui_input 
) [private]
Opens gripper

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 465 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._previous_action (   self,
  gui_input 
) [private]
Switches to previous action.

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 334 of file interaction.py.

Updates the primitive pose with input from the interface

Args:
    gui_input (GuiInputRequest) : contains pose information

Definition at line 603 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._record_objects (   self,
  gui_input 
) [private]
Makes the robot look for a table and objects.

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 514 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._save_target (   self,
  gui_input 
) [private]
Saves current arm state as an action primitive (ArmTarget).

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 529 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._select_primitive (   self,
  gui_input 
) [private]
Selects a primitive in the current action.

Args:
    gui_input (GuiInputRequest) : contains index of primitive to select

Definition at line 404 of file interaction.py.

Show marker with certain index

Args:
    gui_input (GuiInputRequest) : contains index of marker to show

Definition at line 457 of file interaction.py.

Starts recording continuous motion.

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 563 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._stop_execution (   self,
  gui_input 
) [private]
Stops ongoing execution after current primitive is finished

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 633 of file interaction.py.

Stops recording continuous motion.

Args:
    gui_input (GuiInputRequest) : unused

Definition at line 584 of file interaction.py.

Changes the order of primitives

Args:
    gui_input (GuiInputRequest) : contains the previous and current indices
                   of the moved primitive

Definition at line 377 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._switch_to_action (   self,
  gui_input 
) [private]
Switches to an action that is already loaded in the session.

The action is accessed by the index in the session's action list.
The index is 0-based, so the first action is action 0.

Args:
    gui_input (GuiInputRequest) : contains the index into the session's action
                   list to switch to.

Definition at line 298 of file interaction.py.

def fetch_pbd_interaction.interaction.Interaction._update_action_name (   self,
  gui_input 
) [private]
Update name of action.

Args:
    gui_input (GuiInputRequest) : contains new name of action

Definition at line 351 of file interaction.py.

Respond to changes in world
Right now these changes are mostly initiated by
this class anyway but in case something else changes
we want to keep track

Args:
    msg (WorldState)

Definition at line 189 of file interaction.py.

General update for the main loop.

This is called continuously from the node.
This pauses for 100ms at the end of every
run before returning.

Definition at line 137 of file interaction.py.


Member Data Documentation

Definition at line 54 of file interaction.py.

Definition at line 54 of file interaction.py.

Definition at line 54 of file interaction.py.

Definition at line 54 of file interaction.py.

Definition at line 54 of file interaction.py.

Definition at line 54 of file interaction.py.

Definition at line 54 of file interaction.py.

Definition at line 54 of file interaction.py.

Definition at line 54 of file interaction.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