Git Product home page Git Product logo

friction-from-vision-cnn's Introduction

Friction from vision CNN

This repository holds a ros node and a standalone demo to estimate friction from vision using material recognition CNNs and known per-material probability distributions of friction. The work was finalist for Best Paper Award at the IEEE conference Humanoids 2016, where it was used to help plan slippage-safe motion for humanoid robots.

Paper

If you use this in your research, please cite

Martim Brandao, Yukitoshi Minami Shiguematsu, Kenji Hashimoto, and Atsuo Takanishi, "Material recognition CNNs and hierarchical planning for biped robot locomotion on slippery terrain", in 16th IEEE-RAS International Conference on Humanoid Robots, 2016, pp. 81-88.

The paper is available here.

Instructions

Caffe

Please download and compile caffe-segnet. If you have want to use (recent) cuDNN acceleration, use this branch instead.

Then, edit scripts/test_webcam_demo.py and scripts/rosnode.py so that this line

caffe_root = '/home/martim/workspace/cv/SegNet/caffe-segnet-cudnn5/'

points to the correct path for caffe-segnet.

Data

Download the network weights from here and place them under the folder "data".

Usage (standalone)

This demo is adapted from SegNet's demo and assumes you have a webcam recognized by OpenCV.

cd scripts
bash test_webcam_demo.py

Usage (rosnode)

rosrun friction_from_vision rosnode.py

You will probably want to edit the ros topic names, which are written on the script directly.

NOTE: for some reason, on my computer caffe-segnet-cudnn5 runs very slow on the rosnode but not on demo (10 seconds vs 100ms). If you run into the same problem, I recommend that you use the original caffe-segnet, compiled without cuDNN support.

Parameters

The way friction quantiles are computed is by searching the CDF of friction on discretized intervals (called Q_search_tol on the code) until the desired quantile probablity is found (Q_quantile on the code). This is done on the network directly by adding some extra layers after the material recognition SegNet.

To change the default values for these, please edit data/segnet_webdemo2_friction.prototxt:

layer {
  name: "pdist"
  bottom: "cdf"
  top: "pdist"
  type: "Power"
  power_param {
    power: 2
    scale: 1
    shift: -0.05 # this is -p (so that we search for p-quantiles)
  }
}
(...)
layer {
  name: "Q"
  bottom: "Qind"
  top: "Q"
  type: "Power" # using power for compatibility with old caffe versions which dont have scale layers
  power_param {
    power: 1
    scale: 0.025 # this is the discretization used during quantile search
    shift: 0
  }
}

friction-from-vision-cnn's People

Contributors

martimbrandao avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.