ROS-Causal

ROS-Causal

ROS-Causal: A ROS-based Causal Analysis Framework for Human-Robot Interaction Applications

1University of Lincoln, UK, 2University of Padua, Italy, 3National Research Council of Italy
Causal-HRI: Causal Learning for Human-Robot Interaction" workshop at the 2024 ACM/IEEE International Conference on Human-Robot Interaction (HRI)

Abstract

Deploying robots in human-shared spaces requires understanding interactions among nearby agents and objects. Modelling cause-and-effect relations through causal inference aids in predicting human behaviours and anticipating robot interventions. However, a critical challenge arises as existing causal discovery methods currently lack an implementation inside the ROS ecosystem, the standard de facto in robotics, hindering effective utilisation in robotics. To address this gap, this paper introduces ROS-Causal, a ROS-based framework for onboard data collection and causal discovery in human-robot spatial interactions. An ad-hoc simulator, integrated with ROS, illustrates the approach's effectiveness, showcasing the robot onboard generation of causal models during data collection.

What is ROS-Causal?

ROS-Causal is a ROS-Based Causal Analysis Framework that facilitates robot onboard data collection and causal discovery in human-robot spatial interactions. It is composed by four main ROS nodes:

  • roscausal_robot: collects data from several rostopics related to the robot (e.g., position, velocity, target position, etc.), and merge them into a single rostopic roscausal/robot
  • roscausal_human: collects data from several rostopics related to the human (e.g., position, velocity, target position, etc.), and merge them into a single rostopic roscausal/human
  • roscausal_data: subscribes to the topics /roscausal/robot and /roscausal/human and begins collecting data in a CSV file. Once the desired time-series length (rosparam) is reached, the node provides the option to post-process the data and finally saves the CSV file into a designated folder
  • roscausal_discovery: performs causal discovery analysis on the collected data and publishes the result on the roscausal/causal_model rostopic. So far, it incorporates two causal discovery methods: PCMCI and F-PCMCI.
It is important to highlight that roscausal_data and roscausal_discovery ROS nodes operate asynchronously, allowing the simultaneous execution of causal analysis on one dataset while continuing the collection of another.

ROS-Causal simultaneously collects data from an HRI scenario and conducts causal discovery analysis on board of the robot.

In this paper, we provide a detailed technical explanation of ROS-Causal, accompanied by an experimental evaluation in a simulated environment: ROS-Causal_HRISim.

ROS-Causal_HRISim is a Gazebo-based human-robot interaction simulator that accurately replicates HRI scenarios involving a TIAGo robot and multiple pedestrians. The pedestrians are controlled either by social forces or user teleoperation (via keyboard). The simulator has been designed to facilitate the setup of real-life HRI scenarios and the execution of causal analysis within them. For the latter, ROS-Causal has been integrated into the ROS-Causal_HRISim simulator.

Single-agent scenario Multi-agent scenario Corridor scenario

To evaluate ROS-Causal, we designed an HRI scenario involving a TIAGo robot and a teleoperated individual, represented by the red manikin. The green dot indicates the target position for the person. For the causal analysis, we considered a predefined set of variables, comprising:

  • v - human velocity;
  • dg - distance between the human and his target position;
  • r - risk of collision with the robot.
In the designed scenario, the robot follows a predefined path, while the person, who is teleoperated, has a target position that is randomly chosen within the map and changes once reached by the person. In particular, a new target position is randomly chosen for the person, who then starts moving toward the goal, gradually reducing her velocity as she approaches it. Upon reaching the goal, a new target position is randomly selected, and the process repeats. If, during her path to the goal, the person encounters the robot, she must avoid it by decreasing her velocity and/or adjusting her steering. Therefore, the expected causal links in this scenario are as follows:
  • vdg, dg depends inversely on v
  • dgvr, v is a direct function of the dg, but it is also affected by the collision risk r
  • vr depends on the velocity

By using ROS-Causal, we were able to retrieve the correct causal model.

Single-agent scenario Causal Model

Presentation

BibTeX and useful links

ROS-Causal: A ROS-based Causal Analysis Framework for Human-Robot Interaction Applications

@inproceedings{castri2024ros,
        title={ROS-Causal: A ROS-based Causal Analysis Framework for Human-Robot Interaction Applications},
        author={Castri, Luca and Beraldo, Gloria and Mghames, Sariah and Hanheide, Marc and Bellotto, Nicola},
        booktitle={Workshop on Causal Learning for Human-Robot Interaction (Causal-HRI), ACM/IEEE International Conference on Human-Robot Interaction (HRI)},
        year={2024}
      }
      





Experimental Evaluation of ROS-Causal in Real-World Human-Robot Spatial Interaction Scenarios

1University of Lincoln, UK, 2University of Padua, Italy, 3National Research Council of Italy
IEEE International Conference on Robot and Human Interactive Communication (RO-MAN)

Abstract

Deploying robots in human-shared environments requires a deep understanding of how nearby agents and objects interact. Employing causal inference to model cause-and-effect relationships facilitates the prediction of human behaviours and enables the anticipation of robot interventions. However, a significant challenge arises due to the absence of implementation of existing causal discovery methods within the ROS ecosystem, the standard de-facto framework in robotics, hindering effective utilisation on real robots. To bridge this gap, in our previous work we proposed ROS-Causal, a ROS-based framework designed for onboard data collection and causal discovery in human-robot spatial interactions. In this work, we present an experimental evaluation of ROS-Causal both in simulation and on a new dataset of real-world human-robot spatial interactions to assess its performance and effectiveness. Our analysis demonstrates the efficacy of this approach, showcasing how causal models can be extracted directly onboard by robots during data collection. The online causal models generated from the simulation are consistent with those from real-world experiments. These findings can help researchers to enhance the performance of robotic systems in shared environments, firstly by studying the causal relations between variables in simulation without real people, and then facilitating the actual robot deployment on real human environments.

Real-World Experiments

In this paper, we extend the previous work by adding an experimental evaluation of ROS-Causal by using HRSI data from a real-world scenario.
The experiment and data collection occurred in a laboratory room of the University of Lincoln (UK), measuring 5 x 8.2m. Fifteen participants (6 females), aged between 25 and 55 took part in the experiment. Seven of them were used to work with a robot. They were required to walk between four goal positions (G1, G2, G3, G4) and avoid the robot if a cross occurs.
A predefined rectangular path was set for the TIAGo robot to navigate along the room and generate frequent interactions with the participants. The robot was equipped by a 3D Velodyne VLP-16 LiDAR (1) to track the person taking part at the experiment.

TIAGo robot Experiment setup 2D map

The experimental procedure is inspired by the one previously presented in the simulation environment created by ROS-Causal_HRISim and can be described as follows. Each participant started from one of the four target positions. The next target position was randomly chosen by the participant, who then started moving towards it. Upon reaching the goal position, the participant stopped there and randomly chose the next goal, repeating the process for 5 minutes. In this experimental setting, the robot was considered by the participant as an obstacle to avoid while walking towards their target positions.
For each participant, a causal discovery analysis was conducted on the collected data and a causal model was retrieved. In the following an example of causal model retrieved by using the data of the A1 participant. As the real-world HRSI was similar to the one created in simulation, the two causal models shares the same structure.

A1 interaction
Causal Model from ROS-Causal_HRISim Causal Model from Real-World Experiment



ROS-Causal Evaluation

The following figures present the execution time and data requirement analyses. In particular, (left) and (centre) depict the execution time and the Structural Hamming Distance (SHD) metrics for various time horizon (time-series length). In this analysis, we execute the causal analysis using both PCMCI and F-PCMCI causal discovery methods included in ROS-Causal, considering different percentages of the time-series length, ranging from 10% up to 100% of the full length, corresponding to an average of 5 minutes per participant. For each time-horizon, we measure the execution time needed for the causal discovery analysis and the SHD of the reconstructed causal model.

On the other hand, (right) shows an analysis of the sampling frequency. Specifically, considering the full length time-series, we performed the causal discovery analysis for various sampling frequencies, ranging from 0.5Hz to 10Hz that is the original sampling frequency.

These analyses helped us identify the sampling frequency and time-series length required to generate accurate causal models for this specific HRSI scenario, while also evaluating the execution time for the causal analysis. More details and considerations can be found in the associated paper.

Execution Time vs time horizon SHD vs time horizon Corridor scenario vs sampling frequency



Dataset

Human-Robot Spatial Interaction Dataset for Causal Analysis from Mobile Platforms

The dataset captures a Human-Robot Spatial Interaction (HRSI) scenario between a person and the TIAGo robot. It focuses specifically on human-goal and human-robot spatial interaction in an indoor environment, captured from the perspective of a 3D Velodyne VLP-16 LiDAR mounted on the TIAGo robot. It includes:

  • rosbags containing: Velodyne LiDAR point clound, robot and human state (position, orientation and velocities);
  • CSV files containing trajectories of the person and the robot generated by post-processing the rosbags;
  • the map of the environment extracted from the TIAGo robot.
15 participants took part in the experiment, with the dataset capturing 5 minutes of HRSI motion for each participant.

Environment and participant information
The experiment and data collection occurred in a laboratory room of the University of Lincoln (UK), measuring 5 x 8.2m. Fifteen participants (6 females), aged between 25 and 55 took part in the experiment. Seven of the participants were robotics researchers who regularly work with robots.

Experiment procedure
Participants' task was to navigate between four designated goal positions (G1, G2, G3, G4) while avoiding collisions with the robot when crossing paths. Specifically, they were instructed to begin from a goal position randomly chosen by themselves, select the next one randomly, walk toward it, and repeat this process until the robot stopped (i.e., after 5 minutes from the start). They were asked to pass through all the goal positions at least 7 times and avoid the robot when encountering it. No specific instructions were provided regarding how to reach the goal positions or avoid the robot.

A predefined rectangular path was set for the TIAGo robot to navigate along the room and generate frequent interactions with the participants.

A1 interaction A2 interaction A3 interaction A4 interaction A5 interaction
A6 interaction A7 interaction A8 interaction A9 interaction A10 interaction
A11 interaction A12 interaction A13 interaction A14 interaction A15 interaction

Presentation

BibTeX and useful links

Experimental Evaluation of ROS-Causal in Real-World Human-Robot Spatial Interaction Scenarios

@inproceedings{castri2024exp,
        title={Experimental Evaluation of ROS-Causal in Real-World Human-Robot Spatial Interaction Scenarios},
        author={Castri, Luca and Beraldo, Gloria and Mghames, Sariah and Hanheide, Marc and Bellotto, Nicola},
        booktitle={2024 33nd IEEE International Conference on Robot and Human Interactive Communication (RO-MAN)},
        pages={},
        year={2024},
        organization={IEEE}
      }