Giter Club home page Giter Club logo

martinandrovich / hric-system Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 181.1 MB

An integrated simulation environment for research in safety of Human-Robot Interaction and Collaboration (HRIC), facilitating the means of ROS-based real time robot interfacing and collection of sensory data, furthermore providing a generic framework for development and deployment of an arbitrary robot controller in both a simulated and real environment.

MATLAB 0.06% Shell 0.11% CMake 0.20% C++ 98.87% C 0.77%
ros hric robotics franka panda ros-control urdf

hric-system's Introduction

HRIC System

This project is part of a thesis (source) presented for the degree of BSc in Engineering (Robot Systems) at the University of Southern Denmark (SDU).

For research in safety of Human-Robot Interaction and Collaboration (HRIC), an integrated simulation environment is setup, facilitating the means of real time robot interfacing and collection of sensory data, furthermore providing a generic framework for development and deployment of an arbitrary robot controller in both a simulated and real environment.

Illustration of HRIC workcell and its components.
Illustration of HRIC workcell and its components. Images from OptiTrack and Franka.

Using the workcell in SDU Industry 4.0 lab, equipped with a Franka Emika Panda robot and various perceptual sensory equipment (e.g., motion capture system, EMG sensors etc.), the Robot Operating System (ROS) middleware is used as the underlying framework of the software architecture, in which the development of the generic controller framework is be accommodated by ROS Control and Franka ROS, using Gazebo as the simulation environment.

To analyze human-robot interaction, the robot model is integrated into a biomechanical simulator (OpenSim), automating the transformation of a Unified Robot Description Format (URDF) model to OpenSim Model Format (OSIM).

Overview

Features

This reposity contains the catkin workspace used for the HRIC system, consisting of various packages.

  • franka_description - modified URDF robot descriptions with estimated dynamics parameters.
  • franka_gazebo - integration of Panda into Gazebo along with emulation of joint space robot dynamics.
  • franka_sim_controllers - various controllers to be used in the simulated environment.
  • franka_irl_controllers - various controllers to be used in the real environment.
  • urdf_to_osim - automated transformation of URDF model to OSIM model.
  • mocap_sampler - sampling of the OptiTrack MOCAP system using NatNet SDK.

Dependencies

This project heavily relies on the Robot Operating System (ROS) framework accompanied by libfranka and franka_ros for real time robot interfacing. The system is running a Ubuntu (18.04.3 LTS) distribtuion which is patched with a real-time kernel (5.4.10rt). The GDE doesn't really matter, but a lightweight GDE might improve performance, e.g. LDXE. The project is compiled using C++17 GCC, managed with catkin build system, CMake (2.8.3) and rosdep for dependecny managements, built with:

  • ROS - robotics middleware.
  • libfranka - C++ interface for Franka Control Interface.
  • franka_ros - metapackage that integrates libfranka into ROS and ros_control.
  • Gazebo - robot simulation environment.
  • OpenSim 4.1 - biomechanical simulation environment.
  • KDL - rigid-body dynamics library.
  • Eigen3 - high-level C++ library for linear algebra etc.
  • NatNet - SDK for interfacting OptiTrack Motive.

All necessary documentation for the Franka Emika Panda robot and the FCI (libfranka, franka_ros etc.) can be found here. The OpenSim controller are compileable on Linux, but are only useful when compiled on Windows (yeah, that sucks) and used with the OpenSim GUI.


Getting started

It is recommended to install the system on a dedicated workstation computer, directly connected to the Panda robot(s) and any measurements devices; a network switch is permissable but not advisable.

Installation

The installation is comprised of the following steps:

  1. Installing Ubuntu (18.04.3 LTS)
  2. Installing ROS
  3. Pathcing real time kernel and configuring performance parameters
  4. Installing libfranka and franka_ros
  5. Cloning repository (installing catkin workspace)
  6. Installing dependecies using scripts and rosdep

After a clean install of Ubuntu, there are bash scripts available for system configuration and installation of the real time kernel. A network configuration is necesasry in order to communicate with the robot.

NOTICE: The scripts modify several system parameters; it is recommend to examine the script and comment out any unnecessary parts.

The setup-essential.bash script installs any essential packages. The setup-ros.bash installs ROS as well installs the dependency manger rosdep and and initializes it. These scripts must be run first, otherwise dependecy issues might arise.

NOTICE: The RT kernel does NOT support NVIDIA driver binaries; the default nouveau drivers might pose some issues.

The setup-rt.bash script downloads, configures, compiles, and installs the real time kernel; the script includes a guide on how to configure the kernel using a graphical interface.

Once the system is configured, this repository can be cloned (typically ~/Desktop/hric-system). From within the source directory of the catkin workspace (e.g., ~/Desktop/hric-system/ws), the following command will automatically install any missing catkin dependecies

rosdep install --from-paths src --ignore-src -r -y

The project can then be built by issuing the command (optionally specifying a custom libfranka build):

catkin_make -DCMAKE_BUILD_TYPE=Release -DFranka_DIR:PATH=~/Desktop/libfranka/build

Furthermore, the setup-opensim.bash script downloads and compiles the OpenSim library; the installed location must then be specified in the CMake files of where the OpenSim library is used (e.g., urdf_to_osim package).

Usage

In order for roslaunch and rosrun to be able to locate the contents of the workspace whenever a new terminal window, it must be sourced by issuing the source devel/setup.bash command from the workspace directory. This command can also be added to the ~/.bashrc file.

An advanced network performance analysis can be performed using the communication_test example from libfranka/build/examples/. The provided scripts should configure the system such that when running on a RT kernel, the test should be greater or equal to a success rate of 0.95.

The simulated environment with a trajectory controler can be launched using roslaunch franka_sim_controllers joint_trajectory_control, exposing a ROS interface for commanding a trajectory_msgs/JointTrajectory type setpoint at the /panda_joint_trajectory_controller/command topic.

The real robot can be interfaced using any of the franka_irl_controller controller or using a controller from the (not provided) franka_example_controllers package (part of franka_ros).

Acknowledgements

  • Cheng Fang - project supervisor for bachelor thesis.
  • Daniel Tofte - comrade of the bachelor thesis, noble Corona warrior.
  • Erdal Perkel - inspiration for integration of Franka Emika Panda into Gazebo.

hric-system's People

Contributors

martinandrovich avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.