This repository contains small ROS 2 examples built with cs4home_architecture. The examples show how sensor information is received by a cognitive module, processed by its Core component and published for use by the rest of the system.
Two examples are included:
- Face identities from
hri_face_detectare converted into knowledge-graph updates. - Camera images are processed by the YOLO example and published as detections.
The terms below follow the CoreSense Ontology (CSO).
- A camera or face tracker supplies observations originating from a Sensor.
- Each example implements a Cognitive Function that transforms incoming information.
- The YOLO example contributes a visual-perception Cognitive Capability.
- The face example contributes information that can be retained by a World Model.
flowchart LR
faces["Tracked face identities"] --> face["Face cognitive function"]
face --> knowledge_graph["Knowledge-graph update"]
camera["Camera image"] --> yolo["YOLO cognitive function"]
yolo --> detections["Object detections"]
mkdir -p ~/cs4home_examples_ws/src
cd ~/cs4home_examples_ws/src
git clone https://github.com/CoreSenseEU/cs4home_examples.git
vcs import --recursive < cs4home_examples/thirdparty.repos
cd ..
python3 -m venv --system-site-packages py_deps
source py_deps/bin/activate
pip install -r src/thirdparty/hri_face_detect/requirements.txt
pip install -r src/thirdparty/yolov8_ros/requirements.txt
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
source install/setup.bashStart the camera and YOLO dependency, then run:
ros2 launch cs4home_simple_project yolo_example.launch.pyFor the face example, start hri_face_detect and run the face module with the supplied parameters:
ros2 run cs4home_simple_project face_module --ros-args \
--params-file src/cs4home_examples/cs4home_simple_project/config/params_simple.yamlThe face result can be inspected with the knowledge-graph RQt plugin.
