harmoni_common_lib.action_client¶
Module Contents¶
Classes¶
A wrapper around SimpleActionClient that is structured for HARMONI architecture. |
Attributes¶
- harmoni_common_lib.action_client.path¶
- harmoni_common_lib.action_client.using_kinetic¶
- harmoni_common_lib.action_client.libgcc_s¶
- harmoni_common_lib.action_client.to_string¶
- class harmoni_common_lib.action_client.HarmoniActionClient(name)¶
Bases:
objectA wrapper around SimpleActionClient that is structured for HARMONI architecture.
Credit goes to https://github.com/ros/actionlib/blob/noetic-devel/actionlib/src/actionlib/simple_action_client.py for the simple_action_client this is based on.
Routers and managers are clients. This class provides basic client functionality which routers and managers extend, including basic type checking, warnings, interrupts, etc.
- send_goal(self, action_goal, optional_data='', condition='', time_out=60, wait=True)¶
Sends a goal to the action server tied to this client.
- Parameters
action_goal (harmoniGoal) – The goal object given to the action server
optional_data –
Reset of check variables. Send goal and set the time out
- setup_client(self, action_type, result_cb_fnc=None, feedback_cb_fnc=None, wait=True)¶
Init client action variables and setup client
- Parameters
action_type (str) – The name of the action server the client should connect to. #TODO rename. this is just the server name.
result_cb_fnc (func) – [Optional] A callback function handle for action results (done state).
feedback_cb_fnc (func) – [Optional] A callback function handle for action feedback.
wait (bool) – Indicates whether or not to wait
- wait_for_server(self, timeout=rospy.Duration())¶
- send_goal_and_wait(self, goal, execute_timeout=rospy.Duration(), preempt_timeout=rospy.Duration())¶
- wait_for_result(self, timeout=rospy.Duration())¶
- get_result(self)¶
- get_state(self)¶
- get_goal_status_text(self)¶
- cancel_all_goals(self)¶
- cancel_goals_at_and_before_time(self, time)¶
- cancel_goal(self)¶
- stop_tracking_goal(self)¶
- _handle_transition(self, gh)¶
- _handle_feedback(self, gh, feedback)¶
- _result_cb(self, terminal_state, result)¶
Save the action result