Giter Club home page Giter Club logo

myo_blink's Introduction

Myo_Blink example

You can either run this in a docker container, or run it on a Ubuntu 16.04 with ROS kinetic installed. In any case the your machine or the docker HOST machine needs to have the ftdi drivers installed.

Dependencies

Install the ftdi drivers

wget http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.3.6.tgz
gunzip libftd2xx-x86_64-1.3.6.tgz
tar xvf libftd2xx-x86_64-1.3.6.tar
cp -r ./release/build/lib* /usr/local/lib
ln -s /usr/local/lib/libftd2xx.so.1.3.6 /usr/local/lib/libftd2xx.so
chmod 0755 /usr/local/lib/libftd2xx.so.1.3.6
cp ./release/ftd2xx.h  /usr/local/include
cp ./release/WinTypes.h  /usr/local/include
ldconfig -v|grep ftd2xx

Create a udev file to automatically load the right ftd2xx driver

wget https://raw.githubusercontent.com/Roboy/myo_blink/master/30-ftdi.rules
sudo cp 30-ftdi.rules /etc/udev/rules.d/

Starting inside a docker container

When you are doing it in docker use the following command after adjusting the paths to point to the repositories.

docker run --rm -ti --privileged -v /dev/bus/usb:/dev/bus/usb -v ~/Development/Roboy/myo_blink/:/cm_workspace/src/myo_blink -v ~/Development/Roboy/flexrayusbinterface/:/cm_workspace/src/flexrayusbinterface -v ~/Development/Roboy/common_utilities/:/cm_workspace/src/common_utilities  ros:kinetic /bin/bash

Install system dependencies

Once you are inside the container or

if you are running 16.04 and kinetic directly run through the following commands

apt-get update
apt-get install -y wget cmake

Install the ros nodes

If you don't already have a catkin workspace, create one:

mkdir -p catkin_workspace/src
cd catkin_workspace/src
catkin_init_workspace

Download the repos

git clone https://github.com/Roboy/flexrayusbinterface.git
git clone https://github.com/Roboy/myo_blink.git
git clone https://github.com/Roboy/common_utilities.git

Build it

cd .. # you should be in catkin_workspace
catkin_make

Configure it

Update the serial number in the yaml config file in .../myo_blink/config to match the serial of your FTDI device.

i.e. line 2: https://github.com/Roboy/myo_blink/blob/master/config/myoarm_controllers.yaml

Adapt other parameters in the yaml file to your liking.

Play with it

Run it

source devel/setup.bash
roslaunch myo_blink myo_blink.launch

Read the muscle's data

rostopic echo -c /myo_blink/muscles/biceps

Please note, that nothing will be published on these topics before you have sent any command to the motor!

Move the motor

Control mode (action):

  • 'move to' - PositionController
  • 'move with' - VelocityController
  • 'keep' - Effort / ForceController
rosservice call /myo_blink/move "biceps
action: 'move to'
setpoint: 10.0"

Units

  • Position controller ('move to' command) expects the setpoint in radians
  • actuatorPosition and tendonDisplacement are displayed in encoder ticks
  • 1 rad ~ 17275 ticks

myo_blink's People

Contributors

compiaffe avatar missxa avatar letrend 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.