RobEthiChor-ROS is the ROS2-based implementation of the RobEthiChor framework, enabling robots to make ethically-informed by realizing context-aware, ethics-based negotiation to resolve conflicts and personalize autonomous decision-making according to user moral preferences.
RobEthiChor-ROS implements a standalone architectural overlay that can be plugged on top of the robotic controller to enable ethics-based negotiation.
For more details, check our paper published in Journal of Systems and Software.
Clone the repository:
git clone https://github.com/gianlucafilippone/robethichor-ros.git
cd robethichor-ros
docker build -t robethichor .
docker run robethichor
- Ubuntu 22.04
- ROS 2 (Humble recommended) with development tools
- Rosdep
Robethichor needs to be built using colcon in order to run.
First create a folder for the ROS workspace, e.g.:
mkdir robethichor_ws
Move the downloaded repository into the src folder inside the workspace:
mv robethichor robethichor_ws/src
Install dependencies using Rosdep:
Note
Rosdep must be installed and initialized before building the ROS package. Install Rosdep:
apt-get update
apt-get install python3-rosdep
Initialize Rosdep:
sudo rosdep init
rosdep update
cd robethichor_ws
apt-get update
rosdep install --from-paths src -y --ignore-src
Important
Before building the package, remember to configure the ethical implications and the disposition activation according to the system requirements. Also, the Mission Controller component must be completed by providing the planning and task execution. Further details here.
Build the package:
colcon build
source install/setup.bash
This repository provides a bash script for starting Robethichor:
cd src
chmod +x launch.bash
./launch.bash
Note
By default, Robethichor will run its nodes with namespace robethichor and will expose its RESTful endpoints on the port 5000. Additional configuration may be provided by runnig with parameters:
./launch.bash --namespace <namespace> --port <port>
As an alternative, Robethichor can be launched using the ROS launchfile:
ros2 launch robethichor robethichor_launch.py ns:=<namespace> port:=<port> ethical_implication_file:=<full/path/to/ethical/implication/file.json> disposition_activation_file:=<full/path/to/disposition/activation/file.json> log_output_file:=<full/path/to/log/file>
The Connector node exposes endpoints are exposed to provide user-related informations.
User status has to be provided through the RESTful endpoint [POST] http://<host>:<port>/status.
Example payload:
{
"s1": true,
"s2": true,
"s3": true,
"s4": false,
"s5": false
}User ethic profiles have to be provided through the RESTful endpoint [POST] http://<host>:<port>/profile.
Example payload:
{
"c1": {
"d1": 3,
"d2": 2,
"d3": 1
},
"c2": {
"d1": 2,
"d2": 4,
"d4": 2,
}
}Goals have to be provided through the RESTful endpoint [POST] http://<host>:<port>/goal.
Example payload:
{
"goal": "goal name"
}Important
The mission controller is the only component that must be refined/adapted for the use case needs. By default, sending any goal will mock the execution of a fake task t1, triggering the start of the negotiation.
RobEthiChor needs to be configured to fit the application domain.
The Mission Controller node needs to be adapted to aptly control the robot. Also, the model of ethical implications and disposition activations need to be configured as follows.
Configured through the ethical_implications.json file.
Configured through the disposition_activation.json file.
{
"c1": "Context Value 1",
"c2": "Context Value 2",
"c3": "Context Value 3"
}Please cite our paper if you use RobEthiChor in your work
Memon, M. A., Filippone, G., Scoccia, G. L., Autili, M., & Inverardi, P. (2026). RobEthiChor: Automated context-aware ethics-based negotiation for autonomous robots. Journal of Systems and Software, 232, 112692. doi:10.1016/j.jss.2025.112692
@article{robethichor,
title = {RobEthiChor: Automated context-aware ethics-based negotiation for autonomous robots},
author = {Mashal Afzal Memon and Gianluca Filippone and Gian Luca Scoccia and Marco Autili and Paola Inverardi},
journal = {Journal of Systems and Software},
volume = {232},
pages = {112692},
year = {2026},
issn = {0164-1212},
doi = {https://doi.org/10.1016/j.jss.2025.112692}
}
This project is licensed under the Apache-2.0 license - see the LICENSE file for details.
