Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Note it is alpha_i , NOT alpha_i-1 as well as a here in table so first two columns are offset not like in conventional dh table from the textbook. Just mind the indexes.
- i alpha i a d theta i
- 0 [sympy.rad(180), 0.0, 0, 0],
- 1 [sympy.rad(90), -0.033, -0.147, self.th1],
- 2 [0, 0.155, 0, self.th2],
- 3 [0, 0.135, 0, self.th3],
- 4 [sympy.rad(-90), 0.1136, 0, self.th4],
- 5 [self.th5, 0.1045, 0, 0],
- [0, 0, 0, 0] # the last line used for don't remember which sympy reasons
- #The mapping of DH to arm thetas and back (in degrees!) is following:
- def dh_thetas_to_arm_thetas(self, dh_vals):
- offsets = [169, -25, -151, 102.5, 0]
- scales = [1, -1, -1, -1, 1]
- return [dh_vals[i]*scales[i]+offsets[i] for i in range(len(dh_vals))]
- def arm_thetas_to_dh_thetas(self, arm_vals):
- offsets = [169, -25, -151, 102.5, 0]
- scales = [1, -1, -1, -1, 1]
- return [(arm_vals[i]-offsets[i])/scales[i] for i in range(len(arm_vals))]
- # The control values should be switched to radians then!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement