Public Member Functions | |
def | __init__ (self, ns, ActionSpec) |
Constructs a SimpleActionClient and opens connections to an ActionServer. More... | |
def | cancel_all_goals (self) |
Cancels all goals currently running on the action server. More... | |
def | cancel_goal (self) |
Cancels the goal that we are currently pursuing. More... | |
def | cancel_goals_at_and_before_time (self, time) |
Cancels all goals prior to a given timestamp. More... | |
def | get_goal_status_text (self) |
Returns the current status text of the goal. More... | |
def | get_result (self) |
Gets the Result of the current goal. More... | |
def | get_state (self) |
Get the state information for this goal. More... | |
def | send_goal (self, goal, done_cb=None, active_cb=None, feedback_cb=None) |
Sends a goal to the ActionServer, and also registers callbacks. More... | |
def | 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. More... | |
def | stop_tracking_goal (self) |
Stops tracking the state of the current goal. More... | |
def | wait_for_result (self, timeout=rospy.Duration()) |
Blocks until this goal transitions to done. More... | |
def | wait_for_server (self, timeout=rospy.Duration()) |
Blocks until the action server connects to this client. More... | |
Public Attributes | |
action_client | |
active_cb | |
done_cb | |
done_condition | |
feedback_cb | |
gh | |
simple_state | |
Private Member Functions | |
def | _handle_feedback (self, gh, feedback) |
def | _handle_transition (self, gh) |
def | _set_simple_state (self, 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.
|
private |
Definition at line 247 of file simple_action_client.py.
|
private |
Definition at line 214 of file simple_action_client.py.
|
private |
Definition at line 260 of file simple_action_client.py.
def actionlib.simple_action_client.SimpleActionClient.cancel_all_goals | ( | self | ) |
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.
def actionlib.simple_action_client.SimpleActionClient.cancel_goal | ( | self | ) |
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.
def actionlib.simple_action_client.SimpleActionClient.get_goal_status_text | ( | self | ) |
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.
def actionlib.simple_action_client.SimpleActionClient.get_result | ( | self | ) |
Gets the Result of the current goal.
Definition at line 148 of file simple_action_client.py.
def actionlib.simple_action_client.SimpleActionClient.get_state | ( | self | ) |
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.
def actionlib.simple_action_client.SimpleActionClient.stop_tracking_goal | ( | self | ) |
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.
actionlib.simple_action_client.SimpleActionClient.action_client |
Definition at line 55 of file simple_action_client.py.
actionlib.simple_action_client.SimpleActionClient.active_cb |
Definition at line 88 of file simple_action_client.py.
actionlib.simple_action_client.SimpleActionClient.done_cb |
Definition at line 87 of file simple_action_client.py.
actionlib.simple_action_client.SimpleActionClient.done_condition |
Definition at line 58 of file simple_action_client.py.
actionlib.simple_action_client.SimpleActionClient.feedback_cb |
Definition at line 89 of file simple_action_client.py.
actionlib.simple_action_client.SimpleActionClient.gh |
Definition at line 57 of file simple_action_client.py.
actionlib.simple_action_client.SimpleActionClient.simple_state |
Definition at line 56 of file simple_action_client.py.