week 16

Interface and Application Programming

ASSIGNMENTS:

  • Write an application that interfaces with an input &/or output device that you made

home

about me

robot interface design

The boards I have designed for the input device and electronics design week part II are the fundamental boards for the robot I am making for the final project. The robot is designed and coded in Grasshopper to take geometric input from grasshopper and mode accordingly.

 

For this reason, I made the interface with Grasshopper, using Firefly, Human and Treefrog to simulate the robot in the real time.

 

First thing in this assignment was to setup the simulation of the robot model, with which interaction will be translated to physical movement in the Robot Model.

simulation interface setup

FabLab CEPT

First step was to import the robot model as mesh for light handling and to refer as the base for the simulation.

Then according to Daniel Piker's lobster guide, the six axes was defined. I have imported the lines same one I have used for designing the robot.

The base points are defined in the model also. Now it is time to fire up grasshopper and  set up the simulation interface.

mesh

points

ik solver

fk engine

While the Mesh, points are set up, the reference plane, target plane and reference points are fed into IK solver of the Lobster written in C# and added to. It gives back 8 set of 6 values of the axes of which one set is effective.

clash detection

robot to servo

Next stage was to design 2 components:

  1. Conversion of Robot Angle to Servo angle.
  2. Error detection in the robot if it goes beyond servo limit.

 

It reflects on the simulation in Rhino viewport. Red parts show that axis is out of Robot Limit.

Next, I designed was the axes data and the robot operation methods in a heads up display using the HumanUI for Grasshopper.

This is how it shows the in which mode the Robot is Running. Inverse Kinematic Mode or Manual Override. Next the challenge was to show the axes data and axes limits on screen to take a reference of the angular movements.

Mapped 0-180 degree to a bar of rectangle of constant width.

But after that realised the texts should come before the bars.

This is how the HUD is set up and HUD looks like the former picture. One demonstration follows.

Next was to connect the Board with the Robot HUD UI and use Firefly to interface with Code and Physical Robot. The standard set of Firefly components are imported.

Once components are there get the Uno Write component near Servo Angle python codes and connect likewise:

  • A1 : DPin 11
  • A2 : DPin 10
  • A3 : DPin 9
  • A4 : DPin 6
  • A5 : DPin 5
  • A6 : DPin 3

 

Right Click on each of the pins and select Servo

Now, connect back port and toggle to make the component active.

Now lets add a counter in the code so that the robot can move automatically.

For the interfacing, if port is open or Firefly Uno Write is connected 2 very small python components are added based on if they are on True of False.

The interface application looks like this:

The demonstration with the Board, Robot, Rhino and Grasshopper interface is demonstrated in the next video:

krab board

robot krab

interface

To use this week's file make sure following things are installed in the system:

  • Rhino - Grasshopper
  • Human  : add on to Grasshopper
  • Firefly : add on to Grasshopper

The files can be accessed here.

 go to WEEK 17 >>

Avishek Das   |   2017   |   FabLab CEPT