Tuesday, September 22, 2009

Haptic Device - Mechanical Design















I am creating a parallel manipulator haptic device based on a delta platform. The goal is to use a cheap set of mechanical parts (in this case Erectors) to get a functional design in a short amount of time. The main purpose is to learn about control of physical designs (as opposed to simulation). As well as being quick to setup the Erectors allow for reconfigurability. If I find that the lengths of certain components are too long or two short it doesn't require time spent into machining new parts.

An Arduino Duemilanove is being used as the microcontroller. The Arduino is an open source hardware/software project that uses Atmel microprocessors. It has 6 analog inputs and 13 digital I/O. It is programmed using a program based on Wiring. It is similar to C/C++ and is compatible with C/C++ libraries. More information about the microcontroller can be found here.















One advantage of using an Arduino over a Board of Education or other microcontroller, for example, is UART communication. Information can be sent over serial, meaning it can interface with Matlab and Simulink fairly easily.

There will be 3 potentiometers, one per servo, to sense the actual position of each leg. This information can be send to the computer via the analog in pins on the Arduino.













Preliminary work on manipulating an individual leg within Matlab/Simulink has been started. Full control is not yet developed.

Monday, September 21, 2009

H3D - Mouse input














I am working to create interactive deformable objects that can be created by button clicks on a haptic device. I am using a combination of X3D and Python with H3DAPI. The end result of this exercise is to gain knowledge in order to apply this to DICOM or other CAD 3D models for Medical simulation.

To start I tried using the mouse as an input. I am having trouble getting the mouse position data formatted correctly in Python. I currently have one axis partially working. The problem stems from a datatype used in Python specific to H3d. The value returned by routing the Mouse position data from the X3D file to Python is a SFVec2. This is not compatible with the Vec3f datatype needed by the translation command for determining the position of a point. I started out using a mouse assuming it would be easier. This assumption was incorrect.

Another concern with the mouse is in regards to the viewport. The value the mouse returns is based on the position of the pointer within the H3D window. You must use an orthogonal screen and lock camera rotation. If you use perspective the position of the sphere created will be offset from the position of the mouse for a large range of points.

My next course of action is to remove the mouse and get actual 3D positions from either the Falcon or Omni haptic device. It is possible there are still problems with the datatype (part of which I can now solve) but regardless I don't have the problem with possition offset.