Skip to main content

Event-Driven Mechanism

The HRI Framework operates in an event-driven manner, enabling natural and responsive interaction between humans and robots.

Events

Events are triggered when:

  • A person vocally interacts with the robot (providing a statement, instruction, or query).
  • A person applies a visual gesture.
  • The system itself generates an event (e.g., based on ROS topics, proactive behaviors, or as a response to another event).

Whenever an event occurs, an HRIRequest object is created.

Request Handling Pipeline

The workflow for handling requests is as follows:

  1. Event Creation
    An HRIRequest object is generated from the input (verbal, visual, system).

  2. Prioritization
    The HRIRequest is placed into a priority queue.

  3. Event Handling

    • The request is extracted from the queue.
    • The associated HRIEventHandler is instantiated and applied.
  4. Decision Helpers

    • If the event handler is associated with a DecisionHelper, it is invoked to modify the level of execution.
    • Example: A robot may refuse, slow down, or enthusiastically execute a task depending on the politeness of the request.
  5. Understanding and Response

    • If the robot has all necessary information, an HRIResponse object is created, containing a list of HRIActions to perform.
    • If information is missing, the request is moved to a waiting queue.
      • The robot issues a response indicating what is still missing.
      • As new information becomes available, the request is re-evaluated until complete.
  6. Task Dispatching

    • The finalized HRIResponse is sent to the task dispatcher.
    • The dispatcher sends HRIActions one-by-one to the Natural Actuation Layer for execution.

Example: Event Handling Configuration

An example configuration in the management_layer_config.json:

{
"verbal triggers": [
"come here",
"get over here"
],
"gesture triggers": [
"come here"
],
"social planner": {
"code": "hri_framework.HRI_LIB.hri_implementations.cogniteam.politeness_checker.PolitenessChecker"
},
"handler": {
"event": "navigate {person_location} 0.7"
},
"on failure": {
"event": "detect intentional blockage"
},
"on success": {
"event": "say ok, what's next?"
}
}

This configuration specifies:

Verbal Triggers:
Phrases such as "come here" and "get over here" will trigger the associated event.

Gesture Triggers:
A recognized visual gesture equivalent to "come here" will also trigger the event.

Social Planner (Decision Helper):
The event is associated with a PolitenessChecker, implemented in the HRI-LIB by Cogniteam.
This module evaluates the politeness of the instruction and adjusts the robot's compliance behavior accordingly (e.g., full compliance, partial compliance, or polite refusal).

Primary Event Handler:
The handler triggers a navigate event toward the {person_location}, using a confidence threshold of 0.7.

Failure Handling:
If the robot fails to navigate to the person, it raises a detect intentional blockage event.
This allows the system to distinguish between accidental obstacles (e.g., unaware people) and intentional blockages (e.g., playful interference).

Success Handling:
Upon successful navigation, the robot raises a say event, asking "ok, what's next?" to continue the interaction naturally.