robokudo.utils.query

Classes

QueryHandler

QueryHandler provides an interface to interact with the ROS Action-based query interface.

Module Contents

class robokudo.utils.query.QueryHandler

Bases: object

QueryHandler provides an interface to interact with the ROS Action-based query interface. This wrapper eases the use of the various Blackboard variables devoted to the communication with the query interface.

static init_feedback_queue() None

Initializes the feedback queue on the Blackboard.

static get_feedback_queue() queue.Queue

Retrieves and returns the feedback queue from the Blackboard.

static send_feedback(feedback: robokudo_msgs.action.Query.Feedback) None

Add a feedback part of the Query msg to the feedback queue, ready to be sent.

Parameters:

feedback – The feedback message to send.

static send_feedback_str(feedback_str: str) None

Add a simple string to the feedback to the feedback queue, ready to be sent.

Parameters:

feedback_str – The string to send as feedback.

static send_answer(result: robokudo_msgs.action.Query.Result) None

Raise a standard RoboKudo Query Result as a query answer to the blackboard.

Parameters:

result – The result to raise to the blackboard.

static send_arbitrary_answer(result: Any) None

Raise any data as a query answer to the blackboard.

Parameters:

result – The data to raise to the blackboard.

static preempt_requested() bool

Checks whether a preempt request is pending on the blackboard.

Returns:

True if a preempt request is pending, False otherwise.

static acknowledge_preempt_request() None

Acknowledges the preempt request on the blackboard.