Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goutham Bandaru #46

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Q8_with_Controller1.slx
Binary file not shown.
Binary file added Q8_with_Controller2.slx
Binary file not shown.
47 changes: 47 additions & 0 deletions Question_3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#DH parameters and endeffector properties for a STANFORD Type manipultor

import numpy as np
n = 4 #number of links

#defing Cos and Sin as functions for simplicity.
def c(t):
c= np.cos(t*np.pi/180)
return c

def s(t):
s= np.sin(t*np.pi/180)
return s

# DH parameters for SCARA manipulator
DH = np.array([[10, 0, 0 , 0],
[10, 180, 0, 0],
[0, 0, 0, 0,],
[0, 0, 5, 0]])

#Initializing the T matrix
T = np.array([[1,0,0,0],
[0,1,0,0],
[0,0,1,0],
[0,0,0,1]])

B = np.array([[1],[2],[3],[1]]) #given end effector position
W = np.array([[5],[6],[4],[1]])
# making the T matrix and matrix multiplying all the H matrices.
for i in range(0,4):
H = np.array([[c(DH[i,3]), -s(DH[i,3])*c(DH[i,1]), s(DH[i,3])*s(DH[i,1]), DH[i,0]*c(DH[i,3])],
[s(DH[i,3]) , c(DH[i,3])*c(DH[i,1]), c(DH[i,3])*s(DH[i,1]), DH[i,0]*s(DH[i,3])],
[0, s(DH[i,1]), c(DH[i,1]), DH[i,1]],
[0, 0, 0, 1]])
T = np.dot(T,H)

# T is the Jacobian manipulator.

print('Manipulator Jacobian is')
print(T)
E = np.dot(T, B)
print('EndEffector position is ', E[0],E[1],E[2] )
#E gives the end effector postion with respect to base frame.

V = np.dot(T,W)
print('EndEffector velocity is ', V[0],V[1],V[2] )
# V gives the end effector velocity with respect to base frame
50 changes: 50 additions & 0 deletions Question_4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#DH parameters and endeffector properties for a STANFORD Type manipultor

import numpy as np
n = 6 #number of links

#defing Cos and Sin as functions for simplicity.
def c(t):
c= np.cos(t*np.pi/180)
return c

def s(t):
s= np.sin(t*np.pi/180)
return s

# DH parameters for STANFORD manipulator
DH = np.array([[0, -90, 0 , 0],
[0, 90, 10, 0],
[0, 0, 0, 0,],
[0, -90, 0, 0],
[0, 90, 0, 0],
[0, 0, 10, 0]])

#Initializing the T matrix
T = np.array([[1,0,0,0],
[0,1,0,0],
[0,0,1,0],
[0,0,0,1]])

B = np.array([[1],[2],[3],[1]]) #given end effector position
W = np.array([[5],[6],[4],[1]])
# making the T matrix and matrix multiplying all the H matrices.
for i in range(0,4):
H = np.array([[c(DH[i,3]), -s(DH[i,3])*c(DH[i,1]), s(DH[i,3])*s(DH[i,1]), DH[i,0]*c(DH[i,3])],
[s(DH[i,3]) , c(DH[i,3])*c(DH[i,1]), c(DH[i,3])*s(DH[i,1]), DH[i,0]*s(DH[i,3])],
[0, s(DH[i,1]), c(DH[i,1]), DH[i,1]],
[0, 0, 0, 1]])
T = np.dot(T,H)

# T is the Jacobian manipulator.

print('Manipulator Jacobian is')
print(T)

E = np.dot(T, B)
print('EndEffector position is ', E[0],E[1],E[2] )
#E gives the end effector postion with respect to base frame.

V = np.dot(T,W)
print('EndEffector velocity is ', V[0],V[1],V[2] )
# V gives the end effector velocity with respect to base frame
Binary file added Robotics _Assignment3_Goutham..pdf
Binary file not shown.
807 changes: 807 additions & 0 deletions Robotics_Assignment_4.ipynb

Large diffs are not rendered by default.