Public | Automated Build

Last pushed: 3 months ago
Short Description
ramcip_slippage_detection image
Full Description

Ramcip Slippage Detection

Overview

This ros package detects and reacts to the presence of slippage during a grasp by making use of AI classification techniques on time and frequency domain features of input force profiles.

  • Input :
    • either online mode: wrench (3D force, 3D torque) from optoforce sensors
    • or offline mode: obsolete (not implemented) [stored precomputed force or feature profiles]
  • Output :
    • detection of slip or stable by computing features of:
      • norm of f: |(fx, fy, fz)|
      • ratio of ft (tangential) to fn (normal): |ft/fn|
    • joint commands to Robot Hand implementing the desired reaction

Dependencies

This package requires:

Python Dependencies

  • python2.7, pip, setuptools
  • From python you may need the latest versions of the following packages as well, if not already installed:
    • numpy
    • scipy (depending on gfortran, libatlas-base-dev, liblapack-dev as well)
    • matplotlib (depending on libpng12-dev, libxft-dev, libfreetype6-dev as well)
    • scikit-learn
    • nitime
    • pygame

C++ Dependencies

Installation of dependencies

You may install the above required dependencies either by following instructions publicly available online, or trying one of the choices below:

Python Dependencies

  • The automated way:

    sudo ./setup.sh
    
  • The old-school way (assuming your catkin workspace is ~/catkin_ws):

    sudo apt-get update
    sudo apt-get install build-essential python2.7 python2.7-dev python-pip
    sudo apt-get install libfreetype6-dev libxft-dev libpng12-dev \
                         gfortran libatlas-base-dev liblapack-dev
    pip install --user -U setuptools
    pip install --user --upgrade --no-deps -r requirements.txt
    pip install --user -r requirements.txt
    sudo apt-get install python-pygame
    

    C++ Dependencies

Say your catkin workspace is ~/catkin_ws.

  cd ~/catkin_ws/src && git clone https://github.com/auth-arl/autharl_core.git && \
  git clone https://github.com/auth-arl/ramcip_hand_v2.git && \
  sudo rosdep install --from-paths ../src/ --ignore-src --rosdistro indigo -y

Build the repository

Say your catkin workspace is ~/catkin_ws. You may have to make all python components executable:

  cd ~/catkin_ws/src/mynet/scripts
  chmod +x *.py

Then you execute in a terminal the following:

  cd ~/catkin_ws
  catkin_make
  source ~/catkin_ws/devel/setup.bash

Note that the above procedure of catkin_make may not be necessary when using only simple pythonic utilities. It is always needed when programming in C++ though.

How to use

Components

deploy[V2].py: a hybrid component

  • composed of
    • a publisher (talking to /prob[0/1/2] ros topic)
    • a publisher (talking to /optoforce_0_newf ros topic): transformation of current measured force based on estimation of normal to contact point.
    • a subscriber (listening to /optoforce_[0/1/2] ros topic)
  • requiring 2 arguments
    1. [online/offline]: define whether to use streaming [prestored or live] wrench values (online) or [obsolete] use already stored profiles (offline)
    2. [0/1/2]: define optoforce identifier

pub.py: a publisher talking to /optoforce_[0/1/2] ros topic, requiring 3 arguments

  • [online/offline]: same as ii. in deploy.py arguments, with offline providing an estimate of the label as well
  • [0/1/2]: define optoforce identifier
  • [file]: must be in csv like format of at least 6 columns: {3D force, 3D position} = {fx, fy, fz, px, py, pz}

sub.py: a subscriber listening to /prob[0/1/2] ros topic and plotting the input

ramcip_slippage_detection_starter/switch_controllers: a service waiting for approval (from grasp_planner) that grasp has been established and slippage detection-reaction can start

fh_position_controller_custom: a custom ros-controller for position control of (the joints of) the hand.

Example of running the repository

  • Run the full slippage detection and reaction strategy, which calls the service ramcip_slippage_detection_starter/switch_controllers
    waiting approval to start the slippage detection (deployV2.py) and reaction controller (fh_position_controller_custom).

    • Start the service and idle controllers:
    roslaunch load_controllers.launch
    
    • Send manually the signal to start the controllers:
    rosservice call /ramcip_slippage_detection_starter/switch_controllers "isReadyToSwitch: true"
    
    • Send manually the signal to stop the controllers:
    rosservice call /ramcip_slippage_detection_starter/switch_controllers "isReadyToSwitch: false"
    
    • One can see the controllers running, or send joint commands, by opening rqt:
    rqt
    

    and then selecting Plugins->Robot Tools->Controller Manager, green ones are started, red ones are stopped.
    For joint commands one could Plugins->Shadow Robot->Joint Slider, refresh them, and move the sliders.
    Attention: for joint commands the fh_position_controller_custom should be stopped

  • Run only the slippage detection:

    roslaunch deployV2.launch
    
  • Run customly slippage detection and reaction strategy (needs some changes):

    roslaunch fh_robot_launch_custom.launch
    
Docker Pull Command
Owner
autharl

Comments (0)