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 |
Definition at line 46 of file simple_action_client.py.
def actionlib.simple_action_client.SimpleActionClient.__init__ | ( | self, | |
ns, | |||
ActionSpec | |||
) |
Constructs a SimpleActionClient and opens connections to an ActionServer.
ns | The namespace in which to access the action. For example, the "goal" topic should occur under ns/goal |
ActionSpec | The *Action message type. The SimpleActionClient will grab the other message types from this type. |
Definition at line 54 of file simple_action_client.py.
def actionlib.simple_action_client.SimpleActionClient._handle_feedback | ( | self, | |
gh, | |||
feedback | |||
) | [private] |
Definition at line 247 of file simple_action_client.py.
def actionlib.simple_action_client.SimpleActionClient._handle_transition | ( | self, | |
gh | |||
) | [private] |
Definition at line 214 of file simple_action_client.py.
def actionlib.simple_action_client.SimpleActionClient._set_simple_state | ( | self, | |
state | |||
) | [private] |
Definition at line 260 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 191 of file simple_action_client.py.
Cancels the goal that we are currently pursuing.
Definition at line 203 of file simple_action_client.py.
def actionlib.simple_action_client.SimpleActionClient.cancel_goals_at_and_before_time | ( | self, | |
time | |||
) |
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 199 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.
Definition at line 180 of file simple_action_client.py.
Gets the Result of the current goal.
Definition at line 148 of file simple_action_client.py.
Get the state information for this goal.
Possible States Are: PENDING, ACTIVE, RECALLED, REJECTED, PREEMPTED, ABORTED, SUCCEEDED, LOST.
Definition at line 162 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.
done_cb | Callback 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_cb | No-parameter callback that gets called on transitions to Active. |
feedback_cb | Callback 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
execute_timeout | The time to wait for the goal to complete |
preempt_timeout | The time to wait for preemption to complete |
Definition at line 109 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 211 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.
timeout | Max time to block before returning. A zero timeout is interpreted as an infinite timeout. |
Definition at line 124 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.
timeout | Max time to block before returning. A zero timeout is interpreted as an infinite timeout. |
Definition at line 66 of file simple_action_client.py.
Definition at line 54 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 54 of file simple_action_client.py.
Definition at line 83 of file simple_action_client.py.
Definition at line 54 of file simple_action_client.py.
Definition at line 54 of file simple_action_client.py.