Coder Social home page Coder Social logo

meca470_project's Introduction

MECA470_Project

Robotic Collaboration for Timber Construction


Robotic Collaboration for Timber Construction

Project Members: Joe Karam - Jerome Lee - Haitham Mohamad - Jesse Rath - Ian Yasui


Robotic Collaboration for Timber Construction

Professor: Hasan Sinan Bank

Table of Contents

1. Introduction

Despite the advancements in Timber prefabrication using CNC systems, the timber construction system still relies on manual labor in most of its tasks. This handicaps the sector when trying to take advantage of the rapidly spreading trend to use complex digital designs. This is where robotics plays a big role; Robotic systems lead to significant time savings, along with their ability to transform the processes from manual to automated. Researchers from ETH Zurich are using a new method for digital timber construction in a real project for the first time [1][2][3].
In this project, this group will work on a design to manufacture a simulation in CoppeliaSim, along with architecting and designing the complete system and using the robot to assemble the predefined plan at minimum.

2. Mobile Robot Degrees of Freedom

The system is composed of three essential component:

-The Gantry Crane which has the "ABB IRBT 2005"[4] as its main constituent.
-Two Articulated Robots "ABB IRB 4600"[5]; These two robots are carried by the Gantry crane.

The goal of this section is calculating the Degrees of Freedom of the whole system before performing the Coppelia Simulation. In order to do so, the book "Modern Robotics"[6] was used, specifically Section 2.2 of Chapter 2 explain the Degrees of Freedom (DoF) of a Robot using the formula below:

Where m is the number of DoF of a body (6 for spatial and 3 for planar), N is the number of Links (including ground frame as a link), J is the number of Joints, and fi is the number of DoF of the ith joint (this will be the sum of all fis of the considered system).

For the first system, which includes the "ABB IRBT 2005", the DoF are calculated:

The values for the above formula are as follows:

-m = 6 , since we are considering this study to be spatial (3D)
-N = 6
-J = 5
-fi has 1 for each individual value since all the joints are prismatic joints (sum = 5)
It is concluded that the gantry crane that carries the two articulated robots has 5 Degrees of Freedom.

For the second system, which includes the "ABB IRB 4600", the DoF are calculated:

The values for the above formula are as follows:

-m = 6 , since we are considering this study to be spatial (3D)
-N = 7
-J = 6
-fi has 1 for each individual value since all the joints are either prismatic or revolute joints (sum = 6)
We can conclude that the articulated robots have 6 Degrees of Freedom each, for a total of 12 for both.

After doing all the necessary claculations, the results show thta the whole system has 17 DoF.

3. Coppelia Simulation

CoppeliaSim is the program used for the Robotic Simulation of this Project. It runs faster and has more features than V-REP (which is what it is formerly known as).
To implement this system in Coppelia, CAD files were downloaded from the ABB website [4][5], and were transferred to a .ttt file using a Solidworks to URDF exporter toolbox. Afterwards, the system was generated as seen in the snip below:

After the system being initiated, a controller has been created for this system, including 17 knobs, each for a specific Degree of Freedom (GIF at the beginning of this README file). To do so, a code has been written in Coppelia. Since this code is long because of the system's DoFs, it is not going to be printed below (it is located in Controller). In addition, the file that has the whole Coppelia System is located in Timber Controller.

Another way to control our Robot in Coppelia was learned using Visual Studio Code. A code was implemented in VS Code and a connection between VSC and Coppelia has been established in order to control this process. The outcome is very helpful, since there are two ways to control the system now. The code is is located in VSCode Controller (the file used with it should be Timber )and will be printed below:

  import numpy as np
  import sim
  import sys
  import time

  #-----Try to connect---------------
  sim.simxFinish(-1)
  your_IP='10.0.0.38'
  clientID = sim.simxStart(your_IP,19997,True,True,10000,5)
  if clientID != -1:    
      print("Connected to remote API server")
  else:    
      print("Not connected to remote API server")   
      sys.exit ("could not connect")

  #-----Start the Paused Simulation
  err_code = sim.simxStartSimulation(clientID,sim.simx_opmode_oneshot)

  #Gantry Crane
  err_code,CraneActuator = sim.simxGetObjectHandle(clientID,"CraneActuator",sim.simx_opmode_blocking)
  err_code,CrabActuator1 = sim.simxGetObjectHandle(clientID,"CrabActuator1",sim.simx_opmode_blocking)
  err_code,CrabActuator2 = sim.simxGetObjectHandle(clientID,"CrabActuator2",sim.simx_opmode_blocking)
  err_code,LowerCrab1 = sim.simxGetObjectHandle(clientID,"LowerCrab1",sim.simx_opmode_blocking)
  err_code,LowerCrab2 = sim.simxGetObjectHandle(clientID,"LowerCrab2",sim.simx_opmode_blocking)

  #First Robot
  err_code,Base_Spinner_1 = sim.simxGetObjectHandle(clientID,"Base_Spinner_1",sim.simx_opmode_blocking)
  err_code,Link1_Link2_1 = sim.simxGetObjectHandle(clientID,"Link1_Link2_1",sim.simx_opmode_blocking)
  err_code,Link2_Link3_1 = sim.simxGetObjectHandle(clientID,"Link2_Link3_1",sim.simx_opmode_blocking)
  err_code,Link3_Link4_1 = sim.simxGetObjectHandle(clientID,"Link3_Link4_1",sim.simx_opmode_blocking)
  err_code,Link4_Link5_1 = sim.simxGetObjectHandle(clientID,"Link4_Link5_1",sim.simx_opmode_blocking)
  err_code,Link5_Link6_1 = sim.simxGetObjectHandle(clientID,"Link5_Link6_1",sim.simx_opmode_blocking)

  #Second Robot
  err_code,Base_Spinner_2 = sim.simxGetObjectHandle(clientID,"Base_Spinner_2",sim.simx_opmode_blocking)
  err_code,Link1_Link2_2 = sim.simxGetObjectHandle(clientID,"Link1_Link2_2",sim.simx_opmode_blocking)
  err_code,Link2_Link3_2 = sim.simxGetObjectHandle(clientID,"Link2_Link3_2",sim.simx_opmode_blocking)
  err_code,Link3_Link4_2 = sim.simxGetObjectHandle(clientID,"Link3_Link4_2",sim.simx_opmode_blocking)
  err_code,Link4_Link5_2 = sim.simxGetObjectHandle(clientID,"Link4_Link5_2",sim.simx_opmode_blocking)
  err_code,Link5_Link6_2 = sim.simxGetObjectHandle(clientID,"Link5_Link6_2",sim.simx_opmode_blocking)


  while True:    
      print("hello world")    
      a = np.transpose(np.asmatrix(np.linspace(1, -180, 500)))    
      print("a:")    
      print(a)    
      b = np.transpose(np.asmatrix(np.linspace(1, 180, 500)))    
      print("b:")    
      print(b)    
      c = np.transpose(np.asmatrix(np.linspace(1, 90, 500)))    
      print("c:")    
      print(c)    
      d = np.transpose(np.asmatrix(np.linspace(1, 450, 500)))    
      print("d:")    
      print(d)    
      e = np.asmatrix(np.zeros((500, 1)))   
      print("e:")    
      print(e)    
      f = np.concatenate((d, b, a, e, c, d), axis=1)    
      print("f:")    
      print(f)  

      #Gantry Crane
      pos_val = 10 # in m
      err_code = sim.simxSetJointTargetPosition (clientID, CraneActuator,pos_val,sim.simx_opmode_streaming)
      time.sleep(1) #wait a short amount of time    

      pos_val = 5 # in m    
      err_code = sim.simxSetJointTargetPosition (clientID, CrabActuator1,pos_val,sim.simx_opmode_streaming)
      time.sleep(1) #wait a short amount of time    

      pos_val = 5 # in m   
      err_code = sim.simxSetJointTargetPosition (clientID, CrabActuator2,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = 2 # m  
      #robot.animate(stances=f, frame_rate=30, unit='deg')    
      err_code = sim.simxSetJointTargetPosition (clientID, LowerCrab1,pos_val,sim.simx_opmode_streaming)
      time.sleep(1) #wait a short amount of time    

      pos_val = 2 # in m    
      err_code = sim.simxSetJointTargetPosition (clientID, LowerCrab2,pos_val,sim.simx_opmode_streaming)
      time.sleep(1) #wait a short amount of time    


      #Robot 1
      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Base_Spinner_1,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link1_Link2_1,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link2_Link3_1,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link3_Link4_1,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link4_Link5_1,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link5_Link6_1,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time


      #Robot 2
      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Base_Spinner_2,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link1_Link2_2,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link2_Link3_2,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link3_Link4_2,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link4_Link5_2,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

      pos_val = np.radians(40) # in degrees 0    
      err_code = sim.simxSetJointTargetPosition (clientID, Link5_Link6_2,pos_val,sim.simx_opmode_streaming) 
      time.sleep(1) #wait a short amount of time

4. Connecting ROS to Coppelia

In this section, the goal is controlling CoppeliaSim (formerly known as V-Rep) from a Virtual Instance of ROS (Robot Operating System), all running within Windows. In order to do so, part of a tutorial was followed (some adjustments have been added, highlighted in yellow in the pdf, to make it work)(This tutorial was given to this group from the instructor of this class). A procedure was used in order to configure a Windows-based host machine and a Linux-based guest machine to establish a TCP connection between the two.
The same .ttt file has been used as the one from the second controller discussed in the section before. This Coppelia File has the exact same system as the Timber Controller, but with a different script.
After the connection has been established, a folder by the name of vrepy is created inside ROS as seen in the figure below:

Now the last step is running the Coppelia Simulation and typing the required code in the ROS terminal. Finally, this is what it will liik like:

5. References

[1] Willmann, Jan, Michael Knauss, Tobias Bonwetsch, Anna Aleksandra Apolinarska, Fabio Gramazio, and Matthias Kohler. “Robotic Timber Construction — Expanding Additive Fabrication to New Dimensions.” Automation in Construction 61 (2016): 16–23. https://doi.org/10.1016/j.autcon.2015.09.011.
[2] Thoma, Andreas, Arash Adel, Matthias Helmreich, Thomas Wehrle, Fabio Gramazio, and Matthias Kohler. “Robotic Fabrication of Bespoke Timber Frame Modules.” Robotic Fabrication in Architecture, Art and Design 2018, 2018, 447–58. https://doi.org/10.1007/978-3-319-92294-2_34.
[3] “Robotic Collaboration in Timber Construction.” ETH Zurich, March 22, 2018. https://ethz.ch/en/news-and-events/eth-news/news/2018/03/spatial-timber-assemblies.html.
[4] “IRBT 2005 - Medium Track Motion Platform.” ABB, n.d. https://new.abb.com/products/robotics/application-equipment-and-accessories/robot-positioners-track-motion/irbt-2005.
[5] “IRB 4600 - Industrial Robots: ABB Robotics.” ABB, n.d. https://new.abb.com/products/robotics/industrial-robots/irb-4600.
[6] Lynch, Kevin M., and Frank C. Park. Modern Robotics: Mechanics, Planning, and Control. Cambridge, United Kingdom: Cambridge University Press, 2019.

meca470_project's People

Contributors

joekk13 avatar

Watchers

James Cloos 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.