Giter VIP home page Giter VIP logo

stewart-platform's Introduction

Stewart platform source examples

Copyright (C) 2015-2017 Intel Corporation

Overview

Do the Wave!

This directory provides examples that serve as supplimentary material for the Developer Journey [1] to build a type of parallel robot called a Stewart platform [2].

  1. https://01.org/developerjourney/stewart-platform
  2. https://en.wikipedia.org/wiki/Stewart_platform

The examples contain software to:

  • Communicate via i2c to a PCA9685
  • Solve the Stewart platform to determine servo positions
  • Utility functions for controlling the Stewat platform

To reduce dependencies, this program is not using MRAA to communicate with the PCA9685.

Stewart platform coordinate orientation

These routines work in a standaridzed world coordinate system (WCS) where the XZ plane is the plane the Stewart platform is aligned to when no rotations are being performed (looking down on the Stewat platform.) The Y axis is aligned to the height of the Stewart platform axis (gravity).

The XZ plane is oriented such that the Z axis passes from between servo 0|5 through the center of the platform (0, 0):

                              z+
                              ^
                              |
                         .----+----.
                      2 /     |     \ 3
                       /      |      \
                    1 /       |(0,0,0)\ 4
             x- <--- <--------+--------> ---> x+
                      \       |       /
                       \      |      /
                        \     |     /
                         `----+----'
                            0 | 5
                              v
                Top View      z-

Building utilities

To build:

make

To test:

sudo bin/transform PITCH ROLL YAW X Y Z

For example:

sudo bin/transform 1 0 0  0 0 0

The above will rotate the platform one degree around the X axis.

Piping data from STDIN

The bin/transform program can also read values from STDIN. When it does so, however, it expects values to be provided in Axis-Angle form:

echo "0 1 0 3.5" | sudo bin/transform

The above will rotate the platform around the axis <0,1,0> by 3.5 degrees.

Recording and playing back sequences

When piping data into transform, you can optionally record the sequence of commands with timing information. You can then play that file back to the application to repeat actions and movement sequences.

For example:

bin/joytrack /dev/input/js0 | bin/record MOVEMENTS | sudo bin/transform

You can then record a movement using your joystick (see the next section for configuring a PlayStation 3 USB controller.) When you are done, press CTRL-C.

To play the file back:

bin/playback MOVEMENTS | sudo bin/transform

Using a PS3 USB Controller

To use a PS3 USB controller to control the platform, you either need a USB Bluetooth adapter or use it wired via the USB cable.

I have used the Rocketfish Micro USB Bluetooth adapter, which is supported in Ubuntu 16.04. You also need to pair the PS3 controller with the system. You can follow the instructions here:

http://qtsixa.sourceforge.net/manual.pdf

If you don't need/want to use the controller wirelessly, you can just plug it into the USB port and open the joystick interface.

To do this, you only need the joystick package:

sudo apt install -y joystick

Once the PS3 controller is paired and recognized in the system (or if you have any other joystick installed) you can use the program joytrack:

bin/joytrack /dev/input/js0 | sudo bin/transform

You can then control pitch and roll with left directional controller.

stewart-platform's People

Contributors

jketreno 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.