Public Member Functions | Public Attributes | Private Member Functions
actionlib.simple_action_client.SimpleActionClient Class Reference

List of all members.

Public Member Functions

def __init__
 Constructs a SimpleActionClient and opens connections to an ActionServer.
def cancel_all_goals
 Cancels all goals currently running on the action server.
def cancel_goal
 Cancels the goal that we are currently pursuing.
def cancel_goals_at_and_before_time
 Cancels all goals prior to a given timestamp.
def get_goal_status_text
 Returns the current status text of the goal.
def get_result
 Gets the Result of the current goal.
def get_state
 Get the state information for this goal.
def send_goal
 Sends a goal to the ActionServer, and also registers callbacks.
def send_goal_and_wait
 Sends a goal to the ActionServer, waits for the goal to complete, and preempts goal is necessary.
def stop_tracking_goal
 Stops tracking the state of the current goal.
def wait_for_result
 Blocks until this goal transitions to done.
def wait_for_server
 Blocks until the action server connects to this client.

Public Attributes

 action_client
 active_cb
 done_cb
 done_condition
 feedback_cb
 gh
 simple_state

Private Member Functions

def _handle_feedback
def _handle_transition
def _set_simple_state

Detailed Description

Definition at line 45 of file simple_action_client.py.


Constructor & Destructor Documentation

def actionlib.simple_action_client.SimpleActionClient.__init__ (   self,
  ns,
  ActionSpec 
)

Constructs a SimpleActionClient and opens connections to an ActionServer.

Parameters:
nsThe namespace in which to access the action. For example, the "goal" topic should occur under ns/goal
ActionSpecThe *Action message type. The SimpleActionClient will grab the other message types from this type.

Definition at line 53 of file simple_action_client.py.


Member Function Documentation

def actionlib.simple_action_client.SimpleActionClient._handle_feedback (   self,
  gh,
  feedback 
) [private]

Definition at line 260 of file simple_action_client.py.

Definition at line 227 of file simple_action_client.py.

Definition at line 274 of file simple_action_client.py.

Cancels all goals currently running on the action server.

This preempts all goals running on the action server at the point that this message is serviced by the ActionServer.

Definition at line 200 of file simple_action_client.py.

Cancels the goal that we are currently pursuing.

Definition at line 215 of file simple_action_client.py.

Cancels all goals prior to a given timestamp.

This preempts all goals running on the action server for which the time stamp is earlier than the specified time stamp this message is serviced by the ActionServer.

Definition at line 210 of file simple_action_client.py.

Returns the current status text of the goal.

The text is sent by the action server. It is designed to help debugging issues on the server side.

Returns:
The current status text of the goal.

Definition at line 186 of file simple_action_client.py.

Gets the Result of the current goal.

Definition at line 151 of file simple_action_client.py.

Get the state information for this goal.

Possible States Are: PENDING, ACTIVE, RECALLED, REJECTED, PREEMPTED, ABORTED, SUCCEEDED, LOST.

Returns:
The goal's state. Returns LOST if this SimpleActionClient isn't tracking a goal.

Definition at line 166 of file simple_action_client.py.

def actionlib.simple_action_client.SimpleActionClient.send_goal (   self,
  goal,
  done_cb = None,
  active_cb = None,
  feedback_cb = None 
)

Sends a goal to the ActionServer, and also registers callbacks.

If a previous goal is already active when this is called. We simply forget about that goal and start tracking the new goal. No cancel requests are made.

Parameters:
done_cbCallback that gets called on transitions to Done. The callback should take two parameters: the terminal state (as an integer from actionlib_msgs/GoalStatus) and the result.
active_cbNo-parameter callback that gets called on transitions to Active.
feedback_cbCallback that gets called whenever feedback for this goal is received. Takes one parameter: the feedback.

Definition at line 83 of file simple_action_client.py.

def actionlib.simple_action_client.SimpleActionClient.send_goal_and_wait (   self,
  goal,
  execute_timeout = rospy.Duration(),
  preempt_timeout = rospy.Duration() 
)

Sends a goal to the ActionServer, waits for the goal to complete, and preempts goal is necessary.

If a previous goal is already active when this is called. We simply forget about that goal and start tracking the new goal. No cancel requests are made.

If the goal does not complete within the execute_timeout, the goal gets preempted

If preemption of the goal does not complete withing the preempt_timeout, this method simply returns

Parameters:
execute_timeoutThe time to wait for the goal to complete
preempt_timeoutThe time to wait for preemption to complete
Returns:
The goal's state.

Definition at line 110 of file simple_action_client.py.

Stops tracking the state of the current goal.

Unregisters this goal's callbacks

This is useful if we want to make sure we stop calling our callbacks before sending a new goal. Note that this does not cancel the goal, it simply stops looking for status info about this goal.

Definition at line 224 of file simple_action_client.py.

def actionlib.simple_action_client.SimpleActionClient.wait_for_result (   self,
  timeout = rospy.Duration() 
)

Blocks until this goal transitions to done.

Parameters:
timeoutMax time to block before returning. A zero timeout is interpreted as an infinite timeout.
Returns:
True if the goal finished. False if the goal didn't finish within the allocated timeout

Definition at line 126 of file simple_action_client.py.

def actionlib.simple_action_client.SimpleActionClient.wait_for_server (   self,
  timeout = rospy.Duration() 
)

Blocks until the action server connects to this client.

Parameters:
timeoutMax time to block before returning. A zero timeout is interpreted as an infinite timeout.
Returns:
True if the server connected in the allocated time. False on timeout

Definition at line 65 of file simple_action_client.py.


Member Data Documentation

Definition at line 53 of file simple_action_client.py.

Definition at line 83 of file simple_action_client.py.

Definition at line 83 of file simple_action_client.py.

Definition at line 53 of file simple_action_client.py.

Definition at line 83 of file simple_action_client.py.

Definition at line 53 of file simple_action_client.py.

Definition at line 53 of file simple_action_client.py.


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


actionlib
Author(s): Eitan Marder-Eppstein, Vijay Pradeep
autogenerated on Thu Jan 2 2014 11:03:50