Go to the documentation of this file.
40 from actionlib
import ActionServer
57 def __init__(self, name, ActionSpec, execute_cb = None, auto_start = True):
74 self.
lock = threading.RLock();
106 rospy.logdebug(
"Accepting a new goal");
114 current_goal.set_accepted(
"This goal has been accepted by the simple action server");
132 return status == actionlib_msgs.msg.GoalStatus.ACTIVE
141 goal_handle.set_succeeded(result,text)
150 goal_handle.set_aborted(result,text)
165 rospy.logwarn(
"Cannot call ComplexActionServer.register_goal_callback() because an executeCallback exists. Not going to register it.");
180 rospy.logdebug(
"A new goal %shas been recieved by the single goal action server",goal.get_goal_id().id);
195 except Exception
as e:
196 rospy.logerr(
"ComplexActionServer.internal_goal_callback - exception %s",str(e))
206 loop_duration = rospy.Duration.from_sec(.1);
208 while (
not rospy.is_shutdown()):
209 rospy.logdebug(
"SAS: execute");
219 rospy.logerr(
"execute_callback_ must exist. This is a bug in ComplexActionServer");
224 print(
"run new executecb")
225 thread = threading.Thread(target=self.
run_goal,args=(goal_handle.get_goal(),goal_handle));
228 except Exception
as ex:
229 rospy.logerr(
"Exception in your execute callback: %s\n%s", str(ex),
230 traceback.format_exc())
231 self.
set_aborted(
None,
"Exception in execute callback: %s" % str(ex))
flexbe_input
Author(s): Philipp Schillinger, Philipp Schillinger
autogenerated on Fri Jul 21 2023 02:26:08