fluenthrc

Source code of the main application for the PhD thesis "Fluency in Dynamic Human-Robot Teaming with Intention Prediction"

https://github.com/ubt-ai3/fluenthrc

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Source code of the main application for the PhD thesis "Fluency in Dynamic Human-Robot Teaming with Intention Prediction"

Basic Info
  • Host: GitHub
  • Owner: ubt-ai3
  • License: mit
  • Language: C++
  • Default Branch: main
  • Size: 5.62 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created 8 months ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

DOI

Fluency in Dynamic Human-Robot Teaming with Intention Prediction - Main Application

Video Preview

TODO

  • Update link to Franka Proxy in line 45 of overlay-ports\franka-proxy\portfile.cmake and in the README

Getting Started

  1. Clone Repository to a short path (< 30 characters including repository folder): git clone https://resy-gitlab.inf.uni-bayreuth.de/flexcobot/core.git.
  2. Clone Sub-Repositories git submodule update --init --recursive.
  3. Download and install Kinect SDK v2 from: https://www.microsoft.com/en-us/download/details.aspx?id=44561
  4. Install Visual Studio: select the "Desktop development with C++" workload and additionally install:
    • .NET Framework SDK 4.7.2
    • .NET Framework SDK 4.7.2 targeting pack
  5. Download and install CUDA 12.8.1 from: https://developer.nvidia.com/cuda-12-8-1-download-archive?targetos=Windows&targetarch=x8664&targetversion=11&targettype=exelocal
  6. Download CUDNN (Version: tarball): https://developer.nvidia.com/cudnn
  7. Unzip into the installation directory of CUDA (%CUDA_PATH%), overwrite existing files if asked.
  8. Open Visual Studio (CMake Cache generation should trigger. Otherwise right click on "CMakeLists.txt" in Solution Explorer and select "Generate Cache")
  9. Wait for cmake to finish (may take some time)
  10. Download the CNN models for hand tracking here and copy merged_net.prototxt and merged_snapshot_iter_300000.caffemodel from GanHandsAPI.zip/data/CNNClassifier/rgb-crop_232_FINAL_synth+GAN_ProjLayer to externals/hand-pose-estimation/assets/network_models
  11. Open solution file in build/default, compile the program and run it.

Related Resources

  • (Video)[https://resy-server.inf.uni-bayreuth.de/resypub/files/hllerich2024a.Fluency.in.Dynamic.HumanRobot.Teaming.with.Intention.Prediction.mp4]
  • (HoloLens Application)[https://github.com/Olli1080/ar_integration/tree/5.4.3]
  • (Franka Proxy)[] # TODO
  • (Data and Plots)[https://codeocean.com/capsule/2820731/tree]

When using this code or related resources please mention the following paper in your work bibtex @PhdThesis{Hoellerich25, author = {Höllerich, Nico}, school = {Universit{\"a}t Bayreuth}, title = {Fluency in Dynamic Human-Robot Teaming with Intention Prediction}, year = {2025}, address = {Bayreuth}, type = {Dissertation}, journal = {Dissertation}, } For the hardware setup, see Appendix B.1 in the dissertation. To calibrate Kinect 2 and the robot: 1. Prepare the mat (assets\mat2.pdf) and objects. 2. run app_visualization and press l. 3. Repeatedly press the suction cup onto the highlighted blocks and press l (see at the end of source/app_visualization/module_manager.cpp).

Code Structure Overview

The main source code is located in the source/ directory, organized into the following modules:

Core Modules

state_observation/

Core module for state estimation and tracking: - Petri Net Modeling: Implements Petri net-based state representation and reasoning - Object Tracking: Handles object detection, tracking, and classification - Building Estimation: Manages spatial relationships and building structures - World Traceability: Links physical objects to Petri net tokens - Reasoning: Provides transition extraction and optimization

intention_prediction/

Predicts human intentions and actions: - Agent Management: Tracks and manages observed agents - Intention Prediction: Predicts future actions based on current state - Agent Observation: Monitors and analyzes agent behavior

simulation/

Provides simulation capabilities: - Scene Management: Handles virtual environment setup - Task Simulation: Simulates task execution - Behavior Testing: Tests various behaviors and scenarios - Franka Simulation: Simulates Franka robot behavior

Robot Control Modules

frankahighlevel/

High-level robot control: - Motion Control: Manages robot movement and trajectories - Task Execution: Handles high-level task commands - State Management: Tracks robot state and configuration

franka_planning/

Robot planning and decision making: - Motion Planning: Generates robot motion plans - Task Planning: Plans sequences of robot actions - Agent Logic: Implements robot decision-making

franka_voxel/

Motion controller to sample poses for vizualization as voxel grid.

Visualization and Interface Modules

app_visualization/

Visualization and user interface: - Task Progress: Visualizes task execution progress - Intention Display: Shows predicted intentions - Robot State: Displays robot state and actions - Petri Net Rendering: Visualizes Petri net states - Module Management: Coordinates visualization components

grpc_server/

Network communication: - Server Implementation: Handles gRPC server setup - Service Logic: Implements remote procedure calls - Point Cloud Processing: Processes point cloud data - HoloLens Integration: Manages HoloLens communication

Support Modules

kinect2_grabber/

Kinect v2 integration: - Data Acquisition: Captures Kinect sensor data - Point Cloud Processing: Processes depth and color data - Calibration: Handles sensor calibration

csv_reader/

Data import and processing: - Data Import: Reads CSV data files - Tracking Data: Processes tracking information - Data Validation: Validates imported data

sampledataregistration/

Sample data handling: - Data Registration: Registers sample data - Evaluation: Evaluates data quality - Hand/Object Analysis: Analyzes hand and object data

Module Interactions

The system's architecture follows a layered approach:

  1. Sensor Layer

    • kinect2_grabber provides raw sensor data
    • Data flows to state_observation for processing
  2. State Layer

    • state_observation processes sensor data
    • Updates Petri net models and object states
    • Feeds information to intention_prediction
  3. Prediction Layer

    • intention_prediction analyzes current state
    • Generates predictions for human actions
    • Informs franka_planning for robot responses
  4. Control Layer

    • franka_planning generates robot plans
    • franka_high_level executes plans
    • franka_voxel handles motion details
  5. Visualization Layer

    • app_visualization displays system state
    • grpc_server provides remote visualization
    • Integrates with HoloLens for AR display
  6. Simulation Layer

    • simulation provides virtual environment
    • Supports testing and development for task state tracking
    • Can replace sensor input for testing

Additional Directories

  • externals/: Third-party libraries and dependencies
  • assets/: Configuration files, models, and mesh data
  • unit_tests/: Unit tests for dedicate algorithms (task state tracking, neighbrourhood calculation, occlusion detection)

Description of the Code in the Dissertation

Parameters mentioned throught the paper are stored as .xml files inside the assets folder. * Section 4: externals/hand-pose-estimation/source/hand_pose_estimation * Section 4.3: bounding_box_tracking (Equations 4.1 and 4.2), ra_point_cloud_classifier, ra_skin_color_classifier, and skin_detection * Section 4.4: hand_model and hand_pose_estimation * Section 4.5: hand_tracker * Section 5: source/state_observation * Section 5.2: classification_handler * Section 5.3: building_estimation (constructs Petri net), pn_model, and pn_model_extension * Section 5.4: classification_handler and pn_reasoning in source/state_observation; task_progress_visualizer in source/app_visualization * Section 5.5: get_feasible_actions in source/franka_planning/robot_agent * Section 5.6: module_manager in source/app_visualization * Section 5.7: all files in source/simulation * Section 6: source/intention_prediction * Section 6.2: apply_general_prediction_rules in observed_agent * Section 6.3: transition_context in observed_agent * Section 6.4: assets/prediction * Section 6.5: agent_manager and remaining methods in observed_agent * Section 7.2: robot_agent (prediction and scheduling) and franka_actor (motion execution) - both in source/franka_planning

Troubleshooting

  • If the CMake cache generation does not trigger in step 8, open the Solution Explorere, right click on the CMakeLists.txt and select Configure CMake. See for further information: https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170
  • If vcpkg fails to build because it cannot download dependencies from servers, retry with an newer commit (though this can result in new errors due to incompatible package versions)

Contact

Nico Höllerich (nico.hoellerich@uni-bayreuth.de)

License

  • The code in this repository is licensed under the MIT License except for the files externals\hand-pose-estimation\source\hand_pose_estimation prefixed with ra_ these are licensed under a derivateive of MIT for non-commercial usage.
  • An overview of the third-party libraries used in this project can be found in THIRDPARTYLICENSES.md.
  • Detailled copyright and licensing information for each third-party library lib can be found in externals/vcpkg/packages/{lib}_x64-windows/share after step 8 of the Getting Started section.

Contributors

  • Axel Wimmer (building_estimation)
  • R. A. (skincolordetector)
  • Oliver Zahn (frankahighlevel, frankaplanning, frankavoxel, grpc_server, interface for HoloLens 2, rework of build system)
  • Nico Höllerich (all other modules)

Owner

  • Name: UBT Lehrstuhl Angewandte Informatik III
  • Login: ubt-ai3
  • Kind: organization
  • Email: https://www.ai3.uni-bayreuth.de/de/index.html
  • Location: Germany

Citable code from the Chair of Robotics and Embedded Systems at the University of Bayreuth. For more publications and code see: https://www.ai3.uni-bayreuth.de/

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  Fluency in Dynamic Human-Robot Teaming with Intention
  Prediction - Main Application
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Nico
    family-names: Höllerich
    email: nico.hoellerich@uni-bayreuth.de
    affiliation: University of Bayreuth
    orcid: 'https://orcid.org/0000-0003-2612-483X'
abstract: "The market share of collaborative robots in the industry continues to grow steadily. However, there is still a need to improve human-robot collaboration further to support the ongoing industrial transformation, enabling robots to take on more tasks and function as true teammates. This requires advancements in both perception and decision-making capabilities. This thesis contributes to two key aspects of achieving seamless human-robot collaboration: perceiving task progress and recognising human intentions, all within a framework of flexible and fluent cooperation.\n\t\nThe starting point involves two empirical studies on human-human teaming to identify communication mechanisms and intention prediction capabilities for assembly tasks. The findings have resulted in the development of a research demonstrator for a cooperative assembly station, with a particular emphasis on the flexible allocation of task steps and the integration of intention prediction.\n\t\nThe prototype hardware includes a robot arm, an assembly station, and a depth camera. Core innovations are the task-state tracking algorithm and the intention prediction component. The task-state tracking algorithm is based on object detection and occlusion data from the camera. It models task execution in terms of the markings of a Petri net. The provided Petri net encodes all possible ways to execute the task in a space-efficient manner. Comprehensive evaluations demonstrate the algorithm’s robustness and efficiency in non-deterministic task executions.\n\t\nThe sequence of task steps executed by the human serves as input to the intention prediction module, which predicts the next steps using a neural network with a custom-designed feature space. This feature space encodes spatial information to enable efficient, real-time training for each user interacting with the robot. A comprehensive evaluation compares the accuracy of the module with traditional action prediction approaches using data from user interactions with the system.\n\t\nFinally, this thesis presents a comprehensive study on the system. Based on intention prediction, different robot behaviours are implemented and evaluated by a user study in terms of fluency and productivity questionnaires. Post-hoc analysis provides insights into the interrelationships and effects of robot behaviour on these measures.\n\t\nIn summary, this thesis contributes technical foundations, empirical evaluations, and motivates further investigations into fluent and flexible human-robot teaming with intention prediction."
license: MIT
version: 1.0.0
identifiers:
  - type: doi
    value: 10.5281/zenodo.15783114

GitHub Events

Total
  • Push event: 1
  • Create event: 1
Last Year
  • Push event: 1
  • Create event: 1

Dependencies

overlay-ports/abseil/vcpkg.json vcpkg
  • vcpkg-cmake *
  • vcpkg-cmake-config *
overlay-ports/base-transformation/vcpkg.json vcpkg
  • eigen3 *
  • pcl *
  • vcpkg-cmake *
  • vcpkg-cmake-config *
overlay-ports/caffe/vcpkg.json vcpkg
  • gflags *
  • glog *
  • protobuf *
  • vcpkg-cmake *
  • vcpkg-cmake-config *
overlay-ports/cudnn/vcpkg.json vcpkg
  • cuda *
overlay-ports/eigen3/vcpkg.json vcpkg
  • vcpkg-cmake *
  • vcpkg-cmake-config *
overlay-ports/enact/vcpkg.json vcpkg
  • boost-signals2 *
  • vcpkg-cmake *
  • vcpkg-cmake-config *
overlay-ports/franka/vcpkg.json vcpkg
  • eigen3 *
  • gtest *
  • poco *
overlay-ports/franka-proxy/vcpkg.json vcpkg
  • asio *
  • eigen3 *
  • franka *
  • nlohmann-json *
  • poco *
  • vcpkg-cmake *
  • vcpkg-cmake-config *
overlay-ports/gpu-voxels/vcpkg.json vcpkg
  • boost-interprocess *
  • boost-test *
  • cppunit *
  • eigen3 *
  • freeglut *
  • glew *
  • glm *
  • pcl *
  • stb *
  • tinyxml2 *
  • vcpkg-cmake *
  • vcpkg-cmake-config *
  • zlib *
overlay-ports/kinectsdk2/vcpkg.json vcpkg
  • vcpkg-tool-lessmsi >=1.10.0#1
patches/ports/flexcobot/vcpkg.json vcpkg
  • boost-serialization >=1.80.0#1
  • boost-signals2 >=1.80.0#1
  • eigen3 *
  • freeglut *
  • opencv *
  • pcl *
vcpkg.json vcpkg
  • base-transformation *
  • boost-algorithm *
  • boost-date-time *
  • boost-serialization *
  • boost-signals2 *
  • boost-timer *
  • caffe *
  • eigen3 *
  • enact *
  • franka-proxy *
  • freeglut *
  • gpu-voxels *
  • grpc *
  • kinectsdk2 *
  • opencv *
  • pcl *
  • python3 *
  • realsense2 *
  • tinyobjloader *
  • tinyxml *